diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f66c426..7d4b5f6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - beta permissions: contents: write diff --git a/.releaserc.json b/.releaserc.json index 5638b284..c39a049f 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,6 +1,10 @@ { "branches": [ - "main" + "main", + { + "name": "beta", + "prerelease": "beta" + } ], "plugins": [ "@semantic-release/commit-analyzer", diff --git a/README.md b/README.md index fe905b46..7ae96124 100644 --- a/README.md +++ b/README.md @@ -72,17 +72,29 @@ JSON file. This process creates a secure token. ```python import zitadel_client as zitadel +from zitadel_client.exceptions import ApiError +from zitadel_client.models import ( + UserServiceAddHumanUserRequest, + UserServiceSetHumanEmail, + UserServiceSetHumanProfile, +) zitadel = zitadel.Zitadel.with_private_key("https://example.us1.zitadel.cloud", "path/to/jwt-key.json") try: - response = zitadel.users.user_service_add_human_user({ - "username": "john.doe", - "profile": {"givenName": "John", "familyName": "Doe"}, - "email": {"email": "john@doe.com"} - }) + request = UserServiceAddHumanUserRequest( + username="john.doe", + profile=UserServiceSetHumanProfile( + givenName="John", + familyName="Doe" + ), + email=UserServiceSetHumanEmail( + email="john@doe.com" + ), + ) + response = zitadel.users.add_human_user(request) print("User created:", response) -except Exception as e: +except ApiError as e: print("Error:", e) ``` @@ -106,17 +118,29 @@ which is then used to authenticate. ```python import zitadel_client as zitadel +from zitadel_client.exceptions import ApiError +from zitadel_client.models import ( + UserServiceAddHumanUserRequest, + UserServiceSetHumanEmail, + UserServiceSetHumanProfile, +) zitadel = zitadel.Zitadel.with_client_credentials("https://example.us1.zitadel.cloud", "id", "secret") try: - response = zitadel.users.user_service_add_human_user({ - "username": "john.doe", - "profile": {"givenName": "John", "familyName": "Doe"}, - "email": {"email": "john@doe.com"} - }) + request = UserServiceAddHumanUserRequest( + username="john.doe", + profile=UserServiceSetHumanProfile( + givenName="John", + familyName="Doe" + ), + email=UserServiceSetHumanEmail( + email="john@doe.com" + ), + ) + response = zitadel.users.add_human_user(request) print("User created:", response) -except Exception as e: +except ApiError as e: print("Error:", e) ``` @@ -140,17 +164,29 @@ authenticate without exchanging credentials every time. ```python import zitadel_client as zitadel +from zitadel_client.exceptions import ApiError +from zitadel_client.models import ( + UserServiceAddHumanUserRequest, + UserServiceSetHumanEmail, + UserServiceSetHumanProfile, +) zitadel = zitadel.Zitadel.with_access_token("https://example.us1.zitadel.cloud", "token") try: - response = zitadel.users.user_service_add_human_user({ - "username": "john.doe", - "profile": {"givenName": "John", "familyName": "Doe"}, - "email": {"email": "john@doe.com"} - }) + request = UserServiceAddHumanUserRequest( + username="john.doe", + profile=UserServiceSetHumanProfile( + givenName="John", + familyName="Doe" + ), + email=UserServiceSetHumanEmail( + email="john@doe.com" + ), + ) + response = zitadel.users.add_human_user(request) print("User created:", response) -except Exception as e: +except ApiError as e: print("Error:", e) ``` @@ -160,20 +196,6 @@ Choose the authentication method that best suits your needs based on your environment and security requirements. For more details, please refer to the [Zitadel documentation on authenticating service users](https://zitadel.com/docs/guides/integrate/service-users/authenticate-service-users). -### Debugging - -The SDK supports debug logging, which can be enabled for troubleshooting -and debugging purposes. You can enable debug logging by setting the `debug` -flag to `true` when initializing the `Zitadel` client, like this: - -```python -zitadel = zitadel.Zitadel("your-zitadel-base-url", 'your-valid-token', lambda config: config.debug = True) -``` - -When enabled, the SDK will log additional information, such as HTTP request -and response details, which can be useful for identifying issues in the -integration or troubleshooting unexpected behavior. - ## Design and Dependencies This SDK is designed to be lean and efficient, focusing on providing a diff --git a/etc/docker-compose.yaml b/etc/docker-compose.yaml index 238af6f9..5dc92a9b 100644 --- a/etc/docker-compose.yaml +++ b/etc/docker-compose.yaml @@ -20,7 +20,7 @@ services: restart: 'no' networks: - storage - image: 'ghcr.io/zitadel/zitadel:latest' + image: 'ghcr.io/zitadel/zitadel:v4.0.0-rc.1' command: 'init --config /example-zitadel-config.yaml --config /example-zitadel-secrets.yaml' depends_on: db: @@ -34,7 +34,7 @@ services: restart: 'no' networks: - storage - image: 'ghcr.io/zitadel/zitadel:latest-debug' + image: 'ghcr.io/zitadel/zitadel:v4.0.0-rc.1-debug' user: root entrypoint: '/bin/bash' command: [ "-c", "/app/zitadel setup --config /example-zitadel-config.yaml --config /example-zitadel-secrets.yaml --steps /example-zitadel-init-steps.yaml --masterkey \"my_test_masterkey_0123456789ABEF\" && echo \"--- ZITADEL SETUP COMPLETE ---\" && echo \"Personal Access Token (PAT) will be in ./zitadel_output/pat.txt on your host.\" && echo \"Service Account Key will be in ./zitadel_output/sa-key.json on your host.\" && echo \"OAuth Client ID and Secret will be in 'zitadel' service logs (grep for 'Application created').\"" ] @@ -55,7 +55,7 @@ services: networks: - backend - storage - image: 'ghcr.io/zitadel/zitadel:latest' + image: 'ghcr.io/zitadel/zitadel:v4.0.0-rc.1' command: > start --config /example-zitadel-config.yaml --config /example-zitadel-secrets.yaml diff --git a/poetry.lock b/poetry.lock index 94ef72fa..864db552 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,14 +2,14 @@ [[package]] name = "alabaster" -version = "0.7.13" -description = "A configurable sidebar-enabled Sphinx theme" +version = "0.7.16" +description = "A light, configurable Sphinx theme" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, - {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, + {file = "alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92"}, + {file = "alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65"}, ] [[package]] @@ -24,19 +24,16 @@ files = [ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} - [[package]] name = "authlib" -version = "1.3.2" +version = "1.6.0" description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "Authlib-1.3.2-py2.py3-none-any.whl", hash = "sha256:ede026a95e9f5cdc2d4364a52103f5405e75aa156357e831ef2bfd0bc5094dfc"}, - {file = "authlib-1.3.2.tar.gz", hash = "sha256:4b16130117f9eb82aa6eec97f6dd4673c3f960ac0283ccdae2897ee4bc030ba2"}, + {file = "authlib-1.6.0-py2.py3-none-any.whl", hash = "sha256:91685589498f79e8655e8a8947431ad6288831d643f11c55c2143ffcc738048d"}, + {file = "authlib-1.6.0.tar.gz", hash = "sha256:4367d32031b7af175ad3a323d571dc7257b7099d55978087ceae4a0d88cd3210"}, ] [package.dependencies] @@ -54,34 +51,31 @@ files = [ {file = "babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d"}, ] -[package.dependencies] -pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} - [package.extras] dev = ["backports.zoneinfo ; python_version < \"3.9\"", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata ; sys_platform == \"win32\""] [[package]] name = "cachetools" -version = "5.5.2" +version = "6.1.0" description = "Extensible memoizing collections and decorators" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "cachetools-5.5.2-py3-none-any.whl", hash = "sha256:d26a22bcc62eb95c3beabd9f1ee5e820d3d2704fe2967cbe350e20c8ffcd3f0a"}, - {file = "cachetools-5.5.2.tar.gz", hash = "sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4"}, + {file = "cachetools-6.1.0-py3-none-any.whl", hash = "sha256:1c7bb3cf9193deaf3508b7c5f2a79986c13ea38965c5adcff1f84519cf39163e"}, + {file = "cachetools-6.1.0.tar.gz", hash = "sha256:b4c4f404392848db3ce7aac34950d17be4d864da4b8b66911008e430bc544587"}, ] [[package]] name = "certifi" -version = "2025.1.31" +version = "2025.7.9" description = "Python package for providing Mozilla's CA Bundle." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" groups = ["main", "dev"] files = [ - {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, - {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, + {file = "certifi-2025.7.9-py3-none-any.whl", hash = "sha256:d842783a14f8fdd646895ac26f719a061408834473cfc10203f6a575beb15d39"}, + {file = "certifi-2025.7.9.tar.gz", hash = "sha256:c1d2ec05395148ee10cf672ffc28cd37ea0ab0d99f9cc74c43e588cbd111b079"}, ] [[package]] @@ -179,104 +173,104 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.4.1" +version = "3.4.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" groups = ["main", "dev"] files = [ - {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, - {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, - {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, - {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, - {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, - {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, - {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, - {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, - {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, - {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a"}, + {file = "charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a"}, + {file = "charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c"}, + {file = "charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7"}, + {file = "charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cad5f45b3146325bb38d6855642f6fd609c3f7cad4dbaf75549bf3b904d3184"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2680962a4848b3c4f155dc2ee64505a9c57186d0d56b43123b17ca3de18f0fa"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:36b31da18b8890a76ec181c3cf44326bf2c48e36d393ca1b72b3f484113ea344"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4074c5a429281bf056ddd4c5d3b740ebca4d43ffffe2ef4bf4d2d05114299da"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9e36a97bee9b86ef9a1cf7bb96747eb7a15c2f22bdb5b516434b00f2a599f02"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:1b1bde144d98e446b056ef98e59c256e9294f6b74d7af6846bf5ffdafd687a7d"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:915f3849a011c1f593ab99092f3cecfcb4d65d8feb4a64cf1bf2d22074dc0ec4"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:fb707f3e15060adf5b7ada797624a6c6e0138e2a26baa089df64c68ee98e040f"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:25a23ea5c7edc53e0f29bae2c44fcb5a1aa10591aae107f2a2b2583a9c5cbc64"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:770cab594ecf99ae64c236bc9ee3439c3f46be49796e265ce0cc8bc17b10294f"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-win32.whl", hash = "sha256:6a0289e4589e8bdfef02a80478f1dfcb14f0ab696b5a00e1f4b8a14a307a3c58"}, + {file = "charset_normalizer-3.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6fc1f5b51fa4cecaa18f2bd7a003f3dd039dd615cd69a2afd6d3b19aed6775f2"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:76af085e67e56c8816c3ccf256ebd136def2ed9654525348cfa744b6802b69eb"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e45ba65510e2647721e35323d6ef54c7974959f6081b58d4ef5d87c60c84919a"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:046595208aae0120559a67693ecc65dd75d46f7bf687f159127046628178dc45"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75d10d37a47afee94919c4fab4c22b9bc2a8bf7d4f46f87363bcf0573f3ff4f5"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6333b3aa5a12c26b2a4d4e7335a28f1475e0e5e17d69d55141ee3cab736f66d1"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8323a9b031aa0393768b87f04b4164a40037fb2a3c11ac06a03ffecd3618027"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:24498ba8ed6c2e0b56d4acbf83f2d989720a93b41d712ebd4f4979660db4417b"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:844da2b5728b5ce0e32d863af26f32b5ce61bc4273a9c720a9f3aa9df73b1455"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:65c981bdbd3f57670af8b59777cbfae75364b483fa8a9f420f08094531d54a01"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3c21d4fca343c805a52c0c78edc01e3477f6dd1ad7c47653241cf2a206d4fc58"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:dc7039885fa1baf9be153a0626e337aa7ec8bf96b0128605fb0d77788ddc1681"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-win32.whl", hash = "sha256:8272b73e1c5603666618805fe821edba66892e2870058c94c53147602eab29c7"}, + {file = "charset_normalizer-3.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:70f7172939fdf8790425ba31915bfbe8335030f05b9913d7ae00a87d4395620a"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:005fa3432484527f9732ebd315da8da8001593e2cf46a3d817669f062c3d9ed4"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e92fca20c46e9f5e1bb485887d074918b13543b1c2a1185e69bb8d17ab6236a7"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50bf98d5e563b83cc29471fa114366e6806bc06bc7a25fd59641e41445327836"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:721c76e84fe669be19c5791da68232ca2e05ba5185575086e384352e2c309597"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d8fd25b7f4675d0c47cf95b594d4e7b158aca33b76aa63d07186e13c0e0ab7"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3daeac64d5b371dea99714f08ffc2c208522ec6b06fbc7866a450dd446f5c0f"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dccab8d5fa1ef9bfba0590ecf4d46df048d18ffe3eec01eeb73a42e0d9e7a8ba"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:aaf27faa992bfee0264dc1f03f4c75e9fcdda66a519db6b957a3f826e285cf12"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:eb30abc20df9ab0814b5a2524f23d75dcf83cde762c161917a2b4b7b55b1e518"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c72fbbe68c6f32f251bdc08b8611c7b3060612236e960ef848e0a517ddbe76c5"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:982bb1e8b4ffda883b3d0a521e23abcd6fd17418f6d2c4118d257a10199c0ce3"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-win32.whl", hash = "sha256:43e0933a0eff183ee85833f341ec567c0980dae57c464d8a508e1b2ceb336471"}, + {file = "charset_normalizer-3.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:d11b54acf878eef558599658b0ffca78138c8c3655cf4f3a4a673c437e67732e"}, + {file = "charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0"}, + {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, ] [[package]] @@ -293,84 +287,79 @@ files = [ [[package]] name = "coverage" -version = "7.6.1" +version = "7.9.2" description = "Code coverage measurement for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"}, - {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"}, - {file = "coverage-7.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61c0abb4c85b095a784ef23fdd4aede7a2628478e7baba7c5e3deba61070a02"}, - {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd21f6ae3f08b41004dfb433fa895d858f3f5979e7762d052b12aef444e29afc"}, - {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f59d57baca39b32db42b83b2a7ba6f47ad9c394ec2076b084c3f029b7afca23"}, - {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a1ac0ae2b8bd743b88ed0502544847c3053d7171a3cff9228af618a068ed9c34"}, - {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e6a08c0be454c3b3beb105c0596ebdc2371fab6bb90c0c0297f4e58fd7e1012c"}, - {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f5796e664fe802da4f57a168c85359a8fbf3eab5e55cd4e4569fbacecc903959"}, - {file = "coverage-7.6.1-cp310-cp310-win32.whl", hash = "sha256:7bb65125fcbef8d989fa1dd0e8a060999497629ca5b0efbca209588a73356232"}, - {file = "coverage-7.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:3115a95daa9bdba70aea750db7b96b37259a81a709223c8448fa97727d546fe0"}, - {file = "coverage-7.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7dea0889685db8550f839fa202744652e87c60015029ce3f60e006f8c4462c93"}, - {file = "coverage-7.6.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed37bd3c3b063412f7620464a9ac1314d33100329f39799255fb8d3027da50d3"}, - {file = "coverage-7.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85f5e9a5f8b73e2350097c3756ef7e785f55bd71205defa0bfdaf96c31616ff"}, - {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bc572be474cafb617672c43fe989d6e48d3c83af02ce8de73fff1c6bb3c198d"}, - {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0420b573964c760df9e9e86d1a9a622d0d27f417e1a949a8a66dd7bcee7bc6"}, - {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f4aa8219db826ce6be7099d559f8ec311549bfc4046f7f9fe9b5cea5c581c56"}, - {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fc5a77d0c516700ebad189b587de289a20a78324bc54baee03dd486f0855d234"}, - {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b48f312cca9621272ae49008c7f613337c53fadca647d6384cc129d2996d1133"}, - {file = "coverage-7.6.1-cp311-cp311-win32.whl", hash = "sha256:1125ca0e5fd475cbbba3bb67ae20bd2c23a98fac4e32412883f9bcbaa81c314c"}, - {file = "coverage-7.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:8ae539519c4c040c5ffd0632784e21b2f03fc1340752af711f33e5be83a9d6c6"}, - {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, - {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, - {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, - {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, - {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, - {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, - {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, - {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, - {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, - {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, - {file = "coverage-7.6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6db04803b6c7291985a761004e9060b2bca08da6d04f26a7f2294b8623a0c1a0"}, - {file = "coverage-7.6.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f1adfc8ac319e1a348af294106bc6a8458a0f1633cc62a1446aebc30c5fa186a"}, - {file = "coverage-7.6.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a95324a9de9650a729239daea117df21f4b9868ce32e63f8b650ebe6cef5595b"}, - {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b43c03669dc4618ec25270b06ecd3ee4fa94c7f9b3c14bae6571ca00ef98b0d3"}, - {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8929543a7192c13d177b770008bc4e8119f2e1f881d563fc6b6305d2d0ebe9de"}, - {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a09ece4a69cf399510c8ab25e0950d9cf2b42f7b3cb0374f95d2e2ff594478a6"}, - {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9054a0754de38d9dbd01a46621636689124d666bad1936d76c0341f7d71bf569"}, - {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dbde0f4aa9a16fa4d754356a8f2e36296ff4d83994b2c9d8398aa32f222f989"}, - {file = "coverage-7.6.1-cp38-cp38-win32.whl", hash = "sha256:da511e6ad4f7323ee5702e6633085fb76c2f893aaf8ce4c51a0ba4fc07580ea7"}, - {file = "coverage-7.6.1-cp38-cp38-win_amd64.whl", hash = "sha256:3f1156e3e8f2872197af3840d8ad307a9dd18e615dc64d9ee41696f287c57ad8"}, - {file = "coverage-7.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abd5fd0db5f4dc9289408aaf34908072f805ff7792632250dcb36dc591d24255"}, - {file = "coverage-7.6.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:547f45fa1a93154bd82050a7f3cddbc1a7a4dd2a9bf5cb7d06f4ae29fe94eaf8"}, - {file = "coverage-7.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645786266c8f18a931b65bfcefdbf6952dd0dea98feee39bd188607a9d307ed2"}, - {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e0b2df163b8ed01d515807af24f63de04bebcecbd6c3bfeff88385789fdf75a"}, - {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:609b06f178fe8e9f89ef676532760ec0b4deea15e9969bf754b37f7c40326dbc"}, - {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:702855feff378050ae4f741045e19a32d57d19f3e0676d589df0575008ea5004"}, - {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2bdb062ea438f22d99cba0d7829c2ef0af1d768d1e4a4f528087224c90b132cb"}, - {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c56863d44bd1c4fe2abb8a4d6f5371d197f1ac0ebdee542f07f35895fc07f36"}, - {file = "coverage-7.6.1-cp39-cp39-win32.whl", hash = "sha256:6e2cd258d7d927d09493c8df1ce9174ad01b381d4729a9d8d4e38670ca24774c"}, - {file = "coverage-7.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:06a737c882bd26d0d6ee7269b20b12f14a8704807a01056c80bb881a4b2ce6ca"}, - {file = "coverage-7.6.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:e9a6e0eb86070e8ccaedfbd9d38fec54864f3125ab95419970575b42af7541df"}, - {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, + {file = "coverage-7.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:66283a192a14a3854b2e7f3418d7db05cdf411012ab7ff5db98ff3b181e1f912"}, + {file = "coverage-7.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4e01d138540ef34fcf35c1aa24d06c3de2a4cffa349e29a10056544f35cca15f"}, + {file = "coverage-7.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f22627c1fe2745ee98d3ab87679ca73a97e75ca75eb5faee48660d060875465f"}, + {file = "coverage-7.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b1c2d8363247b46bd51f393f86c94096e64a1cf6906803fa8d5a9d03784bdbf"}, + {file = "coverage-7.9.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c10c882b114faf82dbd33e876d0cbd5e1d1ebc0d2a74ceef642c6152f3f4d547"}, + {file = "coverage-7.9.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:de3c0378bdf7066c3988d66cd5232d161e933b87103b014ab1b0b4676098fa45"}, + {file = "coverage-7.9.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:1e2f097eae0e5991e7623958a24ced3282676c93c013dde41399ff63e230fcf2"}, + {file = "coverage-7.9.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28dc1f67e83a14e7079b6cea4d314bc8b24d1aed42d3582ff89c0295f09b181e"}, + {file = "coverage-7.9.2-cp310-cp310-win32.whl", hash = "sha256:bf7d773da6af9e10dbddacbf4e5cab13d06d0ed93561d44dae0188a42c65be7e"}, + {file = "coverage-7.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:0c0378ba787681ab1897f7c89b415bd56b0b2d9a47e5a3d8dc0ea55aac118d6c"}, + {file = "coverage-7.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a7a56a2964a9687b6aba5b5ced6971af308ef6f79a91043c05dd4ee3ebc3e9ba"}, + {file = "coverage-7.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:123d589f32c11d9be7fe2e66d823a236fe759b0096f5db3fb1b75b2fa414a4fa"}, + {file = "coverage-7.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:333b2e0ca576a7dbd66e85ab402e35c03b0b22f525eed82681c4b866e2e2653a"}, + {file = "coverage-7.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:326802760da234baf9f2f85a39e4a4b5861b94f6c8d95251f699e4f73b1835dc"}, + {file = "coverage-7.9.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19e7be4cfec248df38ce40968c95d3952fbffd57b400d4b9bb580f28179556d2"}, + {file = "coverage-7.9.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0b4a4cb73b9f2b891c1788711408ef9707666501ba23684387277ededab1097c"}, + {file = "coverage-7.9.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:2c8937fa16c8c9fbbd9f118588756e7bcdc7e16a470766a9aef912dd3f117dbd"}, + {file = "coverage-7.9.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:42da2280c4d30c57a9b578bafd1d4494fa6c056d4c419d9689e66d775539be74"}, + {file = "coverage-7.9.2-cp311-cp311-win32.whl", hash = "sha256:14fa8d3da147f5fdf9d298cacc18791818f3f1a9f542c8958b80c228320e90c6"}, + {file = "coverage-7.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:549cab4892fc82004f9739963163fd3aac7a7b0df430669b75b86d293d2df2a7"}, + {file = "coverage-7.9.2-cp311-cp311-win_arm64.whl", hash = "sha256:c2667a2b913e307f06aa4e5677f01a9746cd08e4b35e14ebcde6420a9ebb4c62"}, + {file = "coverage-7.9.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ae9eb07f1cfacd9cfe8eaee6f4ff4b8a289a668c39c165cd0c8548484920ffc0"}, + {file = "coverage-7.9.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9ce85551f9a1119f02adc46d3014b5ee3f765deac166acf20dbb851ceb79b6f3"}, + {file = "coverage-7.9.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8f6389ac977c5fb322e0e38885fbbf901743f79d47f50db706e7644dcdcb6e1"}, + {file = "coverage-7.9.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff0d9eae8cdfcd58fe7893b88993723583a6ce4dfbfd9f29e001922544f95615"}, + {file = "coverage-7.9.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fae939811e14e53ed8a9818dad51d434a41ee09df9305663735f2e2d2d7d959b"}, + {file = "coverage-7.9.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:31991156251ec202c798501e0a42bbdf2169dcb0f137b1f5c0f4267f3fc68ef9"}, + {file = "coverage-7.9.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d0d67963f9cbfc7c7f96d4ac74ed60ecbebd2ea6eeb51887af0f8dce205e545f"}, + {file = "coverage-7.9.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:49b752a2858b10580969ec6af6f090a9a440a64a301ac1528d7ca5f7ed497f4d"}, + {file = "coverage-7.9.2-cp312-cp312-win32.whl", hash = "sha256:88d7598b8ee130f32f8a43198ee02edd16d7f77692fa056cb779616bbea1b355"}, + {file = "coverage-7.9.2-cp312-cp312-win_amd64.whl", hash = "sha256:9dfb070f830739ee49d7c83e4941cc767e503e4394fdecb3b54bfdac1d7662c0"}, + {file = "coverage-7.9.2-cp312-cp312-win_arm64.whl", hash = "sha256:4e2c058aef613e79df00e86b6d42a641c877211384ce5bd07585ed7ba71ab31b"}, + {file = "coverage-7.9.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:985abe7f242e0d7bba228ab01070fde1d6c8fa12f142e43debe9ed1dde686038"}, + {file = "coverage-7.9.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82c3939264a76d44fde7f213924021ed31f55ef28111a19649fec90c0f109e6d"}, + {file = "coverage-7.9.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae5d563e970dbe04382f736ec214ef48103d1b875967c89d83c6e3f21706d5b3"}, + {file = "coverage-7.9.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bdd612e59baed2a93c8843c9a7cb902260f181370f1d772f4842987535071d14"}, + {file = "coverage-7.9.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:256ea87cb2a1ed992bcdfc349d8042dcea1b80436f4ddf6e246d6bee4b5d73b6"}, + {file = "coverage-7.9.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f44ae036b63c8ea432f610534a2668b0c3aee810e7037ab9d8ff6883de480f5b"}, + {file = "coverage-7.9.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:82d76ad87c932935417a19b10cfe7abb15fd3f923cfe47dbdaa74ef4e503752d"}, + {file = "coverage-7.9.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:619317bb86de4193debc712b9e59d5cffd91dc1d178627ab2a77b9870deb2868"}, + {file = "coverage-7.9.2-cp313-cp313-win32.whl", hash = "sha256:0a07757de9feb1dfafd16ab651e0f628fd7ce551604d1bf23e47e1ddca93f08a"}, + {file = "coverage-7.9.2-cp313-cp313-win_amd64.whl", hash = "sha256:115db3d1f4d3f35f5bb021e270edd85011934ff97c8797216b62f461dd69374b"}, + {file = "coverage-7.9.2-cp313-cp313-win_arm64.whl", hash = "sha256:48f82f889c80af8b2a7bb6e158d95a3fbec6a3453a1004d04e4f3b5945a02694"}, + {file = "coverage-7.9.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:55a28954545f9d2f96870b40f6c3386a59ba8ed50caf2d949676dac3ecab99f5"}, + {file = "coverage-7.9.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:cdef6504637731a63c133bb2e6f0f0214e2748495ec15fe42d1e219d1b133f0b"}, + {file = "coverage-7.9.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcd5ebe66c7a97273d5d2ddd4ad0ed2e706b39630ed4b53e713d360626c3dbb3"}, + {file = "coverage-7.9.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9303aed20872d7a3c9cb39c5d2b9bdbe44e3a9a1aecb52920f7e7495410dfab8"}, + {file = "coverage-7.9.2-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc18ea9e417a04d1920a9a76fe9ebd2f43ca505b81994598482f938d5c315f46"}, + {file = "coverage-7.9.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6406cff19880aaaadc932152242523e892faff224da29e241ce2fca329866584"}, + {file = "coverage-7.9.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:2d0d4f6ecdf37fcc19c88fec3e2277d5dee740fb51ffdd69b9579b8c31e4232e"}, + {file = "coverage-7.9.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c33624f50cf8de418ab2b4d6ca9eda96dc45b2c4231336bac91454520e8d1fac"}, + {file = "coverage-7.9.2-cp313-cp313t-win32.whl", hash = "sha256:1df6b76e737c6a92210eebcb2390af59a141f9e9430210595251fbaf02d46926"}, + {file = "coverage-7.9.2-cp313-cp313t-win_amd64.whl", hash = "sha256:f5fd54310b92741ebe00d9c0d1d7b2b27463952c022da6d47c175d246a98d1bd"}, + {file = "coverage-7.9.2-cp313-cp313t-win_arm64.whl", hash = "sha256:c48c2375287108c887ee87d13b4070a381c6537d30e8487b24ec721bf2a781cb"}, + {file = "coverage-7.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ddc39510ac922a5c4c27849b739f875d3e1d9e590d1e7b64c98dadf037a16cce"}, + {file = "coverage-7.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a535c0c7364acd55229749c2b3e5eebf141865de3a8f697076a3291985f02d30"}, + {file = "coverage-7.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df0f9ef28e0f20c767ccdccfc5ae5f83a6f4a2fbdfbcbcc8487a8a78771168c8"}, + {file = "coverage-7.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f3da12e0ccbcb348969221d29441ac714bbddc4d74e13923d3d5a7a0bebef7a"}, + {file = "coverage-7.9.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a17eaf46f56ae0f870f14a3cbc2e4632fe3771eab7f687eda1ee59b73d09fe4"}, + {file = "coverage-7.9.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:669135a9d25df55d1ed56a11bf555f37c922cf08d80799d4f65d77d7d6123fcf"}, + {file = "coverage-7.9.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9d3a700304d01a627df9db4322dc082a0ce1e8fc74ac238e2af39ced4c083193"}, + {file = "coverage-7.9.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:71ae8b53855644a0b1579d4041304ddc9995c7b21c8a1f16753c4d8903b4dfed"}, + {file = "coverage-7.9.2-cp39-cp39-win32.whl", hash = "sha256:dd7a57b33b5cf27acb491e890720af45db05589a80c1ffc798462a765be6d4d7"}, + {file = "coverage-7.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:f65bb452e579d5540c8b37ec105dd54d8b9307b07bcaa186818c104ffda22441"}, + {file = "coverage-7.9.2-pp39.pp310.pp311-none-any.whl", hash = "sha256:8a1166db2fb62473285bcb092f586e081e92656c7dfa8e9f62b4d39d7e6b5050"}, + {file = "coverage-7.9.2-py3-none-any.whl", hash = "sha256:e425cd5b00f6fc0ed7cdbd766c70be8baab4b7839e4d4fe5fac48581dd968ea4"}, + {file = "coverage-7.9.2.tar.gz", hash = "sha256:997024fa51e3290264ffd7492ec97d0690293ccd2b45a6cd7d82d945a4a80c8b"}, ] [package.dependencies] @@ -381,47 +370,49 @@ toml = ["tomli ; python_full_version <= \"3.11.0a6\""] [[package]] name = "cryptography" -version = "44.0.2" +version = "44.0.3" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = "!=3.9.0,!=3.9.1,>=3.7" groups = ["main"] files = [ - {file = "cryptography-44.0.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:efcfe97d1b3c79e486554efddeb8f6f53a4cdd4cf6086642784fa31fc384e1d7"}, - {file = "cryptography-44.0.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29ecec49f3ba3f3849362854b7253a9f59799e3763b0c9d0826259a88efa02f1"}, - {file = "cryptography-44.0.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc821e161ae88bfe8088d11bb39caf2916562e0a2dc7b6d56714a48b784ef0bb"}, - {file = "cryptography-44.0.2-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:3c00b6b757b32ce0f62c574b78b939afab9eecaf597c4d624caca4f9e71e7843"}, - {file = "cryptography-44.0.2-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7bdcd82189759aba3816d1f729ce42ffded1ac304c151d0a8e89b9996ab863d5"}, - {file = "cryptography-44.0.2-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:4973da6ca3db4405c54cd0b26d328be54c7747e89e284fcff166132eb7bccc9c"}, - {file = "cryptography-44.0.2-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4e389622b6927d8133f314949a9812972711a111d577a5d1f4bee5e58736b80a"}, - {file = "cryptography-44.0.2-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:f514ef4cd14bb6fb484b4a60203e912cfcb64f2ab139e88c2274511514bf7308"}, - {file = "cryptography-44.0.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1bc312dfb7a6e5d66082c87c34c8a62176e684b6fe3d90fcfe1568de675e6688"}, - {file = "cryptography-44.0.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3b721b8b4d948b218c88cb8c45a01793483821e709afe5f622861fc6182b20a7"}, - {file = "cryptography-44.0.2-cp37-abi3-win32.whl", hash = "sha256:51e4de3af4ec3899d6d178a8c005226491c27c4ba84101bfb59c901e10ca9f79"}, - {file = "cryptography-44.0.2-cp37-abi3-win_amd64.whl", hash = "sha256:c505d61b6176aaf982c5717ce04e87da5abc9a36a5b39ac03905c4aafe8de7aa"}, - {file = "cryptography-44.0.2-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:8e0ddd63e6bf1161800592c71ac794d3fb8001f2caebe0966e77c5234fa9efc3"}, - {file = "cryptography-44.0.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81276f0ea79a208d961c433a947029e1a15948966658cf6710bbabb60fcc2639"}, - {file = "cryptography-44.0.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a1e657c0f4ea2a23304ee3f964db058c9e9e635cc7019c4aa21c330755ef6fd"}, - {file = "cryptography-44.0.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:6210c05941994290f3f7f175a4a57dbbb2afd9273657614c506d5976db061181"}, - {file = "cryptography-44.0.2-cp39-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d1c3572526997b36f245a96a2b1713bf79ce99b271bbcf084beb6b9b075f29ea"}, - {file = "cryptography-44.0.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:b042d2a275c8cee83a4b7ae30c45a15e6a4baa65a179a0ec2d78ebb90e4f6699"}, - {file = "cryptography-44.0.2-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:d03806036b4f89e3b13b6218fefea8d5312e450935b1a2d55f0524e2ed7c59d9"}, - {file = "cryptography-44.0.2-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:c7362add18b416b69d58c910caa217f980c5ef39b23a38a0880dfd87bdf8cd23"}, - {file = "cryptography-44.0.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:8cadc6e3b5a1f144a039ea08a0bdb03a2a92e19c46be3285123d32029f40a922"}, - {file = "cryptography-44.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6f101b1f780f7fc613d040ca4bdf835c6ef3b00e9bd7125a4255ec574c7916e4"}, - {file = "cryptography-44.0.2-cp39-abi3-win32.whl", hash = "sha256:3dc62975e31617badc19a906481deacdeb80b4bb454394b4098e3f2525a488c5"}, - {file = "cryptography-44.0.2-cp39-abi3-win_amd64.whl", hash = "sha256:5f6f90b72d8ccadb9c6e311c775c8305381db88374c65fa1a68250aa8a9cb3a6"}, - {file = "cryptography-44.0.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:af4ff3e388f2fa7bff9f7f2b31b87d5651c45731d3e8cfa0944be43dff5cfbdb"}, - {file = "cryptography-44.0.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:0529b1d5a0105dd3731fa65680b45ce49da4d8115ea76e9da77a875396727b41"}, - {file = "cryptography-44.0.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:7ca25849404be2f8e4b3c59483d9d3c51298a22c1c61a0e84415104dacaf5562"}, - {file = "cryptography-44.0.2-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:268e4e9b177c76d569e8a145a6939eca9a5fec658c932348598818acf31ae9a5"}, - {file = "cryptography-44.0.2-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:9eb9d22b0a5d8fd9925a7764a054dca914000607dff201a24c791ff5c799e1fa"}, - {file = "cryptography-44.0.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:2bf7bf75f7df9715f810d1b038870309342bff3069c5bd8c6b96128cb158668d"}, - {file = "cryptography-44.0.2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:909c97ab43a9c0c0b0ada7a1281430e4e5ec0458e6d9244c0e821bbf152f061d"}, - {file = "cryptography-44.0.2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:96e7a5e9d6e71f9f4fca8eebfd603f8e86c5225bb18eb621b2c1e50b290a9471"}, - {file = "cryptography-44.0.2-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:d1b3031093a366ac767b3feb8bcddb596671b3aaff82d4050f984da0c248b615"}, - {file = "cryptography-44.0.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:04abd71114848aa25edb28e225ab5f268096f44cf0127f3d36975bdf1bdf3390"}, - {file = "cryptography-44.0.2.tar.gz", hash = "sha256:c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0"}, + {file = "cryptography-44.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:962bc30480a08d133e631e8dfd4783ab71cc9e33d5d7c1e192f0b7c06397bb88"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffc61e8f3bf5b60346d89cd3d37231019c17a081208dfbbd6e1605ba03fa137"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58968d331425a6f9eedcee087f77fd3c927c88f55368f43ff7e0a19891f2642c"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e28d62e59a4dbd1d22e747f57d4f00c459af22181f0b2f787ea83f5a876d7c76"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:af653022a0c25ef2e3ffb2c673a50e5a0d02fecc41608f4954176f1933b12359"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:157f1f3b8d941c2bd8f3ffee0af9b049c9665c39d3da9db2dc338feca5e98a43"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:c6cd67722619e4d55fdb42ead64ed8843d64638e9c07f4011163e46bc512cf01"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:b424563394c369a804ecbee9b06dfb34997f19d00b3518e39f83a5642618397d"}, + {file = "cryptography-44.0.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c91fc8e8fd78af553f98bc7f2a1d8db977334e4eea302a4bfd75b9461c2d8904"}, + {file = "cryptography-44.0.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:25cd194c39fa5a0aa4169125ee27d1172097857b27109a45fadc59653ec06f44"}, + {file = "cryptography-44.0.3-cp37-abi3-win32.whl", hash = "sha256:3be3f649d91cb182c3a6bd336de8b61a0a71965bd13d1a04a0e15b39c3d5809d"}, + {file = "cryptography-44.0.3-cp37-abi3-win_amd64.whl", hash = "sha256:3883076d5c4cc56dbef0b898a74eb6992fdac29a7b9013870b34efe4ddb39a0d"}, + {file = "cryptography-44.0.3-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:5639c2b16764c6f76eedf722dbad9a0914960d3489c0cc38694ddf9464f1bb2f"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3ffef566ac88f75967d7abd852ed5f182da252d23fac11b4766da3957766759"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:192ed30fac1728f7587c6f4613c29c584abdc565d7417c13904708db10206645"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:7d5fe7195c27c32a64955740b949070f21cba664604291c298518d2e255931d2"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3f07943aa4d7dad689e3bb1638ddc4944cc5e0921e3c227486daae0e31a05e54"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cb90f60e03d563ca2445099edf605c16ed1d5b15182d21831f58460c48bffb93"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:ab0b005721cc0039e885ac3503825661bd9810b15d4f374e473f8c89b7d5460c"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:3bb0847e6363c037df8f6ede57d88eaf3410ca2267fb12275370a76f85786a6f"}, + {file = "cryptography-44.0.3-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b0cc66c74c797e1db750aaa842ad5b8b78e14805a9b5d1348dc603612d3e3ff5"}, + {file = "cryptography-44.0.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6866df152b581f9429020320e5eb9794c8780e90f7ccb021940d7f50ee00ae0b"}, + {file = "cryptography-44.0.3-cp39-abi3-win32.whl", hash = "sha256:c138abae3a12a94c75c10499f1cbae81294a6f983b3af066390adee73f433028"}, + {file = "cryptography-44.0.3-cp39-abi3-win_amd64.whl", hash = "sha256:5d186f32e52e66994dce4f766884bcb9c68b8da62d61d9d215bfe5fb56d21334"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cad399780053fb383dc067475135e41c9fe7d901a97dd5d9c5dfb5611afc0d7d"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:21a83f6f35b9cc656d71b5de8d519f566df01e660ac2578805ab245ffd8523f8"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:fc3c9babc1e1faefd62704bb46a69f359a9819eb0292e40df3fb6e3574715cd4"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:e909df4053064a97f1e6565153ff8bb389af12c5c8d29c343308760890560aff"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:dad80b45c22e05b259e33ddd458e9e2ba099c86ccf4e88db7bbab4b747b18d06"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:479d92908277bed6e1a1c69b277734a7771c2b78633c224445b5c60a9f4bc1d9"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:896530bc9107b226f265effa7ef3f21270f18a2026bc09fed1ebd7b66ddf6375"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:9b4d4a5dbee05a2c390bf212e78b99434efec37b17a4bff42f50285c5c8c9647"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:02f55fb4f8b79c1221b0961488eaae21015b69b210e18c386b69de182ebb1259"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:dd3db61b8fe5be220eee484a17233287d0be6932d056cf5738225b9c05ef4fff"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:978631ec51a6bbc0b7e58f23b68a8ce9e5f09721940933e9c217068388789fe5"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:5d20cc348cca3a8aa7312f42ab953a56e15323800ca3ab0706b8cd452a3a056c"}, + {file = "cryptography-44.0.3.tar.gz", hash = "sha256:fe19d8bc5536a91a24a8133328880a41831b6c5df54599a8417b62fe015d3053"}, ] [package.dependencies] @@ -434,7 +425,7 @@ nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2) ; python_version >= \"3.8\""] pep8test = ["check-sdist ; python_version >= \"3.8\"", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] sdist = ["build (>=1.0.0)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi (>=2024)", "cryptography-vectors (==44.0.2)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] +test = ["certifi (>=2024)", "cryptography-vectors (==44.0.3)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] test-randomorder = ["pytest-randomly"] [[package]] @@ -501,54 +492,40 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.2" +version = "1.3.0" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["dev"] markers = "python_version < \"3.11\"" files = [ - {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, - {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, + {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"}, + {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"}, ] +[package.dependencies] +typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} + [package.extras] test = ["pytest (>=6)"] [[package]] name = "filelock" -version = "3.16.1" +version = "3.18.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, - {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, + {file = "filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de"}, + {file = "filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] -[[package]] -name = "flake8" -version = "5.0.4" -description = "the modular source code checker: pep8 pyflakes and co" -optional = false -python-versions = ">=3.6.1" -groups = ["dev"] -files = [ - {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, - {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, -] - -[package.dependencies] -mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.9.0,<2.10.0" -pyflakes = ">=2.5.0,<2.6.0" - [[package]] name = "idna" version = "3.10" @@ -578,15 +555,15 @@ files = [ [[package]] name = "importlib-metadata" -version = "8.5.0" +version = "8.7.0" description = "Read metadata from Python packages" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] markers = "python_version < \"3.10\"" files = [ - {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, - {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, + {file = "importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd"}, + {file = "importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000"}, ] [package.dependencies] @@ -598,7 +575,7 @@ cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib_resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] @@ -633,136 +610,120 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "markupsafe" -version = "2.1.5" +version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, - {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, -] - -[[package]] -name = "mccabe" -version = "0.7.0" -description = "McCabe checker, plugin for flake8" -optional = false -python-versions = ">=3.6" -groups = ["dev"] -files = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"}, + {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"}, + {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"}, + {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"}, + {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"}, + {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"}, + {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"}, + {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"}, ] [[package]] name = "mypy" -version = "1.14.1" +version = "1.16.1" description = "Optional static typing for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, - {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, - {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d"}, - {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b"}, - {file = "mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427"}, - {file = "mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f"}, - {file = "mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c"}, - {file = "mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1"}, - {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8"}, - {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f"}, - {file = "mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1"}, - {file = "mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae"}, - {file = "mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14"}, - {file = "mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9"}, - {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11"}, - {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e"}, - {file = "mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89"}, - {file = "mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b"}, - {file = "mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255"}, - {file = "mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34"}, - {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a"}, - {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9"}, - {file = "mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd"}, - {file = "mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107"}, - {file = "mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31"}, - {file = "mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6"}, - {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319"}, - {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac"}, - {file = "mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b"}, - {file = "mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837"}, - {file = "mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35"}, - {file = "mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc"}, - {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9"}, - {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb"}, - {file = "mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60"}, - {file = "mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c"}, - {file = "mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1"}, - {file = "mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6"}, + {file = "mypy-1.16.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b4f0fed1022a63c6fec38f28b7fc77fca47fd490445c69d0a66266c59dd0b88a"}, + {file = "mypy-1.16.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:86042bbf9f5a05ea000d3203cf87aa9d0ccf9a01f73f71c58979eb9249f46d72"}, + {file = "mypy-1.16.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ea7469ee5902c95542bea7ee545f7006508c65c8c54b06dc2c92676ce526f3ea"}, + {file = "mypy-1.16.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:352025753ef6a83cb9e7f2427319bb7875d1fdda8439d1e23de12ab164179574"}, + {file = "mypy-1.16.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ff9fa5b16e4c1364eb89a4d16bcda9987f05d39604e1e6c35378a2987c1aac2d"}, + {file = "mypy-1.16.1-cp310-cp310-win_amd64.whl", hash = "sha256:1256688e284632382f8f3b9e2123df7d279f603c561f099758e66dd6ed4e8bd6"}, + {file = "mypy-1.16.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:472e4e4c100062488ec643f6162dd0d5208e33e2f34544e1fc931372e806c0cc"}, + {file = "mypy-1.16.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ea16e2a7d2714277e349e24d19a782a663a34ed60864006e8585db08f8ad1782"}, + {file = "mypy-1.16.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08e850ea22adc4d8a4014651575567b0318ede51e8e9fe7a68f25391af699507"}, + {file = "mypy-1.16.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22d76a63a42619bfb90122889b903519149879ddbf2ba4251834727944c8baca"}, + {file = "mypy-1.16.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:2c7ce0662b6b9dc8f4ed86eb7a5d505ee3298c04b40ec13b30e572c0e5ae17c4"}, + {file = "mypy-1.16.1-cp311-cp311-win_amd64.whl", hash = "sha256:211287e98e05352a2e1d4e8759c5490925a7c784ddc84207f4714822f8cf99b6"}, + {file = "mypy-1.16.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:af4792433f09575d9eeca5c63d7d90ca4aeceda9d8355e136f80f8967639183d"}, + {file = "mypy-1.16.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:66df38405fd8466ce3517eda1f6640611a0b8e70895e2a9462d1d4323c5eb4b9"}, + {file = "mypy-1.16.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44e7acddb3c48bd2713994d098729494117803616e116032af192871aed80b79"}, + {file = "mypy-1.16.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0ab5eca37b50188163fa7c1b73c685ac66c4e9bdee4a85c9adac0e91d8895e15"}, + {file = "mypy-1.16.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb6229b2c9086247e21a83c309754b9058b438704ad2f6807f0d8227f6ebdd"}, + {file = "mypy-1.16.1-cp312-cp312-win_amd64.whl", hash = "sha256:1f0435cf920e287ff68af3d10a118a73f212deb2ce087619eb4e648116d1fe9b"}, + {file = "mypy-1.16.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ddc91eb318c8751c69ddb200a5937f1232ee8efb4e64e9f4bc475a33719de438"}, + {file = "mypy-1.16.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:87ff2c13d58bdc4bbe7dc0dedfe622c0f04e2cb2a492269f3b418df2de05c536"}, + {file = "mypy-1.16.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a7cfb0fe29fe5a9841b7c8ee6dffb52382c45acdf68f032145b75620acfbd6f"}, + {file = "mypy-1.16.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:051e1677689c9d9578b9c7f4d206d763f9bbd95723cd1416fad50db49d52f359"}, + {file = "mypy-1.16.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d5d2309511cc56c021b4b4e462907c2b12f669b2dbeb68300110ec27723971be"}, + {file = "mypy-1.16.1-cp313-cp313-win_amd64.whl", hash = "sha256:4f58ac32771341e38a853c5d0ec0dfe27e18e27da9cdb8bbc882d2249c71a3ee"}, + {file = "mypy-1.16.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7fc688329af6a287567f45cc1cefb9db662defeb14625213a5b7da6e692e2069"}, + {file = "mypy-1.16.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5e198ab3f55924c03ead626ff424cad1732d0d391478dfbf7bb97b34602395da"}, + {file = "mypy-1.16.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09aa4f91ada245f0a45dbc47e548fd94e0dd5a8433e0114917dc3b526912a30c"}, + {file = "mypy-1.16.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:13c7cd5b1cb2909aa318a90fd1b7e31f17c50b242953e7dd58345b2a814f6383"}, + {file = "mypy-1.16.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:58e07fb958bc5d752a280da0e890c538f1515b79a65757bbdc54252ba82e0b40"}, + {file = "mypy-1.16.1-cp39-cp39-win_amd64.whl", hash = "sha256:f895078594d918f93337a505f8add9bd654d1a24962b4c6ed9390e12531eb31b"}, + {file = "mypy-1.16.1-py3-none-any.whl", hash = "sha256:5fc2ac4027d0ef28d6ba69a0343737a23c4d1b83672bf38d1fe237bdc0643b37"}, + {file = "mypy-1.16.1.tar.gz", hash = "sha256:6bd00a0a2094841c5e47e7374bb42b83d64c527a502e3334e1173a0c24437bab"}, ] [package.dependencies] mypy_extensions = ">=1.0.0" +pathspec = ">=0.9.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing_extensions = ">=4.6.0" @@ -775,73 +736,73 @@ reports = ["lxml"] [[package]] name = "mypy-extensions" -version = "1.0.0" +version = "1.1.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false -python-versions = ">=3.5" +python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, + {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"}, + {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"}, ] [[package]] name = "packaging" -version = "24.2" +version = "25.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, - {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, + {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"}, + {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, ] [[package]] -name = "platformdirs" -version = "4.3.6" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +name = "pathspec" +version = "0.12.1" +description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, - {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] -[package.extras] -docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] -type = ["mypy (>=1.11.2)"] - [[package]] -name = "pluggy" -version = "1.5.0" -description = "plugin and hook calling mechanisms for python" +name = "platformdirs" +version = "4.3.8" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, - {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, + {file = "platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4"}, + {file = "platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc"}, ] [package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.14.1)"] [[package]] -name = "pycodestyle" -version = "2.9.1" -description = "Python style guide checker" +name = "pluggy" +version = "1.6.0" +description = "plugin and hook calling mechanisms for python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, - {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, + {file = "pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746"}, + {file = "pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3"}, ] +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["coverage", "pytest", "pytest-benchmark"] + [[package]] name = "pycparser" version = "2.22" @@ -857,20 +818,21 @@ files = [ [[package]] name = "pydantic" -version = "2.10.6" +version = "2.11.7" description = "Data validation using Python type hints" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic-2.10.6-py3-none-any.whl", hash = "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584"}, - {file = "pydantic-2.10.6.tar.gz", hash = "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236"}, + {file = "pydantic-2.11.7-py3-none-any.whl", hash = "sha256:dde5df002701f6de26248661f6835bbe296a47bf73990135c7d07ce741b9623b"}, + {file = "pydantic-2.11.7.tar.gz", hash = "sha256:d989c3c6cb79469287b1569f7447a17848c998458d49ebe294e975b9baf0f0db"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.2" +pydantic-core = "2.33.2" typing-extensions = ">=4.12.2" +typing-inspection = ">=0.4.0" [package.extras] email = ["email-validator (>=2.0.0)"] @@ -878,139 +840,126 @@ timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows [[package]] name = "pydantic-core" -version = "2.27.2" +version = "2.33.2" description = "Core functionality for Pydantic validation and serialization" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, - {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, - {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, - {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, - {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, - {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, - {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, - {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, - {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, - {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, - {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, - {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, - {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, - {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, - {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, - {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, - {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, - {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2b3d326aaef0c0399d9afffeb6367d5e26ddc24d351dbc9c636840ac355dc5d8"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e5b2671f05ba48b94cb90ce55d8bdcaaedb8ba00cc5359f6810fc918713983d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0069c9acc3f3981b9ff4cdfaf088e98d83440a4c7ea1bc07460af3d4dc22e72d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d53b22f2032c42eaaf025f7c40c2e3b94568ae077a606f006d206a463bc69572"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0405262705a123b7ce9f0b92f123334d67b70fd1f20a9372b907ce1080c7ba02"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4b25d91e288e2c4e0662b8038a28c6a07eaac3e196cfc4ff69de4ea3db992a1b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bdfe4b3789761f3bcb4b1ddf33355a71079858958e3a552f16d5af19768fef2"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:efec8db3266b76ef9607c2c4c419bdb06bf335ae433b80816089ea7585816f6a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:031c57d67ca86902726e0fae2214ce6770bbe2f710dc33063187a68744a5ecac"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:f8de619080e944347f5f20de29a975c2d815d9ddd8be9b9b7268e2e3ef68605a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:73662edf539e72a9440129f231ed3757faab89630d291b784ca99237fb94db2b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win32.whl", hash = "sha256:0a39979dcbb70998b0e505fb1556a1d550a0781463ce84ebf915ba293ccb7e22"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win_amd64.whl", hash = "sha256:b0379a2b24882fef529ec3b4987cb5d003b9cda32256024e6fe1586ac45fc640"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4c5b0a576fb381edd6d27f0a85915c6daf2f8138dc5c267a57c08a62900758c7"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e799c050df38a639db758c617ec771fd8fb7a5f8eaaa4b27b101f266b216a246"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc46a01bf8d62f227d5ecee74178ffc448ff4e5197c756331f71efcc66dc980f"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a144d4f717285c6d9234a66778059f33a89096dfb9b39117663fd8413d582dcc"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73cf6373c21bc80b2e0dc88444f41ae60b2f070ed02095754eb5a01df12256de"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3dc625f4aa79713512d1976fe9f0bc99f706a9dee21dfd1810b4bbbf228d0e8a"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b21b5549499972441da4758d662aeea93f1923f953e9cbaff14b8b9565aef"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bdc25f3681f7b78572699569514036afe3c243bc3059d3942624e936ec93450e"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fe5b32187cbc0c862ee201ad66c30cf218e5ed468ec8dc1cf49dec66e160cc4d"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:bc7aee6f634a6f4a95676fcb5d6559a2c2a390330098dba5e5a5f28a2e4ada30"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:235f45e5dbcccf6bd99f9f472858849f73d11120d76ea8707115415f8e5ebebf"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win32.whl", hash = "sha256:6368900c2d3ef09b69cb0b913f9f8263b03786e5b2a387706c5afb66800efd51"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_amd64.whl", hash = "sha256:1e063337ef9e9820c77acc768546325ebe04ee38b08703244c1309cccc4f1bab"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_arm64.whl", hash = "sha256:6b99022f1d19bc32a4c2a0d544fc9a76e3be90f0b3f4af413f87d38749300e65"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a7ec89dc587667f22b6a0b6579c249fca9026ce7c333fc142ba42411fa243cdc"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3c6db6e52c6d70aa0d00d45cdb9b40f0433b96380071ea80b09277dba021ddf7"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e61206137cbc65e6d5256e1166f88331d3b6238e082d9f74613b9b765fb9025"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb8c529b2819c37140eb51b914153063d27ed88e3bdc31b71198a198e921e011"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c52b02ad8b4e2cf14ca7b3d918f3eb0ee91e63b3167c32591e57c4317e134f8f"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:96081f1605125ba0855dfda83f6f3df5ec90c61195421ba72223de35ccfb2f88"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f57a69461af2a5fa6e6bbd7a5f60d3b7e6cebb687f55106933188e79ad155c1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:572c7e6c8bb4774d2ac88929e3d1f12bc45714ae5ee6d9a788a9fb35e60bb04b"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:db4b41f9bd95fbe5acd76d89920336ba96f03e149097365afe1cb092fceb89a1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:fa854f5cf7e33842a892e5c73f45327760bc7bc516339fda888c75ae60edaeb6"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5f483cfb75ff703095c59e365360cb73e00185e01aaea067cd19acffd2ab20ea"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win32.whl", hash = "sha256:9cb1da0f5a471435a7bc7e439b8a728e8b61e59784b2af70d7c169f8dd8ae290"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_amd64.whl", hash = "sha256:f941635f2a3d96b2973e867144fde513665c87f13fe0e193c158ac51bfaaa7b2"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_arm64.whl", hash = "sha256:cca3868ddfaccfbc4bfb1d608e2ccaaebe0ae628e1416aeb9c4d88c001bb45ab"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1082dd3e2d7109ad8b7da48e1d4710c8d06c253cbc4a27c1cff4fbcaa97a9e3f"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f517ca031dfc037a9c07e748cefd8d96235088b83b4f4ba8939105d20fa1dcd6"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a9f2c9dd19656823cb8250b0724ee9c60a82f3cdf68a080979d13092a3b0fef"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2b0a451c263b01acebe51895bfb0e1cc842a5c666efe06cdf13846c7418caa9a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ea40a64d23faa25e62a70ad163571c0b342b8bf66d5fa612ac0dec4f069d916"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb2d542b4d66f9470e8065c5469ec676978d625a8b7a363f07d9a501a9cb36a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdac5d6ffa1b5a83bca06ffe7583f5576555e6c8b3a91fbd25ea7780f825f7d"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04a1a413977ab517154eebb2d326da71638271477d6ad87a769102f7c2488c56"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c8e7af2f4e0194c22b5b37205bfb293d166a7344a5b0d0eaccebc376546d77d5"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:5c92edd15cd58b3c2d34873597a1e20f13094f59cf88068adb18947df5455b4e"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:65132b7b4a1c0beded5e057324b7e16e10910c106d43675d9bd87d4f38dde162"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win32.whl", hash = "sha256:52fb90784e0a242bb96ec53f42196a17278855b0f31ac7c3cc6f5c1ec4811849"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_amd64.whl", hash = "sha256:c083a3bdd5a93dfe480f1125926afcdbf2917ae714bdb80b36d34318b2bec5d9"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_arm64.whl", hash = "sha256:e80b087132752f6b3d714f041ccf74403799d3b23a72722ea2e6ba2e892555b9"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61c18fba8e5e9db3ab908620af374db0ac1baa69f0f32df4f61ae23f15e586ac"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95237e53bb015f67b63c91af7518a62a8660376a6a0db19b89acc77a4d6199f5"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-win_amd64.whl", hash = "sha256:c2fc0a768ef76c15ab9238afa6da7f69895bb5d1ee83aeea2e3509af4472d0b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a2b911a5b90e0374d03813674bf0a5fbbb7741570dcd4b4e85a2e48d17def29d"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6fa6dfc3e4d1f734a34710f391ae822e0a8eb8559a85c6979e14e65ee6ba2954"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c54c939ee22dc8e2d545da79fc5381f1c020d6d3141d3bd747eab59164dc89fb"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53a57d2ed685940a504248187d5685e49eb5eef0f696853647bf37c418c538f7"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09fb9dd6571aacd023fe6aaca316bd01cf60ab27240d7eb39ebd66a3a15293b4"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0e6116757f7959a712db11f3e9c0a99ade00a5bbedae83cb801985aa154f071b"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d55ab81c57b8ff8548c3e4947f119551253f4e3787a7bbc0b6b3ca47498a9d3"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c20c462aa4434b33a2661701b861604913f912254e441ab8d78d30485736115a"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:44857c3227d3fb5e753d5fe4a3420d6376fa594b07b621e220cd93703fe21782"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:eb9b459ca4df0e5c87deb59d37377461a538852765293f9e6ee834f0435a93b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9fcd347d2cc5c23b06de6d3b7b8275be558a0c90549495c699e379a80bf8379e"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win32.whl", hash = "sha256:83aa99b1285bc8f038941ddf598501a86f1536789740991d7d8756e34f1e74d9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win_amd64.whl", hash = "sha256:f481959862f57f29601ccced557cc2e817bce7533ab8e01a797a48b49c9692b3"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5c4aa4e82353f65e548c476b37e64189783aa5384903bfea4f41580f255fddfa"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d946c8bf0d5c24bf4fe333af284c59a19358aa3ec18cb3dc4370080da1e8ad29"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87b31b6846e361ef83fedb187bb5b4372d0da3f7e28d85415efa92d6125d6e6d"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa9d91b338f2df0508606f7009fde642391425189bba6d8c653afd80fd6bb64e"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2058a32994f1fde4ca0480ab9d1e75a0e8c87c22b53a3ae66554f9af78f2fe8c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:0e03262ab796d986f978f79c943fc5f620381be7287148b8010b4097f79a39ec"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1a8695a8d00c73e50bff9dfda4d540b7dee29ff9b8053e38380426a85ef10052"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:fa754d1850735a0b0e03bcffd9d4b4343eb417e47196e4485d9cca326073a42c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a11c8d26a50bfab49002947d3d237abe4d9e4b5bdc8846a63537b6488e197808"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:dd14041875d09cc0f9308e37a6f8b65f5585cf2598a53aa0123df8b129d481f8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d87c561733f66531dced0da6e864f44ebf89a8fba55f31407b00c2f7f9449593"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f82865531efd18d6e07a04a17331af02cb7a651583c418df8266f17a63c6612"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bfb5112df54209d820d7bf9317c7a6c9025ea52e49f46b6a2060104bba37de7"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:64632ff9d614e5eecfb495796ad51b0ed98c453e447a76bcbeeb69615079fc7e"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f889f7a40498cc077332c7ab6b4608d296d852182211787d4f3ee377aaae66e8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:de4b83bb311557e439b9e186f733f6c645b9417c84e2eb8203f3f820a4b988bf"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:82f68293f055f51b51ea42fafc74b6aad03e70e191799430b90c13d643059ebb"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:329467cecfb529c925cf2bbd4d60d2c509bc2fb52a20c1045bf09bb70971a9c1"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:87acbfcf8e90ca885206e98359d7dca4bcbb35abdc0ff66672a293e1d7a19101"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:7f92c15cd1e97d4b12acd1cc9004fa092578acfa57b67ad5e43a197175d01a64"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f26877a748dc4251cfcfda9dfb5f13fcb034f5308388066bcfe9031b63ae7d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac89aea9af8cd672fa7b510e7b8c33b0bba9a43186680550ccf23020f32d535"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:970919794d126ba8645f3837ab6046fb4e72bbc057b3709144066204c19a455d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3eb3fe62804e8f859c49ed20a8451342de53ed764150cb14ca71357c765dc2a6"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:3abcd9392a36025e3bd55f9bd38d908bd17962cc49bc6da8e7e96285336e2bca"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3a1c81334778f9e3af2f8aeb7a960736e5cab1dfebfb26aabca09afd2906c039"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2807668ba86cb38c6817ad9bc66215ab8584d1d304030ce4f0887336f28a5e27"}, + {file = "pydantic_core-2.33.2.tar.gz", hash = "sha256:7cb8bc3605c29176e1b105350d2e6474142d7c1bd1d9327c4a9bdb46bf827acc"}, ] [package.dependencies] typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" -[[package]] -name = "pyflakes" -version = "2.5.0" -description = "passive checker of Python programs" -optional = false -python-versions = ">=3.6" -groups = ["dev"] -files = [ - {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, - {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, -] - [[package]] name = "pygments" -version = "2.19.1" +version = "2.19.2" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, - {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, ] [package.extras] @@ -1018,62 +967,64 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pyproject-api" -version = "1.8.0" +version = "1.9.1" description = "API to interact with the python pyproject.toml based projects" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pyproject_api-1.8.0-py3-none-any.whl", hash = "sha256:3d7d347a047afe796fd5d1885b1e391ba29be7169bd2f102fcd378f04273d228"}, - {file = "pyproject_api-1.8.0.tar.gz", hash = "sha256:77b8049f2feb5d33eefcc21b57f1e279636277a8ac8ad6b5871037b243778496"}, + {file = "pyproject_api-1.9.1-py3-none-any.whl", hash = "sha256:7d6238d92f8962773dd75b5f0c4a6a27cce092a14b623b811dba656f3b628948"}, + {file = "pyproject_api-1.9.1.tar.gz", hash = "sha256:43c9918f49daab37e302038fc1aed54a8c7a91a9fa935d00b9a485f37e0f5335"}, ] [package.dependencies] -packaging = ">=24.1" -tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} +packaging = ">=25" +tomli = {version = ">=2.2.1", markers = "python_version < \"3.11\""} [package.extras] -docs = ["furo (>=2024.8.6)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "pytest (>=8.3.3)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "setuptools (>=75.1)"] +docs = ["furo (>=2024.8.6)", "sphinx-autodoc-typehints (>=3.2)"] +testing = ["covdefaults (>=2.3)", "pytest (>=8.3.5)", "pytest-cov (>=6.1.1)", "pytest-mock (>=3.14)", "setuptools (>=80.3.1)"] [[package]] name = "pytest" -version = "8.3.5" +version = "8.4.1" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820"}, - {file = "pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845"}, + {file = "pytest-8.4.1-py3-none-any.whl", hash = "sha256:539c70ba6fcead8e78eebbf1115e8b589e7565830d7d006a8723f19ac8a0afb7"}, + {file = "pytest-8.4.1.tar.gz", hash = "sha256:7c67fd69174877359ed9371ec3af8a3d2b04741818c51e5e99cc1742251fa93c"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" pluggy = ">=1.5,<2" +pygments = ">=2.7.2" tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-cov" -version = "5.0.0" +version = "6.2.1" description = "Pytest plugin for measuring coverage." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, - {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, + {file = "pytest_cov-6.2.1-py3-none-any.whl", hash = "sha256:f5bc4c23f42f1cdd23c70b1dab1bbaef4fc505ba950d53e0081d0730dd7e86d5"}, + {file = "pytest_cov-6.2.1.tar.gz", hash = "sha256:25cc6cc0a5358204b8108ecedc51a9b57b34cc6b8c967cc2c01a4e00d8a67da2"}, ] [package.dependencies] -coverage = {version = ">=5.2.1", extras = ["toml"]} -pytest = ">=4.6" +coverage = {version = ">=7.5", extras = ["toml"]} +pluggy = ">=1.2" +pytest = ">=6.2.5" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] @@ -1108,19 +1059,6 @@ files = [ [package.extras] cli = ["click (>=5.0)"] -[[package]] -name = "pytz" -version = "2025.2" -description = "World timezone definitions, modern and historical" -optional = false -python-versions = "*" -groups = ["dev"] -markers = "python_version < \"3.9\"" -files = [ - {file = "pytz-2025.2-py2.py3-none-any.whl", hash = "sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00"}, - {file = "pytz-2025.2.tar.gz", hash = "sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3"}, -] - [[package]] name = "pywin32" version = "310" @@ -1172,30 +1110,30 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "ruff" -version = "0.11.8" +version = "0.11.13" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" groups = ["dev"] files = [ - {file = "ruff-0.11.8-py3-none-linux_armv6l.whl", hash = "sha256:896a37516c594805e34020c4a7546c8f8a234b679a7716a3f08197f38913e1a3"}, - {file = "ruff-0.11.8-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ab86d22d3d721a40dd3ecbb5e86ab03b2e053bc93c700dc68d1c3346b36ce835"}, - {file = "ruff-0.11.8-py3-none-macosx_11_0_arm64.whl", hash = "sha256:258f3585057508d317610e8a412788cf726efeefa2fec4dba4001d9e6f90d46c"}, - {file = "ruff-0.11.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:727d01702f7c30baed3fc3a34901a640001a2828c793525043c29f7614994a8c"}, - {file = "ruff-0.11.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3dca977cc4fc8f66e89900fa415ffe4dbc2e969da9d7a54bfca81a128c5ac219"}, - {file = "ruff-0.11.8-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c657fa987d60b104d2be8b052d66da0a2a88f9bd1d66b2254333e84ea2720c7f"}, - {file = "ruff-0.11.8-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:f2e74b021d0de5eceb8bd32919f6ff8a9b40ee62ed97becd44993ae5b9949474"}, - {file = "ruff-0.11.8-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f9b5ef39820abc0f2c62111f7045009e46b275f5b99d5e59dda113c39b7f4f38"}, - {file = "ruff-0.11.8-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1dba3135ca503727aa4648152c0fa67c3b1385d3dc81c75cd8a229c4b2a1458"}, - {file = "ruff-0.11.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f024d32e62faad0f76b2d6afd141b8c171515e4fb91ce9fd6464335c81244e5"}, - {file = "ruff-0.11.8-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d365618d3ad747432e1ae50d61775b78c055fee5936d77fb4d92c6f559741948"}, - {file = "ruff-0.11.8-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:4d9aaa91035bdf612c8ee7266153bcf16005c7c7e2f5878406911c92a31633cb"}, - {file = "ruff-0.11.8-py3-none-musllinux_1_2_i686.whl", hash = "sha256:0eba551324733efc76116d9f3a0d52946bc2751f0cd30661564117d6fd60897c"}, - {file = "ruff-0.11.8-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:161eb4cff5cfefdb6c9b8b3671d09f7def2f960cee33481dd898caf2bcd02304"}, - {file = "ruff-0.11.8-py3-none-win32.whl", hash = "sha256:5b18caa297a786465cc511d7f8be19226acf9c0a1127e06e736cd4e1878c3ea2"}, - {file = "ruff-0.11.8-py3-none-win_amd64.whl", hash = "sha256:6e70d11043bef637c5617297bdedec9632af15d53ac1e1ba29c448da9341b0c4"}, - {file = "ruff-0.11.8-py3-none-win_arm64.whl", hash = "sha256:304432e4c4a792e3da85b7699feb3426a0908ab98bf29df22a31b0cdd098fac2"}, - {file = "ruff-0.11.8.tar.gz", hash = "sha256:6d742d10626f9004b781f4558154bb226620a7242080e11caeffab1a40e99df8"}, + {file = "ruff-0.11.13-py3-none-linux_armv6l.whl", hash = "sha256:4bdfbf1240533f40042ec00c9e09a3aade6f8c10b6414cf11b519488d2635d46"}, + {file = "ruff-0.11.13-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:aef9c9ed1b5ca28bb15c7eac83b8670cf3b20b478195bd49c8d756ba0a36cf48"}, + {file = "ruff-0.11.13-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53b15a9dfdce029c842e9a5aebc3855e9ab7771395979ff85b7c1dedb53ddc2b"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab153241400789138d13f362c43f7edecc0edfffce2afa6a68434000ecd8f69a"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6c51f93029d54a910d3d24f7dd0bb909e31b6cd989a5e4ac513f4eb41629f0dc"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1808b3ed53e1a777c2ef733aca9051dc9bf7c99b26ece15cb59a0320fbdbd629"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d28ce58b5ecf0f43c1b71edffabe6ed7f245d5336b17805803312ec9bc665933"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:55e4bc3a77842da33c16d55b32c6cac1ec5fb0fbec9c8c513bdce76c4f922165"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:633bf2c6f35678c56ec73189ba6fa19ff1c5e4807a78bf60ef487b9dd272cc71"}, + {file = "ruff-0.11.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ffbc82d70424b275b089166310448051afdc6e914fdab90e08df66c43bb5ca9"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a9ddd3ec62a9a89578c85842b836e4ac832d4a2e0bfaad3b02243f930ceafcc"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d237a496e0778d719efb05058c64d28b757c77824e04ffe8796c7436e26712b7"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26816a218ca6ef02142343fd24c70f7cd8c5aa6c203bca284407adf675984432"}, + {file = "ruff-0.11.13-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:51c3f95abd9331dc5b87c47ac7f376db5616041173826dfd556cfe3d4977f492"}, + {file = "ruff-0.11.13-py3-none-win32.whl", hash = "sha256:96c27935418e4e8e77a26bb05962817f28b8ef3843a6c6cc49d8783b5507f250"}, + {file = "ruff-0.11.13-py3-none-win_amd64.whl", hash = "sha256:29c3189895a8a6a657b7af4e97d330c8a3afd2c9c8f46c81e2fc5a31866517e3"}, + {file = "ruff-0.11.13-py3-none-win_arm64.whl", hash = "sha256:b4385285e9179d608ff1d2fb9922062663c658605819a6876d8beef0c30b7f3b"}, + {file = "ruff-0.11.13.tar.gz", hash = "sha256:26fa247dc68d1d4e72c179e08889a25ac0c7ba4d78aecfc835d49cbfd60bf514"}, ] [[package]] @@ -1212,14 +1150,14 @@ files = [ [[package]] name = "snowballstemmer" -version = "3.0.0.1" +version = "3.0.1" description = "This package provides 32 stemmers for 30 languages generated from Snowball algorithms." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*" groups = ["dev"] files = [ - {file = "snowballstemmer-3.0.0.1-py3-none-any.whl", hash = "sha256:d1cdabc06fb492e80620d9e2c44d39e67cfda290b2aaef8718b0691079443b10"}, - {file = "snowballstemmer-3.0.0.1.tar.gz", hash = "sha256:1d09493a5ecc85fb5b433674e9c83fcd41c6739b6979ce4b54e81a40ec078342"}, + {file = "snowballstemmer-3.0.1-py3-none-any.whl", hash = "sha256:6cd7b3897da8d6c9ffb968a6781fa6532dce9c3618a4b127d920dab764a19064"}, + {file = "snowballstemmer-3.0.1.tar.gz", hash = "sha256:6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895"}, ] [[package]] @@ -1280,50 +1218,53 @@ dev = ["bump2version", "transifex-client", "twine", "wheel"] [[package]] name = "sphinxcontrib-applehelp" -version = "1.0.4" +version = "2.0.0" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, - {file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"}, + {file = "sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5"}, + {file = "sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] +standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-devhelp" -version = "1.0.2" -description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +version = "2.0.0" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" optional = false -python-versions = ">=3.5" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, - {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, + {file = "sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2"}, + {file = "sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] +standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "2.0.1" +version = "2.1.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, - {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, + {file = "sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8"}, + {file = "sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] +standalone = ["Sphinx (>=5)"] test = ["html5lib", "pytest"] [[package]] @@ -1358,34 +1299,36 @@ test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" -version = "1.0.3" -description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +version = "2.0.0" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" optional = false -python-versions = ">=3.5" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, - {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, + {file = "sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb"}, + {file = "sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] +standalone = ["Sphinx (>=5)"] +test = ["defusedxml (>=0.7.1)", "pytest"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.5" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +version = "2.0.0" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, + {file = "sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331"}, + {file = "sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d"}, ] [package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] +lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] +standalone = ["Sphinx (>=5)"] test = ["pytest"] [[package]] @@ -1467,14 +1410,14 @@ files = [ [[package]] name = "tox" -version = "4.25.0" +version = "4.27.0" description = "tox is a generic virtualenv management and test command line tool" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "tox-4.25.0-py3-none-any.whl", hash = "sha256:4dfdc7ba2cc6fdc6688dde1b21e7b46ff6c41795fb54586c91a3533317b5255c"}, - {file = "tox-4.25.0.tar.gz", hash = "sha256:dd67f030317b80722cf52b246ff42aafd3ed27ddf331c415612d084304cf5e52"}, + {file = "tox-4.27.0-py3-none-any.whl", hash = "sha256:2b8a7fb986b82aa2c830c0615082a490d134e0626dbc9189986da46a313c4f20"}, + {file = "tox-4.27.0.tar.gz", hash = "sha256:b97d5ecc0c0d5755bcc5348387fef793e1bfa68eb33746412f4c60881d7f5f57"}, ] [package.dependencies] @@ -1488,45 +1431,60 @@ pluggy = ">=1.5" pyproject-api = ">=1.8" tomli = {version = ">=2.2.1", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=4.12.2", markers = "python_version < \"3.11\""} -virtualenv = ">=20.29.1" +virtualenv = ">=20.31" [package.extras] test = ["devpi-process (>=1.0.2)", "pytest (>=8.3.4)", "pytest-mock (>=3.14)"] [[package]] name = "types-python-dateutil" -version = "2.9.0.20241206" +version = "2.9.0.20250708" description = "Typing stubs for python-dateutil" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "types_python_dateutil-2.9.0.20241206-py3-none-any.whl", hash = "sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53"}, - {file = "types_python_dateutil-2.9.0.20241206.tar.gz", hash = "sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb"}, + {file = "types_python_dateutil-2.9.0.20250708-py3-none-any.whl", hash = "sha256:4d6d0cc1cc4d24a2dc3816024e502564094497b713f7befda4d5bc7a8e3fd21f"}, + {file = "types_python_dateutil-2.9.0.20250708.tar.gz", hash = "sha256:ccdbd75dab2d6c9696c350579f34cffe2c281e4c5f27a585b2a2438dd1d5c8ab"}, ] [[package]] name = "typing-extensions" -version = "4.13.0" -description = "Backported and Experimental Type Hints for Python 3.8+" +version = "4.14.1" +description = "Backported and Experimental Type Hints for Python 3.9+" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "typing_extensions-4.13.0-py3-none-any.whl", hash = "sha256:c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5"}, - {file = "typing_extensions-4.13.0.tar.gz", hash = "sha256:0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b"}, + {file = "typing_extensions-4.14.1-py3-none-any.whl", hash = "sha256:d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76"}, + {file = "typing_extensions-4.14.1.tar.gz", hash = "sha256:38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36"}, ] +[[package]] +name = "typing-inspection" +version = "0.4.1" +description = "Runtime typing introspection tools" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "typing_inspection-0.4.1-py3-none-any.whl", hash = "sha256:389055682238f53b04f7badcb49b989835495a96700ced5dab2d8feae4b26f51"}, + {file = "typing_inspection-0.4.1.tar.gz", hash = "sha256:6ae134cc0203c33377d43188d4064e9b357dba58cff3185f22924610e70a9d28"}, +] + +[package.dependencies] +typing-extensions = ">=4.12.0" + [[package]] name = "urllib3" -version = "2.2.3" +version = "2.5.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc"}, + {file = "urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760"}, ] [package.extras] @@ -1537,14 +1495,14 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "virtualenv" -version = "20.29.3" +version = "20.31.2" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "virtualenv-20.29.3-py3-none-any.whl", hash = "sha256:3e3d00f5807e83b234dfb6122bf37cfadf4be216c53a49ac059d02414f819170"}, - {file = "virtualenv-20.29.3.tar.gz", hash = "sha256:95e39403fcf3940ac45bc717597dba16110b74506131845d9b687d5e73d947ac"}, + {file = "virtualenv-20.31.2-py3-none-any.whl", hash = "sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11"}, + {file = "virtualenv-20.31.2.tar.gz", hash = "sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af"}, ] [package.dependencies] @@ -1554,7 +1512,7 @@ platformdirs = ">=3.9.1,<5" [package.extras] docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8) ; platform_python_implementation == \"PyPy\" or platform_python_implementation == \"CPython\" and sys_platform == \"win32\" and python_version >= \"3.13\"", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10) ; platform_python_implementation == \"CPython\""] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8) ; platform_python_implementation == \"PyPy\" or platform_python_implementation == \"GraalVM\" or platform_python_implementation == \"CPython\" and sys_platform == \"win32\" and python_version >= \"3.13\"", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10) ; platform_python_implementation == \"CPython\""] [[package]] name = "wrapt" @@ -1647,15 +1605,15 @@ files = [ [[package]] name = "zipp" -version = "3.20.2" +version = "3.23.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] markers = "python_version < \"3.10\"" files = [ - {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, - {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, + {file = "zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e"}, + {file = "zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166"}, ] [package.extras] @@ -1663,10 +1621,10 @@ check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \" cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources ; python_version < \"3.9\"", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more_itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] [metadata] lock-version = "2.1" -python-versions = ">=3.8, !=3.9.0, !=3.9.1" -content-hash = "80e25fa3be516d715040d79c6bf72bbffe0b22f7671fac40c8e9e8814baa512e" +python-versions = ">=3.9, !=3.9.0, !=3.9.1" +content-hash = "e5bca1291da20d855a46f4883ec01c552eaf7e78b64b4812a9ac5968dcbc0419" diff --git a/pyproject.toml b/pyproject.toml index 8c58c22b..29d009f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "zitadel_client" description = "Official Zitadel SDK for Python. Authenticate and access Zitadel's authentication and management APIs in Python." license = { text = "Apache-2.0" } readme = "README.md" -requires-python = ">=3.8, !=3.9.0, !=3.9.1" +requires-python = ">=3.9, !=3.9.0, !=3.9.1" authors = [ { name = "Mridang Agarwalla", email = "mridang@zitadel.com" } ] @@ -16,7 +16,7 @@ dependencies = [ "python-dateutil>=2.8.2", "pydantic>=2", "typing-extensions>=4.7.1", - "authlib (==1.3.2)", + "authlib>=1.3.2,<2.0.0", "cryptography (>=44.0.1,<45.0.0)", "requests (>=2.32.3,<3.0.0)" ] @@ -24,7 +24,7 @@ dependencies = [ [project.urls] homepage = "https://zitadel.com/" repository = "https://github.com/zitadel/client-python" -documentation = "https://python-poetry.org/docs/" +documentation = "https://github.com/zitadel/client-python" "Bug Tracker" = "https://github.com/zitadel/client-python/issues" [tool.poetry] @@ -35,7 +35,6 @@ version = "1.7.0" pytest = ">= 7.2.1" pytest-cov = ">= 2.8.1" tox = ">= 3.9.0" -flake8 = ">= 4.0.0" types-python-dateutil = ">= 2.8.19.14" mypy = ">= 1.5" testcontainers = "3.7.1" @@ -49,7 +48,7 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.tox] -envlist = ["py3"] +envlist = ["py39", "py310", "py311", "py312"] [tool.pytest.ini_options] testpaths = ["test", "spec"] @@ -59,7 +58,7 @@ addopts = [ "--cov-report=html:build/coverage/html", "--cov-report=xml:build/coverage/clover.xml", "--cov-report=term", - "--xml-junit-dir=build/reports/" + ] junit_family = "legacy" @@ -70,9 +69,6 @@ omit = [ "zitadel_client/models/*" ] -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" - [tool.mypy] files = [ "zitadel_client", @@ -94,9 +90,6 @@ module = [ ignore_missing_imports = true disable_error_code = ["import-untyped"] -[tool.flake8] -max-line-length = 99 - [tool.ruff] line-length = 130 fix = true diff --git a/spec/auth/using_access_token_spec.py b/spec/auth/using_access_token_spec.py index 47ff5c99..16fc37f1 100644 --- a/spec/auth/using_access_token_spec.py +++ b/spec/auth/using_access_token_spec.py @@ -26,7 +26,7 @@ def test_retrieves_general_settings_with_valid_token(self, docker_compose: Dict[ docker_compose["base_url"], docker_compose["auth_token"], ) - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings() def test_raises_api_exception_with_invalid_token(self, docker_compose: Dict[str, str]) -> None: # noqa F811 """Raises ApiException when using an invalid access token.""" @@ -35,4 +35,4 @@ def test_raises_api_exception_with_invalid_token(self, docker_compose: Dict[str, "invalid", ) with pytest.raises(ZitadelError): - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings() diff --git a/spec/auth/using_client_credentials_spec.py b/spec/auth/using_client_credentials_spec.py index 1db71d03..012ebd79 100644 --- a/spec/auth/using_client_credentials_spec.py +++ b/spec/auth/using_client_credentials_spec.py @@ -78,7 +78,7 @@ def test_retrieves_general_settings_with_valid_client_credentials(self, docker_c credentials["client_id"], credentials["client_secret"], ) - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings() def test_raises_api_exception_with_invalid_client_credentials(self, docker_compose: Dict[str, str]) -> None: # noqa F811 """Raises ApiException when using invalid client credentials.""" @@ -88,4 +88,4 @@ def test_raises_api_exception_with_invalid_client_credentials(self, docker_compo "invalid", ) with pytest.raises(ZitadelError): - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings() diff --git a/spec/auth/using_private_key_spec.py b/spec/auth/using_private_key_spec.py index 3c11abf3..2915d4fc 100644 --- a/spec/auth/using_private_key_spec.py +++ b/spec/auth/using_private_key_spec.py @@ -26,7 +26,7 @@ def test_retrieves_general_settings_with_valid_private_key(self, docker_compose: docker_compose["base_url"], docker_compose["jwt_key"], ) - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings() def test_raises_api_exception_with_invalid_private_key(self, docker_compose: Dict[str, str]) -> None: # noqa F811 """Raises ApiException when using an invalid private key path.""" @@ -35,4 +35,4 @@ def test_raises_api_exception_with_invalid_private_key(self, docker_compose: Dic docker_compose["jwt_key"], ) with pytest.raises(ZitadelError): - client.settings.settings_service_get_general_settings() + client.settings.get_general_settings() diff --git a/spec/check_session_service_spec.py b/spec/check_session_service_spec.py index 198f3591..829cc454 100644 --- a/spec/check_session_service_spec.py +++ b/spec/check_session_service_spec.py @@ -12,11 +12,10 @@ SessionServiceCreateSessionRequest, SessionServiceCreateSessionResponse, SessionServiceDeleteSessionRequest, + SessionServiceGetSessionRequest, SessionServiceGetSessionResponse, SessionServiceListSessionsRequest, - SessionServiceListSessionsResponse, SessionServiceSetSessionRequest, - SessionServiceSetSessionResponse, UserServiceAddHumanUserRequest, UserServiceSetHumanEmail, UserServiceSetHumanProfile, @@ -40,19 +39,20 @@ def session(client: zitadel.Zitadel) -> Generator[SessionServiceCreateSessionRes profile=UserServiceSetHumanProfile(given_name="John", family_name="Doe"), # type: ignore[call-arg] email=UserServiceSetHumanEmail(email=f"johndoe{uuid.uuid4().hex}@example.com"), ) - client.users.user_service_add_human_user(request1) + client.users.add_human_user(request1) request = SessionServiceCreateSessionRequest( checks=SessionServiceChecks(user=SessionServiceCheckUser(loginName=username)), lifetime="18000s", ) - response = client.sessions.session_service_create_session(request) + response = client.sessions.create_session(request) yield response # Teardown - delete_body = SessionServiceDeleteSessionRequest() + delete_body = SessionServiceDeleteSessionRequest( + sessionId=response.session_id if response.session_id is not None else "", + ) try: - client.sessions.session_service_delete_session( - response.session_id if response.session_id is not None else "", + client.sessions.delete_session( delete_body, ) except ApiError: @@ -82,9 +82,8 @@ def test_retrieves_session_details_by_id( session: SessionServiceCreateSessionResponse, ) -> None: """Retrieves the session details by ID.""" - response: SessionServiceGetSessionResponse = client.sessions.session_service_get_session( - session.session_id if session.session_id is not None else "" - ) + request = SessionServiceGetSessionRequest(sessionId=session.session_id if session.session_id is not None else "") + response: SessionServiceGetSessionResponse = client.sessions.get_session(request) assert response.session is not None assert response.session.id == session.session_id @@ -95,7 +94,7 @@ def test_includes_created_session_when_listing( ) -> None: """Includes the created session when listing all sessions.""" request = SessionServiceListSessionsRequest(queries=[]) - response: SessionServiceListSessionsResponse = client.sessions.session_service_list_sessions(request) + response = client.sessions.list_sessions(request) assert response.sessions is not None assert session.session_id in [session.id for session in response.sessions] @@ -105,11 +104,10 @@ def test_updates_session_lifetime_and_returns_new_token( session: SessionServiceCreateSessionResponse, ) -> None: """Updates the session lifetime and returns a new token.""" - request = SessionServiceSetSessionRequest(lifetime="36000s") - response: SessionServiceSetSessionResponse = client.sessions.session_service_set_session( - session.session_id if session.session_id is not None else "", - request, + request = SessionServiceSetSessionRequest( + sessionId=session.session_id if session.session_id is not None else "", lifetime="36000s" ) + response = client.sessions.set_session(request) assert isinstance(response.session_token, str) def test_raises_api_exception_for_nonexistent_session( @@ -119,7 +117,8 @@ def test_raises_api_exception_for_nonexistent_session( ) -> None: """Raises an ApiException when retrieving a non-existent session.""" with pytest.raises(ApiError): - client.sessions.session_service_get_session( - str(uuid.uuid4()), - session_token=session.session_token, + request = SessionServiceGetSessionRequest( + sessionId=str(uuid.uuid4()), + sessionToken=session.session_token, ) + client.sessions.get_session(request) diff --git a/spec/check_user_service_spec.py b/spec/check_user_service_spec.py index 4f6f3f33..14349fbf 100644 --- a/spec/check_user_service_spec.py +++ b/spec/check_user_service_spec.py @@ -5,10 +5,12 @@ import zitadel_client as zitadel from spec.base_spec import docker_compose as docker_compose +from zitadel_client import UserServiceDeleteUserRequest from zitadel_client.exceptions import ApiError from zitadel_client.models import ( UserServiceAddHumanUserRequest, UserServiceAddHumanUserResponse, + UserServiceGetUserByIDRequest, UserServiceGetUserByIDResponse, UserServiceListUsersRequest, UserServiceSetHumanEmail, @@ -33,10 +35,10 @@ def user(client: zitadel.Zitadel) -> Generator[UserServiceAddHumanUserResponse, profile=UserServiceSetHumanProfile(given_name="John", family_name="Doe"), # type: ignore[call-arg] email=UserServiceSetHumanEmail(email=f"johndoe{uuid.uuid4().hex}@example.com"), ) - response = client.users.user_service_add_human_user(request) + response = client.users.add_human_user(request) yield response try: - client.users.user_service_delete_user(response.user_id) # type: ignore[arg-type] + client.users.delete_user(UserServiceDeleteUserRequest(userId=response.user_id or "")) except ApiError: pass @@ -64,7 +66,10 @@ def test_retrieves_user_details_by_id( user: UserServiceAddHumanUserResponse, ) -> None: """Retrieves the user details by ID.""" - response: UserServiceGetUserByIDResponse = client.users.user_service_get_user_by_id(user.user_id) # type: ignore[arg-type] + request = UserServiceGetUserByIDRequest( + userId=user.user_id or "", + ) + response: UserServiceGetUserByIDResponse = client.users.get_user_by_id(request) assert response.user.user_id == user.user_id # type: ignore[union-attr] def test_includes_created_user_when_listing( @@ -74,7 +79,7 @@ def test_includes_created_user_when_listing( ) -> None: """Includes the created user when listing all users.""" request = UserServiceListUsersRequest(queries=[]) - response = client.users.user_service_list_users(request) + response = client.users.list_users(request) ids = [u.user_id for u in response.result] # type: ignore assert user.user_id in ids @@ -84,11 +89,15 @@ def test_updates_user_email_and_reflects_in_get( user: UserServiceAddHumanUserResponse, ) -> None: """Updates the user's email and verifies the change.""" - client.users.user_service_update_human_user( - user.user_id, # type: ignore[arg-type] - UserServiceUpdateHumanUserRequest(email=UserServiceSetHumanEmail(email=f"updated{uuid.uuid4().hex}@example.com")), + request = UserServiceUpdateHumanUserRequest( + userId=user.user_id, email=UserServiceSetHumanEmail(email=f"updated{uuid.uuid4().hex}@example.com") + ) + client.users.update_human_user(request) + response = client.users.get_user_by_id( + UserServiceGetUserByIDRequest( + userId=user.user_id or "", + ) ) - response = client.users.user_service_get_user_by_id(user.user_id) # type: ignore[arg-type] assert "updated" in response.user.human.email.email # type: ignore def test_raises_api_exception_for_nonexistent_user( @@ -97,4 +106,7 @@ def test_raises_api_exception_for_nonexistent_user( ) -> None: """Raises an ApiException when retrieving a non-existent user.""" with pytest.raises(ApiError): - client.users.user_service_get_user_by_id(str(uuid.uuid4())) + request = UserServiceGetUserByIDRequest( + userId=str(uuid.uuid4()), + ) + client.users.get_user_by_id(request) diff --git a/test/test_api_client.py b/test/test_api_client.py index 53fd8ab0..9253dda4 100644 --- a/test/test_api_client.py +++ b/test/test_api_client.py @@ -60,7 +60,7 @@ def test_assert_headers_and_content_type(self) -> None: "headers": { "Authorization": {"equalTo": "Bearer mm"}, "User-Agent": { - "matches": "^zitadel-client/\\d\\.\\d\\.\\d \\(lang=python; lang_version=[^;]+; os=[^;]+; arch=[^;]+\\)$" # noqa E501 + "matches": "^zitadel-client/\\d+\\.\\d+\\.\\d+ \\(lang=python; lang_version=[^;]+; os=[^;]+; arch=[^;]+\\)$" # noqa E501 }, }, }, diff --git a/test/test_configuration.py b/test/test_configuration.py index 56248580..5c02cadb 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -15,7 +15,7 @@ def test_user_agent_getter_and_setter(self) -> None: self.assertRegex( config.user_agent, - r"^zitadel-client/\d\.\d\.\d \(lang=python; lang_version=[^;]+; os=[^;]+; arch=[^;]+\)$", + r"^zitadel-client/\d+\.\d+\.\d+ \(lang=python; lang_version=[^;]+; os=[^;]+; arch=[^;]+\)$", ) config.user_agent = "CustomUserAgent/1.0" self.assertEqual(config.user_agent, "CustomUserAgent/1.0") diff --git a/zitadel_client/api/__init__.py b/zitadel_client/api/__init__.py index c18ea9a0..47e2959c 100644 --- a/zitadel_client/api/__init__.py +++ b/zitadel_client/api/__init__.py @@ -1,7 +1,20 @@ # flake8: noqa # import apis into api package -from zitadel_client.api.action_service_api import ActionServiceApi +from zitadel_client.api.beta_action_service_api import BetaActionServiceApi +from zitadel_client.api.beta_app_service_api import BetaAppServiceApi +from zitadel_client.api.beta_authorization_service_api import BetaAuthorizationServiceApi +from zitadel_client.api.beta_feature_service_api import BetaFeatureServiceApi +from zitadel_client.api.beta_instance_service_api import BetaInstanceServiceApi +from zitadel_client.api.beta_internal_permission_service_api import BetaInternalPermissionServiceApi +from zitadel_client.api.beta_oidc_service_api import BetaOIDCServiceApi +from zitadel_client.api.beta_organization_service_api import BetaOrganizationServiceApi +from zitadel_client.api.beta_project_service_api import BetaProjectServiceApi +from zitadel_client.api.beta_session_service_api import BetaSessionServiceApi +from zitadel_client.api.beta_settings_service_api import BetaSettingsServiceApi +from zitadel_client.api.beta_telemetry_service_api import BetaTelemetryServiceApi +from zitadel_client.api.beta_user_service_api import BetaUserServiceApi +from zitadel_client.api.beta_web_key_service_api import BetaWebKeyServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi diff --git a/zitadel_client/api/action_service_api.py b/zitadel_client/api/action_service_api.py deleted file mode 100644 index ce9b3022..00000000 --- a/zitadel_client/api/action_service_api.py +++ /dev/null @@ -1,1147 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_create_target_response import ActionServiceBetaCreateTargetResponse -from zitadel_client.models.action_service_beta_delete_target_response import ActionServiceBetaDeleteTargetResponse -from zitadel_client.models.action_service_beta_get_target_response import ActionServiceBetaGetTargetResponse -from zitadel_client.models.action_service_beta_list_execution_functions_response import ActionServiceBetaListExecutionFunctionsResponse -from zitadel_client.models.action_service_beta_list_execution_methods_response import ActionServiceBetaListExecutionMethodsResponse -from zitadel_client.models.action_service_beta_list_execution_services_response import ActionServiceBetaListExecutionServicesResponse -from zitadel_client.models.action_service_beta_list_executions_response import ActionServiceBetaListExecutionsResponse -from zitadel_client.models.action_service_beta_list_targets_response import ActionServiceBetaListTargetsResponse -from zitadel_client.models.action_service_beta_set_execution_response import ActionServiceBetaSetExecutionResponse -from zitadel_client.models.action_service_beta_update_target_response import ActionServiceBetaUpdateTargetResponse -from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest -from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest -from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest -from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest - -from zitadel_client.api_client import ApiClient, RequestSerialized -from zitadel_client.api_response import ApiResponse -from zitadel_client.rest import RESTResponseType - - -class ActionServiceApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def action_service_create_target( - self, - action_service_create_target_request: ActionServiceCreateTargetRequest, - ) -> ActionServiceBetaCreateTargetResponse: - """Create Target - - Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` - - :param action_service_create_target_request: (required) - :type action_service_create_target_request: ActionServiceCreateTargetRequest - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_create_target_serialize( - action_service_create_target_request=action_service_create_target_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaCreateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - '409': "object", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_create_target_serialize( - self, - action_service_create_target_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if action_service_create_target_request is not None: - _body_params = action_service_create_target_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2beta/actions/targets', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_delete_target( - self, - id: StrictStr, - ) -> ActionServiceBetaDeleteTargetResponse: - """Delete Target - - Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` - - :param id: (required) - :type id: str - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_delete_target_serialize( - id=id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaDeleteTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_delete_target_serialize( - self, - id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2beta/actions/targets/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_get_target( - self, - id: StrictStr, - ) -> ActionServiceBetaGetTargetResponse: - """Get Target - - Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` - - :param id: (required) - :type id: str - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_get_target_serialize( - id=id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaGetTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_get_target_serialize( - self, - id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/targets/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_execution_functions( - self, - ) -> ActionServiceBetaListExecutionFunctionsResponse: - """List Execution Functions - - List all available functions which can be used as condition for executions. - - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_list_execution_functions_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionFunctionsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_list_execution_functions_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/functions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_execution_methods( - self, - ) -> ActionServiceBetaListExecutionMethodsResponse: - """List Execution Methods - - List all available methods which can be used as condition for executions. - - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_list_execution_methods_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionMethodsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_list_execution_methods_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/methods', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_execution_services( - self, - ) -> ActionServiceBetaListExecutionServicesResponse: - """List Execution Services - - List all available services which can be used as condition for executions. - - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_list_execution_services_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionServicesResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_list_execution_services_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/services', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_executions( - self, - pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, - pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, - pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, - sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, - ) -> ActionServiceBetaListExecutionsResponse: - """List Executions - - List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` - - :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. - :type pagination_offset: str - :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. - :type pagination_limit: int - :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. - :type pagination_asc: bool - :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. - :type sorting_column: str - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_list_executions_serialize( - pagination_offset=pagination_offset, - pagination_limit=pagination_limit, - pagination_asc=pagination_asc, - sorting_column=sorting_column, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_list_executions_serialize( - self, - pagination_offset, - pagination_limit, - pagination_asc, - sorting_column, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if pagination_offset is not None: - - _query_params.append(('pagination.offset', pagination_offset)) - - if pagination_limit is not None: - - _query_params.append(('pagination.limit', pagination_limit)) - - if pagination_asc is not None: - - _query_params.append(('pagination.asc', pagination_asc)) - - if sorting_column is not None: - - _query_params.append(('sortingColumn', sorting_column)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2beta/actions/executions/_search', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_targets( - self, - action_service_list_targets_request: ActionServiceListTargetsRequest, - ) -> ActionServiceBetaListTargetsResponse: - """List targets - - List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` - - :param action_service_list_targets_request: (required) - :type action_service_list_targets_request: ActionServiceListTargetsRequest - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_list_targets_serialize( - action_service_list_targets_request=action_service_list_targets_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListTargetsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_list_targets_serialize( - self, - action_service_list_targets_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if action_service_list_targets_request is not None: - _body_params = action_service_list_targets_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2beta/actions/targets/_search', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_set_execution( - self, - action_service_set_execution_request: ActionServiceSetExecutionRequest, - ) -> ActionServiceBetaSetExecutionResponse: - """Set Execution - - Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` - - :param action_service_set_execution_request: (required) - :type action_service_set_execution_request: ActionServiceSetExecutionRequest - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_set_execution_serialize( - action_service_set_execution_request=action_service_set_execution_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaSetExecutionResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_set_execution_serialize( - self, - action_service_set_execution_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if action_service_set_execution_request is not None: - _body_params = action_service_set_execution_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v2beta/actions/executions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_update_target( - self, - id: StrictStr, - action_service_update_target_request: ActionServiceUpdateTargetRequest, - ) -> ActionServiceBetaUpdateTargetResponse: - """Update Target - - Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` - - :param id: (required) - :type id: str - :param action_service_update_target_request: (required) - :type action_service_update_target_request: ActionServiceUpdateTargetRequest - :return: Returns the result object. - """ # noqa: E501 - - _param = self.__action_service_update_target_serialize( - id=id, - action_service_update_target_request=action_service_update_target_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaUpdateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", - } - - response_data = self.api_client.call_api( - *_param, - _request_timeout=None - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - def __action_service_update_target_serialize( - self, - id, - action_service_update_target_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if action_service_update_target_request is not None: - _body_params = action_service_update_target_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2beta/actions/targets/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/zitadel_client/api/beta_action_service_api.py b/zitadel_client/api/beta_action_service_api.py new file mode 100644 index 00000000..807b518f --- /dev/null +++ b/zitadel_client/api/beta_action_service_api.py @@ -0,0 +1,1339 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict +from zitadel_client.models.beta_action_service_create_target_request import BetaActionServiceCreateTargetRequest +from zitadel_client.models.beta_action_service_create_target_response import BetaActionServiceCreateTargetResponse +from zitadel_client.models.beta_action_service_delete_target_request import BetaActionServiceDeleteTargetRequest +from zitadel_client.models.beta_action_service_delete_target_response import BetaActionServiceDeleteTargetResponse +from zitadel_client.models.beta_action_service_get_target_request import BetaActionServiceGetTargetRequest +from zitadel_client.models.beta_action_service_get_target_response import BetaActionServiceGetTargetResponse +from zitadel_client.models.beta_action_service_list_execution_functions_response import BetaActionServiceListExecutionFunctionsResponse +from zitadel_client.models.beta_action_service_list_execution_methods_response import BetaActionServiceListExecutionMethodsResponse +from zitadel_client.models.beta_action_service_list_execution_services_response import BetaActionServiceListExecutionServicesResponse +from zitadel_client.models.beta_action_service_list_executions_request import BetaActionServiceListExecutionsRequest +from zitadel_client.models.beta_action_service_list_executions_response import BetaActionServiceListExecutionsResponse +from zitadel_client.models.beta_action_service_list_targets_request import BetaActionServiceListTargetsRequest +from zitadel_client.models.beta_action_service_list_targets_response import BetaActionServiceListTargetsResponse +from zitadel_client.models.beta_action_service_set_execution_request import BetaActionServiceSetExecutionRequest +from zitadel_client.models.beta_action_service_set_execution_response import BetaActionServiceSetExecutionResponse +from zitadel_client.models.beta_action_service_update_target_request import BetaActionServiceUpdateTargetRequest +from zitadel_client.models.beta_action_service_update_target_response import BetaActionServiceUpdateTargetResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaActionServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_target( self, beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceCreateTargetResponse: + """CreateTarget + + Create Target Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param beta_action_service_create_target_request: (required) + :type beta_action_service_create_target_request: BetaActionServiceCreateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_target_serialize( + beta_action_service_create_target_request=beta_action_service_create_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceCreateTargetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_target_serialize( + self, + beta_action_service_create_target_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_action_service_create_target_request is not None: + _body_params = beta_action_service_create_target_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/CreateTarget', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_target( self, beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceDeleteTargetResponse: + """DeleteTarget + + Delete Target Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` + + :param beta_action_service_delete_target_request: (required) + :type beta_action_service_delete_target_request: BetaActionServiceDeleteTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_target_serialize( + beta_action_service_delete_target_request=beta_action_service_delete_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceDeleteTargetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_target_serialize( + self, + beta_action_service_delete_target_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_action_service_delete_target_request is not None: + _body_params = beta_action_service_delete_target_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/DeleteTarget', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_target( self, beta_action_service_get_target_request: BetaActionServiceGetTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceGetTargetResponse: + """GetTarget + + Get Target Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param beta_action_service_get_target_request: (required) + :type beta_action_service_get_target_request: BetaActionServiceGetTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_target_serialize( + beta_action_service_get_target_request=beta_action_service_get_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceGetTargetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_target_serialize( + self, + beta_action_service_get_target_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_action_service_get_target_request is not None: + _body_params = beta_action_service_get_target_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/GetTarget', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_execution_functions( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceListExecutionFunctionsResponse: + if body is None: + body = {} + """ListExecutionFunctions + + List Execution Functions List all available functions which can be used as condition for executions. + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_execution_functions_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceListExecutionFunctionsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_execution_functions_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutionFunctions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_execution_methods( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceListExecutionMethodsResponse: + if body is None: + body = {} + """ListExecutionMethods + + List Execution Methods List all available methods which can be used as condition for executions. + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_execution_methods_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceListExecutionMethodsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_execution_methods_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutionMethods', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_execution_services( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceListExecutionServicesResponse: + if body is None: + body = {} + """ListExecutionServices + + List Execution Services List all available services which can be used as condition for executions. + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_execution_services_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceListExecutionServicesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_execution_services_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutionServices', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_executions( self, beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceListExecutionsResponse: + """ListExecutions + + List Executions List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + + :param beta_action_service_list_executions_request: (required) + :type beta_action_service_list_executions_request: BetaActionServiceListExecutionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_executions_serialize( + beta_action_service_list_executions_request=beta_action_service_list_executions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceListExecutionsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_executions_serialize( + self, + beta_action_service_list_executions_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_action_service_list_executions_request is not None: + _body_params = beta_action_service_list_executions_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListExecutions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_targets( self, beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceListTargetsResponse: + """ListTargets + + List targets List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param beta_action_service_list_targets_request: (required) + :type beta_action_service_list_targets_request: BetaActionServiceListTargetsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_targets_serialize( + beta_action_service_list_targets_request=beta_action_service_list_targets_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceListTargetsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_targets_serialize( + self, + beta_action_service_list_targets_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_action_service_list_targets_request is not None: + _body_params = beta_action_service_list_targets_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/ListTargets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_execution( self, beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceSetExecutionResponse: + """SetExecution + + Set Execution Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` + + :param beta_action_service_set_execution_request: (required) + :type beta_action_service_set_execution_request: BetaActionServiceSetExecutionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_execution_serialize( + beta_action_service_set_execution_request=beta_action_service_set_execution_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceSetExecutionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_execution_serialize( + self, + beta_action_service_set_execution_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_action_service_set_execution_request is not None: + _body_params = beta_action_service_set_execution_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/SetExecution', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_target( self, beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaActionServiceUpdateTargetResponse: + """UpdateTarget + + Update Target Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param beta_action_service_update_target_request: (required) + :type beta_action_service_update_target_request: BetaActionServiceUpdateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_target_serialize( + beta_action_service_update_target_request=beta_action_service_update_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaActionServiceUpdateTargetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_target_serialize( + self, + beta_action_service_update_target_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_action_service_update_target_request is not None: + _body_params = beta_action_service_update_target_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.action.v2beta.ActionService/UpdateTarget', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_app_service_api.py b/zitadel_client/api/beta_app_service_api.py new file mode 100644 index 00000000..39372996 --- /dev/null +++ b/zitadel_client/api/beta_app_service_api.py @@ -0,0 +1,1595 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_app_service_create_application_key_request import BetaAppServiceCreateApplicationKeyRequest +from zitadel_client.models.beta_app_service_create_application_key_response import BetaAppServiceCreateApplicationKeyResponse +from zitadel_client.models.beta_app_service_create_application_request import BetaAppServiceCreateApplicationRequest +from zitadel_client.models.beta_app_service_create_application_response import BetaAppServiceCreateApplicationResponse +from zitadel_client.models.beta_app_service_deactivate_application_request import BetaAppServiceDeactivateApplicationRequest +from zitadel_client.models.beta_app_service_deactivate_application_response import BetaAppServiceDeactivateApplicationResponse +from zitadel_client.models.beta_app_service_delete_application_key_request import BetaAppServiceDeleteApplicationKeyRequest +from zitadel_client.models.beta_app_service_delete_application_key_response import BetaAppServiceDeleteApplicationKeyResponse +from zitadel_client.models.beta_app_service_delete_application_request import BetaAppServiceDeleteApplicationRequest +from zitadel_client.models.beta_app_service_delete_application_response import BetaAppServiceDeleteApplicationResponse +from zitadel_client.models.beta_app_service_get_application_key_request import BetaAppServiceGetApplicationKeyRequest +from zitadel_client.models.beta_app_service_get_application_key_response import BetaAppServiceGetApplicationKeyResponse +from zitadel_client.models.beta_app_service_get_application_request import BetaAppServiceGetApplicationRequest +from zitadel_client.models.beta_app_service_get_application_response import BetaAppServiceGetApplicationResponse +from zitadel_client.models.beta_app_service_list_application_keys_request import BetaAppServiceListApplicationKeysRequest +from zitadel_client.models.beta_app_service_list_application_keys_response import BetaAppServiceListApplicationKeysResponse +from zitadel_client.models.beta_app_service_list_applications_request import BetaAppServiceListApplicationsRequest +from zitadel_client.models.beta_app_service_list_applications_response import BetaAppServiceListApplicationsResponse +from zitadel_client.models.beta_app_service_reactivate_application_request import BetaAppServiceReactivateApplicationRequest +from zitadel_client.models.beta_app_service_reactivate_application_response import BetaAppServiceReactivateApplicationResponse +from zitadel_client.models.beta_app_service_regenerate_client_secret_request import BetaAppServiceRegenerateClientSecretRequest +from zitadel_client.models.beta_app_service_regenerate_client_secret_response import BetaAppServiceRegenerateClientSecretResponse +from zitadel_client.models.beta_app_service_update_application_request import BetaAppServiceUpdateApplicationRequest +from zitadel_client.models.beta_app_service_update_application_response import BetaAppServiceUpdateApplicationResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaAppServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_application( self, beta_app_service_create_application_request: BetaAppServiceCreateApplicationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceCreateApplicationResponse: + """CreateApplication + + Create Application Create an application. The application can be OIDC, API or SAML type, based on the input. Required permissions: - project.app.write + + :param beta_app_service_create_application_request: (required) + :type beta_app_service_create_application_request: BetaAppServiceCreateApplicationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_serialize( + beta_app_service_create_application_request=beta_app_service_create_application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceCreateApplicationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_application_serialize( + self, + beta_app_service_create_application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_create_application_request is not None: + _body_params = beta_app_service_create_application_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/CreateApplication', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_application_key( self, beta_app_service_create_application_key_request: BetaAppServiceCreateApplicationKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceCreateApplicationKeyResponse: + """CreateApplicationKey + + Create Application Key Create a new application key, which is used to authorize an API application. Key details are returned in the response. They must be stored safely, as it will not be possible to retrieve them again. Required permissions: - `project.app.write` + + :param beta_app_service_create_application_key_request: (required) + :type beta_app_service_create_application_key_request: BetaAppServiceCreateApplicationKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_application_key_serialize( + beta_app_service_create_application_key_request=beta_app_service_create_application_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceCreateApplicationKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_application_key_serialize( + self, + beta_app_service_create_application_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_create_application_key_request is not None: + _body_params = beta_app_service_create_application_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/CreateApplicationKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def deactivate_application( self, beta_app_service_deactivate_application_request: BetaAppServiceDeactivateApplicationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceDeactivateApplicationResponse: + """DeactivateApplication + + Deactivate Application Deactivates the application belonging to the input project and matching the provided application ID. Required permissions: - project.app.write + + :param beta_app_service_deactivate_application_request: (required) + :type beta_app_service_deactivate_application_request: BetaAppServiceDeactivateApplicationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deactivate_application_serialize( + beta_app_service_deactivate_application_request=beta_app_service_deactivate_application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceDeactivateApplicationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _deactivate_application_serialize( + self, + beta_app_service_deactivate_application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_deactivate_application_request is not None: + _body_params = beta_app_service_deactivate_application_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/DeactivateApplication', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_application( self, beta_app_service_delete_application_request: BetaAppServiceDeleteApplicationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceDeleteApplicationResponse: + """DeleteApplication + + Delete Application Deletes the application belonging to the input project and matching the provided application ID. Required permissions: - project.app.delete + + :param beta_app_service_delete_application_request: (required) + :type beta_app_service_delete_application_request: BetaAppServiceDeleteApplicationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_serialize( + beta_app_service_delete_application_request=beta_app_service_delete_application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceDeleteApplicationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_application_serialize( + self, + beta_app_service_delete_application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_delete_application_request is not None: + _body_params = beta_app_service_delete_application_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/DeleteApplication', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_application_key( self, beta_app_service_delete_application_key_request: BetaAppServiceDeleteApplicationKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceDeleteApplicationKeyResponse: + """DeleteApplicationKey + + Delete Application Key Deletes an application key matching the provided ID. Organization ID is not mandatory, but helps with filtering/performance. The deletion time is returned in response message. Required permissions: - `project.app.write` + + :param beta_app_service_delete_application_key_request: (required) + :type beta_app_service_delete_application_key_request: BetaAppServiceDeleteApplicationKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_application_key_serialize( + beta_app_service_delete_application_key_request=beta_app_service_delete_application_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceDeleteApplicationKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_application_key_serialize( + self, + beta_app_service_delete_application_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_delete_application_key_request is not None: + _body_params = beta_app_service_delete_application_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/DeleteApplicationKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_application( self, beta_app_service_get_application_request: BetaAppServiceGetApplicationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceGetApplicationResponse: + """GetApplication + + Get Application Retrieves the application matching the provided ID. Required permissions: - project.app.read + + :param beta_app_service_get_application_request: (required) + :type beta_app_service_get_application_request: BetaAppServiceGetApplicationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_serialize( + beta_app_service_get_application_request=beta_app_service_get_application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceGetApplicationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_application_serialize( + self, + beta_app_service_get_application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_get_application_request is not None: + _body_params = beta_app_service_get_application_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/GetApplication', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_application_key( self, beta_app_service_get_application_key_request: BetaAppServiceGetApplicationKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceGetApplicationKeyResponse: + """GetApplicationKey + + Get Application Key Retrieves the application key matching the provided ID. Specifying a project, organization and app ID is optional but help with filtering/performance. Required permissions: - project.app.read + + :param beta_app_service_get_application_key_request: (required) + :type beta_app_service_get_application_key_request: BetaAppServiceGetApplicationKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_application_key_serialize( + beta_app_service_get_application_key_request=beta_app_service_get_application_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceGetApplicationKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_application_key_serialize( + self, + beta_app_service_get_application_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_get_application_key_request is not None: + _body_params = beta_app_service_get_application_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/GetApplicationKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_application_keys( self, beta_app_service_list_application_keys_request: BetaAppServiceListApplicationKeysRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceListApplicationKeysResponse: + """ListApplicationKeys + + List Application Keys Returns a list of application keys matching the input parameters. The result can be sorted by id, aggregate, creation date, expiration date, resource owner or type. It can also be filtered by app, project or organization ID. Required permissions: - project.app.read + + :param beta_app_service_list_application_keys_request: (required) + :type beta_app_service_list_application_keys_request: BetaAppServiceListApplicationKeysRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_application_keys_serialize( + beta_app_service_list_application_keys_request=beta_app_service_list_application_keys_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceListApplicationKeysResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_application_keys_serialize( + self, + beta_app_service_list_application_keys_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_list_application_keys_request is not None: + _body_params = beta_app_service_list_application_keys_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/ListApplicationKeys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_applications( self, beta_app_service_list_applications_request: BetaAppServiceListApplicationsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceListApplicationsResponse: + """ListApplications + + List Applications Returns a list of applications matching the input parameters that belong to the provided project. The result can be sorted by app id, name, creation date, change date or state. It can also be filtered by app state, app type and app name. Required permissions: - project.app.read + + :param beta_app_service_list_applications_request: (required) + :type beta_app_service_list_applications_request: BetaAppServiceListApplicationsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_applications_serialize( + beta_app_service_list_applications_request=beta_app_service_list_applications_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceListApplicationsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_applications_serialize( + self, + beta_app_service_list_applications_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_list_applications_request is not None: + _body_params = beta_app_service_list_applications_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/ListApplications', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reactivate_application( self, beta_app_service_reactivate_application_request: BetaAppServiceReactivateApplicationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceReactivateApplicationResponse: + """ReactivateApplication + + Reactivate Application Reactivates the application belonging to the input project and matching the provided application ID. Required permissions: - project.app.write + + :param beta_app_service_reactivate_application_request: (required) + :type beta_app_service_reactivate_application_request: BetaAppServiceReactivateApplicationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reactivate_application_serialize( + beta_app_service_reactivate_application_request=beta_app_service_reactivate_application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceReactivateApplicationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _reactivate_application_serialize( + self, + beta_app_service_reactivate_application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_reactivate_application_request is not None: + _body_params = beta_app_service_reactivate_application_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/ReactivateApplication', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def regenerate_client_secret( self, beta_app_service_regenerate_client_secret_request: BetaAppServiceRegenerateClientSecretRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceRegenerateClientSecretResponse: + """RegenerateClientSecret + + Regenerate Client Secret Regenerates the client secret of an API or OIDC application that belongs to the input project. Required permissions: - project.app.write + + :param beta_app_service_regenerate_client_secret_request: (required) + :type beta_app_service_regenerate_client_secret_request: BetaAppServiceRegenerateClientSecretRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._regenerate_client_secret_serialize( + beta_app_service_regenerate_client_secret_request=beta_app_service_regenerate_client_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceRegenerateClientSecretResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _regenerate_client_secret_serialize( + self, + beta_app_service_regenerate_client_secret_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_regenerate_client_secret_request is not None: + _body_params = beta_app_service_regenerate_client_secret_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/RegenerateClientSecret', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_application( self, beta_app_service_update_application_request: BetaAppServiceUpdateApplicationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAppServiceUpdateApplicationResponse: + """UpdateApplication + + Update Application Changes the configuration of an OIDC, API or SAML type application, as well as the application name, based on the input provided. Required permissions: - project.app.write + + :param beta_app_service_update_application_request: (required) + :type beta_app_service_update_application_request: BetaAppServiceUpdateApplicationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_application_serialize( + beta_app_service_update_application_request=beta_app_service_update_application_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAppServiceUpdateApplicationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_application_serialize( + self, + beta_app_service_update_application_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_app_service_update_application_request is not None: + _body_params = beta_app_service_update_application_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.app.v2beta.AppService/UpdateApplication', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_authorization_service_api.py b/zitadel_client/api/beta_authorization_service_api.py new file mode 100644 index 00000000..10708b8a --- /dev/null +++ b/zitadel_client/api/beta_authorization_service_api.py @@ -0,0 +1,815 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_authorization_service_activate_authorization_request import BetaAuthorizationServiceActivateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_activate_authorization_response import BetaAuthorizationServiceActivateAuthorizationResponse +from zitadel_client.models.beta_authorization_service_create_authorization_request import BetaAuthorizationServiceCreateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_create_authorization_response import BetaAuthorizationServiceCreateAuthorizationResponse +from zitadel_client.models.beta_authorization_service_deactivate_authorization_request import BetaAuthorizationServiceDeactivateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_deactivate_authorization_response import BetaAuthorizationServiceDeactivateAuthorizationResponse +from zitadel_client.models.beta_authorization_service_delete_authorization_request import BetaAuthorizationServiceDeleteAuthorizationRequest +from zitadel_client.models.beta_authorization_service_delete_authorization_response import BetaAuthorizationServiceDeleteAuthorizationResponse +from zitadel_client.models.beta_authorization_service_list_authorizations_request import BetaAuthorizationServiceListAuthorizationsRequest +from zitadel_client.models.beta_authorization_service_list_authorizations_response import BetaAuthorizationServiceListAuthorizationsResponse +from zitadel_client.models.beta_authorization_service_update_authorization_request import BetaAuthorizationServiceUpdateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_update_authorization_response import BetaAuthorizationServiceUpdateAuthorizationResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaAuthorizationServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def activate_authorization( self, beta_authorization_service_activate_authorization_request: BetaAuthorizationServiceActivateAuthorizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAuthorizationServiceActivateAuthorizationResponse: + """ActivateAuthorization + + Activate Authorization ActivateAuthorization activates an existing but inactive authorization. In case the authorization is already active, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the authorization was activated by the request. Required permissions: - \"user.grant.write\" + + :param beta_authorization_service_activate_authorization_request: (required) + :type beta_authorization_service_activate_authorization_request: BetaAuthorizationServiceActivateAuthorizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_authorization_serialize( + beta_authorization_service_activate_authorization_request=beta_authorization_service_activate_authorization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAuthorizationServiceActivateAuthorizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _activate_authorization_serialize( + self, + beta_authorization_service_activate_authorization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_authorization_service_activate_authorization_request is not None: + _body_params = beta_authorization_service_activate_authorization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.authorization.v2beta.AuthorizationService/ActivateAuthorization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_authorization( self, beta_authorization_service_create_authorization_request: BetaAuthorizationServiceCreateAuthorizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAuthorizationServiceCreateAuthorizationResponse: + """CreateAuthorization + + Create Authorization CreateAuthorization creates a new authorization for a user in an owned or granted project. Required permissions: - \"user.grant.write\" + + :param beta_authorization_service_create_authorization_request: (required) + :type beta_authorization_service_create_authorization_request: BetaAuthorizationServiceCreateAuthorizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_authorization_serialize( + beta_authorization_service_create_authorization_request=beta_authorization_service_create_authorization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAuthorizationServiceCreateAuthorizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_authorization_serialize( + self, + beta_authorization_service_create_authorization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_authorization_service_create_authorization_request is not None: + _body_params = beta_authorization_service_create_authorization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.authorization.v2beta.AuthorizationService/CreateAuthorization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def deactivate_authorization( self, beta_authorization_service_deactivate_authorization_request: BetaAuthorizationServiceDeactivateAuthorizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAuthorizationServiceDeactivateAuthorizationResponse: + """DeactivateAuthorization + + Deactivate Authorization DeactivateAuthorization deactivates an existing and active authorization. In case the authorization is already inactive, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the authorization was deactivated by the request. Required permissions: - \"user.grant.write\" + + :param beta_authorization_service_deactivate_authorization_request: (required) + :type beta_authorization_service_deactivate_authorization_request: BetaAuthorizationServiceDeactivateAuthorizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deactivate_authorization_serialize( + beta_authorization_service_deactivate_authorization_request=beta_authorization_service_deactivate_authorization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAuthorizationServiceDeactivateAuthorizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _deactivate_authorization_serialize( + self, + beta_authorization_service_deactivate_authorization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_authorization_service_deactivate_authorization_request is not None: + _body_params = beta_authorization_service_deactivate_authorization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.authorization.v2beta.AuthorizationService/DeactivateAuthorization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_authorization( self, beta_authorization_service_delete_authorization_request: BetaAuthorizationServiceDeleteAuthorizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAuthorizationServiceDeleteAuthorizationResponse: + """DeleteAuthorization + + Delete Authorization DeleteAuthorization deletes the authorization. In case the authorization is not found, the request will return a successful response as the desired state is already achieved. You can check the deletion date in the response to verify if the authorization was deleted by the request. Required permissions: - \"user.grant.delete\" + + :param beta_authorization_service_delete_authorization_request: (required) + :type beta_authorization_service_delete_authorization_request: BetaAuthorizationServiceDeleteAuthorizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_authorization_serialize( + beta_authorization_service_delete_authorization_request=beta_authorization_service_delete_authorization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAuthorizationServiceDeleteAuthorizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_authorization_serialize( + self, + beta_authorization_service_delete_authorization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_authorization_service_delete_authorization_request is not None: + _body_params = beta_authorization_service_delete_authorization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.authorization.v2beta.AuthorizationService/DeleteAuthorization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_authorizations( self, beta_authorization_service_list_authorizations_request: BetaAuthorizationServiceListAuthorizationsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAuthorizationServiceListAuthorizationsResponse: + """ListAuthorizations + + List Authorizations ListAuthorizations returns all authorizations matching the request and necessary permissions. Required permissions: - \"user.grant.read\" - no permissions required for listing own authorizations + + :param beta_authorization_service_list_authorizations_request: (required) + :type beta_authorization_service_list_authorizations_request: BetaAuthorizationServiceListAuthorizationsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_authorizations_serialize( + beta_authorization_service_list_authorizations_request=beta_authorization_service_list_authorizations_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAuthorizationServiceListAuthorizationsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_authorizations_serialize( + self, + beta_authorization_service_list_authorizations_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_authorization_service_list_authorizations_request is not None: + _body_params = beta_authorization_service_list_authorizations_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.authorization.v2beta.AuthorizationService/ListAuthorizations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_authorization( self, beta_authorization_service_update_authorization_request: BetaAuthorizationServiceUpdateAuthorizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaAuthorizationServiceUpdateAuthorizationResponse: + """UpdateAuthorization + + Update Authorization UpdateAuthorization updates the authorization. Note that any role keys previously granted to the user and not present in the request will be revoked. Required permissions: - \"user.grant.write\" + + :param beta_authorization_service_update_authorization_request: (required) + :type beta_authorization_service_update_authorization_request: BetaAuthorizationServiceUpdateAuthorizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_authorization_serialize( + beta_authorization_service_update_authorization_request=beta_authorization_service_update_authorization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaAuthorizationServiceUpdateAuthorizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_authorization_serialize( + self, + beta_authorization_service_update_authorization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_authorization_service_update_authorization_request is not None: + _body_params = beta_authorization_service_update_authorization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.authorization.v2beta.AuthorizationService/UpdateAuthorization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_feature_service_api.py b/zitadel_client/api/beta_feature_service_api.py new file mode 100644 index 00000000..894a77dd --- /dev/null +++ b/zitadel_client/api/beta_feature_service_api.py @@ -0,0 +1,1587 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict +from zitadel_client.models.beta_feature_service_get_instance_features_request import BetaFeatureServiceGetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_get_instance_features_response import BetaFeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_get_organization_features_request import BetaFeatureServiceGetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_get_organization_features_response import BetaFeatureServiceGetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_get_system_features_response import BetaFeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_get_user_features_request import BetaFeatureServiceGetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_get_user_features_response import BetaFeatureServiceGetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_instance_features_response import BetaFeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_organization_features_request import BetaFeatureServiceResetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_organization_features_response import BetaFeatureServiceResetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_system_features_response import BetaFeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_user_features_request import BetaFeatureServiceResetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_user_features_response import BetaFeatureServiceResetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_set_instance_features_request import BetaFeatureServiceSetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_set_instance_features_response import BetaFeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_set_organization_features_request import BetaFeatureServiceSetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_set_organization_features_response import BetaFeatureServiceSetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_set_system_features_request import BetaFeatureServiceSetSystemFeaturesRequest +from zitadel_client.models.beta_feature_service_set_system_features_response import BetaFeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_set_user_feature_request import BetaFeatureServiceSetUserFeatureRequest +from zitadel_client.models.beta_feature_service_set_user_features_response import BetaFeatureServiceSetUserFeaturesResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaFeatureServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_instance_features( self, beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceGetInstanceFeaturesResponse: + """GetInstanceFeatures + + + :param beta_feature_service_get_instance_features_request: (required) + :type beta_feature_service_get_instance_features_request: BetaFeatureServiceGetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_features_serialize( + beta_feature_service_get_instance_features_request=beta_feature_service_get_instance_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetInstanceFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_instance_features_serialize( + self, + beta_feature_service_get_instance_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_get_instance_features_request is not None: + _body_params = beta_feature_service_get_instance_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetInstanceFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_organization_features( self, beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceGetOrganizationFeaturesResponse: + """GetOrganizationFeatures + + + :param beta_feature_service_get_organization_features_request: (required) + :type beta_feature_service_get_organization_features_request: BetaFeatureServiceGetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_organization_features_serialize( + beta_feature_service_get_organization_features_request=beta_feature_service_get_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetOrganizationFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_organization_features_serialize( + self, + beta_feature_service_get_organization_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_get_organization_features_request is not None: + _body_params = beta_feature_service_get_organization_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetOrganizationFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_system_features( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceGetSystemFeaturesResponse: + if body is None: + body = {} + """GetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetSystemFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_system_features_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetSystemFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_features( self, beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceGetUserFeaturesResponse: + """GetUserFeatures + + + :param beta_feature_service_get_user_features_request: (required) + :type beta_feature_service_get_user_features_request: BetaFeatureServiceGetUserFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_features_serialize( + beta_feature_service_get_user_features_request=beta_feature_service_get_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceGetUserFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_user_features_serialize( + self, + beta_feature_service_get_user_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_get_user_features_request is not None: + _body_params = beta_feature_service_get_user_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/GetUserFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reset_instance_features( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceResetInstanceFeaturesResponse: + if body is None: + body = {} + """ResetInstanceFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_instance_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetInstanceFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _reset_instance_features_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetInstanceFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reset_organization_features( self, beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceResetOrganizationFeaturesResponse: + """ResetOrganizationFeatures + + + :param beta_feature_service_reset_organization_features_request: (required) + :type beta_feature_service_reset_organization_features_request: BetaFeatureServiceResetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_organization_features_serialize( + beta_feature_service_reset_organization_features_request=beta_feature_service_reset_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetOrganizationFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _reset_organization_features_serialize( + self, + beta_feature_service_reset_organization_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_reset_organization_features_request is not None: + _body_params = beta_feature_service_reset_organization_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetOrganizationFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reset_system_features( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceResetSystemFeaturesResponse: + if body is None: + body = {} + """ResetSystemFeatures + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetSystemFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _reset_system_features_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetSystemFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reset_user_features( self, beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceResetUserFeaturesResponse: + """ResetUserFeatures + + + :param beta_feature_service_reset_user_features_request: (required) + :type beta_feature_service_reset_user_features_request: BetaFeatureServiceResetUserFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reset_user_features_serialize( + beta_feature_service_reset_user_features_request=beta_feature_service_reset_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceResetUserFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _reset_user_features_serialize( + self, + beta_feature_service_reset_user_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_reset_user_features_request is not None: + _body_params = beta_feature_service_reset_user_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/ResetUserFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_instance_features( self, beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceSetInstanceFeaturesResponse: + """SetInstanceFeatures + + + :param beta_feature_service_set_instance_features_request: (required) + :type beta_feature_service_set_instance_features_request: BetaFeatureServiceSetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_instance_features_serialize( + beta_feature_service_set_instance_features_request=beta_feature_service_set_instance_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetInstanceFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_instance_features_serialize( + self, + beta_feature_service_set_instance_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_set_instance_features_request is not None: + _body_params = beta_feature_service_set_instance_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetInstanceFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_organization_features( self, beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceSetOrganizationFeaturesResponse: + """SetOrganizationFeatures + + + :param beta_feature_service_set_organization_features_request: (required) + :type beta_feature_service_set_organization_features_request: BetaFeatureServiceSetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_organization_features_serialize( + beta_feature_service_set_organization_features_request=beta_feature_service_set_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetOrganizationFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_organization_features_serialize( + self, + beta_feature_service_set_organization_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_set_organization_features_request is not None: + _body_params = beta_feature_service_set_organization_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetOrganizationFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_system_features( self, beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceSetSystemFeaturesResponse: + """SetSystemFeatures + + + :param beta_feature_service_set_system_features_request: (required) + :type beta_feature_service_set_system_features_request: BetaFeatureServiceSetSystemFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_system_features_serialize( + beta_feature_service_set_system_features_request=beta_feature_service_set_system_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetSystemFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_system_features_serialize( + self, + beta_feature_service_set_system_features_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_set_system_features_request is not None: + _body_params = beta_feature_service_set_system_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetSystemFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_user_features( self, beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaFeatureServiceSetUserFeaturesResponse: + """SetUserFeatures + + + :param beta_feature_service_set_user_feature_request: (required) + :type beta_feature_service_set_user_feature_request: BetaFeatureServiceSetUserFeatureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_user_features_serialize( + beta_feature_service_set_user_feature_request=beta_feature_service_set_user_feature_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaFeatureServiceSetUserFeaturesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_user_features_serialize( + self, + beta_feature_service_set_user_feature_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_feature_service_set_user_feature_request is not None: + _body_params = beta_feature_service_set_user_feature_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.feature.v2beta.FeatureService/SetUserFeatures', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_instance_service_api.py b/zitadel_client/api/beta_instance_service_api.py new file mode 100644 index 00000000..6cbaeb3d --- /dev/null +++ b/zitadel_client/api/beta_instance_service_api.py @@ -0,0 +1,1335 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_instance_service_add_custom_domain_request import BetaInstanceServiceAddCustomDomainRequest +from zitadel_client.models.beta_instance_service_add_custom_domain_response import BetaInstanceServiceAddCustomDomainResponse +from zitadel_client.models.beta_instance_service_add_trusted_domain_request import BetaInstanceServiceAddTrustedDomainRequest +from zitadel_client.models.beta_instance_service_add_trusted_domain_response import BetaInstanceServiceAddTrustedDomainResponse +from zitadel_client.models.beta_instance_service_delete_instance_request import BetaInstanceServiceDeleteInstanceRequest +from zitadel_client.models.beta_instance_service_delete_instance_response import BetaInstanceServiceDeleteInstanceResponse +from zitadel_client.models.beta_instance_service_get_instance_request import BetaInstanceServiceGetInstanceRequest +from zitadel_client.models.beta_instance_service_get_instance_response import BetaInstanceServiceGetInstanceResponse +from zitadel_client.models.beta_instance_service_list_custom_domains_request import BetaInstanceServiceListCustomDomainsRequest +from zitadel_client.models.beta_instance_service_list_custom_domains_response import BetaInstanceServiceListCustomDomainsResponse +from zitadel_client.models.beta_instance_service_list_instances_request import BetaInstanceServiceListInstancesRequest +from zitadel_client.models.beta_instance_service_list_instances_response import BetaInstanceServiceListInstancesResponse +from zitadel_client.models.beta_instance_service_list_trusted_domains_request import BetaInstanceServiceListTrustedDomainsRequest +from zitadel_client.models.beta_instance_service_list_trusted_domains_response import BetaInstanceServiceListTrustedDomainsResponse +from zitadel_client.models.beta_instance_service_remove_custom_domain_request import BetaInstanceServiceRemoveCustomDomainRequest +from zitadel_client.models.beta_instance_service_remove_custom_domain_response import BetaInstanceServiceRemoveCustomDomainResponse +from zitadel_client.models.beta_instance_service_remove_trusted_domain_request import BetaInstanceServiceRemoveTrustedDomainRequest +from zitadel_client.models.beta_instance_service_remove_trusted_domain_response import BetaInstanceServiceRemoveTrustedDomainResponse +from zitadel_client.models.beta_instance_service_update_instance_request import BetaInstanceServiceUpdateInstanceRequest +from zitadel_client.models.beta_instance_service_update_instance_response import BetaInstanceServiceUpdateInstanceResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaInstanceServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_custom_domain( self, beta_instance_service_add_custom_domain_request: BetaInstanceServiceAddCustomDomainRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceAddCustomDomainResponse: + """AddCustomDomain + + Add Custom Domain Adds a custom domain to the instance in context. The instance_id in the input message will be used in the future Required permissions: - `system.domain.write` + + :param beta_instance_service_add_custom_domain_request: (required) + :type beta_instance_service_add_custom_domain_request: BetaInstanceServiceAddCustomDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_custom_domain_serialize( + beta_instance_service_add_custom_domain_request=beta_instance_service_add_custom_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceAddCustomDomainResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_custom_domain_serialize( + self, + beta_instance_service_add_custom_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_add_custom_domain_request is not None: + _body_params = beta_instance_service_add_custom_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/AddCustomDomain', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def add_trusted_domain( self, beta_instance_service_add_trusted_domain_request: BetaInstanceServiceAddTrustedDomainRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceAddTrustedDomainResponse: + """AddTrustedDomain + + Add Trusted Domain Adds a trusted domain to the instance. The instance_id in the input message will be used in the future. Required permissions: - `iam.write` + + :param beta_instance_service_add_trusted_domain_request: (required) + :type beta_instance_service_add_trusted_domain_request: BetaInstanceServiceAddTrustedDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_trusted_domain_serialize( + beta_instance_service_add_trusted_domain_request=beta_instance_service_add_trusted_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceAddTrustedDomainResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_trusted_domain_serialize( + self, + beta_instance_service_add_trusted_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_add_trusted_domain_request is not None: + _body_params = beta_instance_service_add_trusted_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/AddTrustedDomain', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_instance( self, beta_instance_service_delete_instance_request: BetaInstanceServiceDeleteInstanceRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceDeleteInstanceResponse: + """DeleteInstance + + Delete Instance Deletes an instance with the given ID. Required permissions: - `system.instance.delete` + + :param beta_instance_service_delete_instance_request: (required) + :type beta_instance_service_delete_instance_request: BetaInstanceServiceDeleteInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_instance_serialize( + beta_instance_service_delete_instance_request=beta_instance_service_delete_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceDeleteInstanceResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_instance_serialize( + self, + beta_instance_service_delete_instance_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_delete_instance_request is not None: + _body_params = beta_instance_service_delete_instance_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/DeleteInstance', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_instance( self, beta_instance_service_get_instance_request: BetaInstanceServiceGetInstanceRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceGetInstanceResponse: + """GetInstance + + Get Instance Returns the instance in the current context. The instace_id in the input message will be used in the future. Required permissions: - `iam.read` + + :param beta_instance_service_get_instance_request: (required) + :type beta_instance_service_get_instance_request: BetaInstanceServiceGetInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_instance_serialize( + beta_instance_service_get_instance_request=beta_instance_service_get_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceGetInstanceResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_instance_serialize( + self, + beta_instance_service_get_instance_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_get_instance_request is not None: + _body_params = beta_instance_service_get_instance_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/GetInstance', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_custom_domains( self, beta_instance_service_list_custom_domains_request: BetaInstanceServiceListCustomDomainsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceListCustomDomainsResponse: + """ListCustomDomains + + List Custom Domains Lists custom domains of the instance. The instance_id in the input message will be used in the future. Required permissions: - `iam.read` + + :param beta_instance_service_list_custom_domains_request: (required) + :type beta_instance_service_list_custom_domains_request: BetaInstanceServiceListCustomDomainsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_custom_domains_serialize( + beta_instance_service_list_custom_domains_request=beta_instance_service_list_custom_domains_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceListCustomDomainsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_custom_domains_serialize( + self, + beta_instance_service_list_custom_domains_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_list_custom_domains_request is not None: + _body_params = beta_instance_service_list_custom_domains_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/ListCustomDomains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_instances( self, beta_instance_service_list_instances_request: BetaInstanceServiceListInstancesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceListInstancesResponse: + """ListInstances + + List Instances Lists instances matching the given query. The query can be used to filter either by instance ID or domain. The request is paginated and returns 100 results by default. Required permissions: - `system.instance.read` + + :param beta_instance_service_list_instances_request: (required) + :type beta_instance_service_list_instances_request: BetaInstanceServiceListInstancesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_instances_serialize( + beta_instance_service_list_instances_request=beta_instance_service_list_instances_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceListInstancesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_instances_serialize( + self, + beta_instance_service_list_instances_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_list_instances_request is not None: + _body_params = beta_instance_service_list_instances_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/ListInstances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_trusted_domains( self, beta_instance_service_list_trusted_domains_request: BetaInstanceServiceListTrustedDomainsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceListTrustedDomainsResponse: + """ListTrustedDomains + + List Trusted Domains Lists trusted domains of the instance. The instance_id in the input message will be used in the future. Required permissions: - `iam.read` + + :param beta_instance_service_list_trusted_domains_request: (required) + :type beta_instance_service_list_trusted_domains_request: BetaInstanceServiceListTrustedDomainsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_trusted_domains_serialize( + beta_instance_service_list_trusted_domains_request=beta_instance_service_list_trusted_domains_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceListTrustedDomainsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_trusted_domains_serialize( + self, + beta_instance_service_list_trusted_domains_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_list_trusted_domains_request is not None: + _body_params = beta_instance_service_list_trusted_domains_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/ListTrustedDomains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_custom_domain( self, beta_instance_service_remove_custom_domain_request: BetaInstanceServiceRemoveCustomDomainRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceRemoveCustomDomainResponse: + """RemoveCustomDomain + + Remove Custom Domain Removes a custom domain from the instance. The instance_id in the input message will be used in the future. Required permissions: - `system.domain.write` + + :param beta_instance_service_remove_custom_domain_request: (required) + :type beta_instance_service_remove_custom_domain_request: BetaInstanceServiceRemoveCustomDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_custom_domain_serialize( + beta_instance_service_remove_custom_domain_request=beta_instance_service_remove_custom_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceRemoveCustomDomainResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_custom_domain_serialize( + self, + beta_instance_service_remove_custom_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_remove_custom_domain_request is not None: + _body_params = beta_instance_service_remove_custom_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/RemoveCustomDomain', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_trusted_domain( self, beta_instance_service_remove_trusted_domain_request: BetaInstanceServiceRemoveTrustedDomainRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceRemoveTrustedDomainResponse: + """RemoveTrustedDomain + + Remove Trusted Domain Removes a trusted domain from the instance. The instance_id in the input message will be used in the future. Required permissions: - `iam.write` + + :param beta_instance_service_remove_trusted_domain_request: (required) + :type beta_instance_service_remove_trusted_domain_request: BetaInstanceServiceRemoveTrustedDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_trusted_domain_serialize( + beta_instance_service_remove_trusted_domain_request=beta_instance_service_remove_trusted_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceRemoveTrustedDomainResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_trusted_domain_serialize( + self, + beta_instance_service_remove_trusted_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_remove_trusted_domain_request is not None: + _body_params = beta_instance_service_remove_trusted_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/RemoveTrustedDomain', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_instance( self, beta_instance_service_update_instance_request: BetaInstanceServiceUpdateInstanceRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInstanceServiceUpdateInstanceResponse: + """UpdateInstance + + Update Instance Updates instance in context with the given name. The instance_id in the input message will be used in the future. Required permissions: - `iam.write` + + :param beta_instance_service_update_instance_request: (required) + :type beta_instance_service_update_instance_request: BetaInstanceServiceUpdateInstanceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_instance_serialize( + beta_instance_service_update_instance_request=beta_instance_service_update_instance_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInstanceServiceUpdateInstanceResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_instance_serialize( + self, + beta_instance_service_update_instance_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_instance_service_update_instance_request is not None: + _body_params = beta_instance_service_update_instance_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.instance.v2beta.InstanceService/UpdateInstance', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_internal_permission_service_api.py b/zitadel_client/api/beta_internal_permission_service_api.py new file mode 100644 index 00000000..60e2a51f --- /dev/null +++ b/zitadel_client/api/beta_internal_permission_service_api.py @@ -0,0 +1,555 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_internal_permission_service_create_administrator_request import BetaInternalPermissionServiceCreateAdministratorRequest +from zitadel_client.models.beta_internal_permission_service_create_administrator_response import BetaInternalPermissionServiceCreateAdministratorResponse +from zitadel_client.models.beta_internal_permission_service_delete_administrator_request import BetaInternalPermissionServiceDeleteAdministratorRequest +from zitadel_client.models.beta_internal_permission_service_delete_administrator_response import BetaInternalPermissionServiceDeleteAdministratorResponse +from zitadel_client.models.beta_internal_permission_service_list_administrators_request import BetaInternalPermissionServiceListAdministratorsRequest +from zitadel_client.models.beta_internal_permission_service_list_administrators_response import BetaInternalPermissionServiceListAdministratorsResponse +from zitadel_client.models.beta_internal_permission_service_update_administrator_request import BetaInternalPermissionServiceUpdateAdministratorRequest +from zitadel_client.models.beta_internal_permission_service_update_administrator_response import BetaInternalPermissionServiceUpdateAdministratorResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaInternalPermissionServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_administrator( self, beta_internal_permission_service_create_administrator_request: BetaInternalPermissionServiceCreateAdministratorRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInternalPermissionServiceCreateAdministratorResponse: + """CreateAdministrator + + CreateAdministrator grants a administrator role to a user for a specific resource. Note that the roles are specific to the resource type. This means that if you want to grant a user the administrator role for an organization and a project, you need to create two administrator roles. Required permissions depend on the resource type: - \"iam.member.write\" for instance administrators - \"org.member.write\" for organization administrators - \"project.member.write\" for project administrators - \"project.grant.member.write\" for project grant administrators + + :param beta_internal_permission_service_create_administrator_request: (required) + :type beta_internal_permission_service_create_administrator_request: BetaInternalPermissionServiceCreateAdministratorRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_administrator_serialize( + beta_internal_permission_service_create_administrator_request=beta_internal_permission_service_create_administrator_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInternalPermissionServiceCreateAdministratorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_administrator_serialize( + self, + beta_internal_permission_service_create_administrator_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_internal_permission_service_create_administrator_request is not None: + _body_params = beta_internal_permission_service_create_administrator_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.internal_permission.v2beta.InternalPermissionService/CreateAdministrator', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_administrator( self, beta_internal_permission_service_delete_administrator_request: BetaInternalPermissionServiceDeleteAdministratorRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInternalPermissionServiceDeleteAdministratorResponse: + """DeleteAdministrator + + DeleteAdministrator revokes a administrator role from a user. In case the administrator role is not found, the request will return a successful response as the desired state is already achieved. You can check the deletion date in the response to verify if the administrator role was deleted during the request. Required permissions depend on the resource type: - \"iam.member.delete\" for instance administrators - \"org.member.delete\" for organization administrators - \"project.member.delete\" for project administrators - \"project.grant.member.delete\" for project grant administrators + + :param beta_internal_permission_service_delete_administrator_request: (required) + :type beta_internal_permission_service_delete_administrator_request: BetaInternalPermissionServiceDeleteAdministratorRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_administrator_serialize( + beta_internal_permission_service_delete_administrator_request=beta_internal_permission_service_delete_administrator_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInternalPermissionServiceDeleteAdministratorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_administrator_serialize( + self, + beta_internal_permission_service_delete_administrator_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_internal_permission_service_delete_administrator_request is not None: + _body_params = beta_internal_permission_service_delete_administrator_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.internal_permission.v2beta.InternalPermissionService/DeleteAdministrator', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_administrators( self, beta_internal_permission_service_list_administrators_request: BetaInternalPermissionServiceListAdministratorsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInternalPermissionServiceListAdministratorsResponse: + """ListAdministrators + + ListAdministrators returns all administrators and its roles matching the request and necessary permissions. Required permissions depend on the resource type: - \"iam.member.read\" for instance administrators - \"org.member.read\" for organization administrators - \"project.member.read\" for project administrators - \"project.grant.member.read\" for project grant administrators - no permissions required for listing own administrator roles + + :param beta_internal_permission_service_list_administrators_request: (required) + :type beta_internal_permission_service_list_administrators_request: BetaInternalPermissionServiceListAdministratorsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_administrators_serialize( + beta_internal_permission_service_list_administrators_request=beta_internal_permission_service_list_administrators_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInternalPermissionServiceListAdministratorsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_administrators_serialize( + self, + beta_internal_permission_service_list_administrators_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_internal_permission_service_list_administrators_request is not None: + _body_params = beta_internal_permission_service_list_administrators_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.internal_permission.v2beta.InternalPermissionService/ListAdministrators', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_administrator( self, beta_internal_permission_service_update_administrator_request: BetaInternalPermissionServiceUpdateAdministratorRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaInternalPermissionServiceUpdateAdministratorResponse: + """UpdateAdministrator + + UpdateAdministrator updates the specific administrator role. Note that any role previously granted to the user and not present in the request will be revoked. Required permissions depend on the resource type: - \"iam.member.write\" for instance administrators - \"org.member.write\" for organization administrators - \"project.member.write\" for project administrators - \"project.grant.member.write\" for project grant administrators + + :param beta_internal_permission_service_update_administrator_request: (required) + :type beta_internal_permission_service_update_administrator_request: BetaInternalPermissionServiceUpdateAdministratorRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_administrator_serialize( + beta_internal_permission_service_update_administrator_request=beta_internal_permission_service_update_administrator_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaInternalPermissionServiceUpdateAdministratorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_administrator_serialize( + self, + beta_internal_permission_service_update_administrator_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_internal_permission_service_update_administrator_request is not None: + _body_params = beta_internal_permission_service_update_administrator_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.internal_permission.v2beta.InternalPermissionService/UpdateAdministrator', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_oidc_service_api.py b/zitadel_client/api/beta_oidc_service_api.py new file mode 100644 index 00000000..494e38cc --- /dev/null +++ b/zitadel_client/api/beta_oidc_service_api.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_oidc_service_create_callback_request import BetaOIDCServiceCreateCallbackRequest +from zitadel_client.models.beta_oidc_service_create_callback_response import BetaOIDCServiceCreateCallbackResponse +from zitadel_client.models.beta_oidc_service_get_auth_request_request import BetaOIDCServiceGetAuthRequestRequest +from zitadel_client.models.beta_oidc_service_get_auth_request_response import BetaOIDCServiceGetAuthRequestResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaOIDCServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_callback( self, beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOIDCServiceCreateCallbackResponse: + """CreateCallback + + + :param beta_oidc_service_create_callback_request: (required) + :type beta_oidc_service_create_callback_request: BetaOIDCServiceCreateCallbackRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_callback_serialize( + beta_oidc_service_create_callback_request=beta_oidc_service_create_callback_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOIDCServiceCreateCallbackResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_callback_serialize( + self, + beta_oidc_service_create_callback_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_oidc_service_create_callback_request is not None: + _body_params = beta_oidc_service_create_callback_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.oidc.v2beta.OIDCService/CreateCallback', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_auth_request( self, beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOIDCServiceGetAuthRequestResponse: + """GetAuthRequest + + + :param beta_oidc_service_get_auth_request_request: (required) + :type beta_oidc_service_get_auth_request_request: BetaOIDCServiceGetAuthRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_request_serialize( + beta_oidc_service_get_auth_request_request=beta_oidc_service_get_auth_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOIDCServiceGetAuthRequestResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_auth_request_serialize( + self, + beta_oidc_service_get_auth_request_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_oidc_service_get_auth_request_request is not None: + _body_params = beta_oidc_service_get_auth_request_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.oidc.v2beta.OIDCService/GetAuthRequest', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_organization_service_api.py b/zitadel_client/api/beta_organization_service_api.py new file mode 100644 index 00000000..59af5012 --- /dev/null +++ b/zitadel_client/api/beta_organization_service_api.py @@ -0,0 +1,1855 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_organization_service_activate_organization_request import BetaOrganizationServiceActivateOrganizationRequest +from zitadel_client.models.beta_organization_service_activate_organization_response import BetaOrganizationServiceActivateOrganizationResponse +from zitadel_client.models.beta_organization_service_add_organization_domain_request import BetaOrganizationServiceAddOrganizationDomainRequest +from zitadel_client.models.beta_organization_service_add_organization_domain_response import BetaOrganizationServiceAddOrganizationDomainResponse +from zitadel_client.models.beta_organization_service_create_organization_request import BetaOrganizationServiceCreateOrganizationRequest +from zitadel_client.models.beta_organization_service_create_organization_response import BetaOrganizationServiceCreateOrganizationResponse +from zitadel_client.models.beta_organization_service_deactivate_organization_request import BetaOrganizationServiceDeactivateOrganizationRequest +from zitadel_client.models.beta_organization_service_deactivate_organization_response import BetaOrganizationServiceDeactivateOrganizationResponse +from zitadel_client.models.beta_organization_service_delete_organization_domain_request import BetaOrganizationServiceDeleteOrganizationDomainRequest +from zitadel_client.models.beta_organization_service_delete_organization_domain_response import BetaOrganizationServiceDeleteOrganizationDomainResponse +from zitadel_client.models.beta_organization_service_delete_organization_metadata_request import BetaOrganizationServiceDeleteOrganizationMetadataRequest +from zitadel_client.models.beta_organization_service_delete_organization_metadata_response import BetaOrganizationServiceDeleteOrganizationMetadataResponse +from zitadel_client.models.beta_organization_service_delete_organization_request import BetaOrganizationServiceDeleteOrganizationRequest +from zitadel_client.models.beta_organization_service_delete_organization_response import BetaOrganizationServiceDeleteOrganizationResponse +from zitadel_client.models.beta_organization_service_generate_organization_domain_validation_request import BetaOrganizationServiceGenerateOrganizationDomainValidationRequest +from zitadel_client.models.beta_organization_service_generate_organization_domain_validation_response import BetaOrganizationServiceGenerateOrganizationDomainValidationResponse +from zitadel_client.models.beta_organization_service_list_organization_domains_request import BetaOrganizationServiceListOrganizationDomainsRequest +from zitadel_client.models.beta_organization_service_list_organization_domains_response import BetaOrganizationServiceListOrganizationDomainsResponse +from zitadel_client.models.beta_organization_service_list_organization_metadata_request import BetaOrganizationServiceListOrganizationMetadataRequest +from zitadel_client.models.beta_organization_service_list_organization_metadata_response import BetaOrganizationServiceListOrganizationMetadataResponse +from zitadel_client.models.beta_organization_service_list_organizations_request import BetaOrganizationServiceListOrganizationsRequest +from zitadel_client.models.beta_organization_service_list_organizations_response import BetaOrganizationServiceListOrganizationsResponse +from zitadel_client.models.beta_organization_service_set_organization_metadata_request import BetaOrganizationServiceSetOrganizationMetadataRequest +from zitadel_client.models.beta_organization_service_set_organization_metadata_response import BetaOrganizationServiceSetOrganizationMetadataResponse +from zitadel_client.models.beta_organization_service_update_organization_request import BetaOrganizationServiceUpdateOrganizationRequest +from zitadel_client.models.beta_organization_service_update_organization_response import BetaOrganizationServiceUpdateOrganizationResponse +from zitadel_client.models.beta_organization_service_verify_organization_domain_request import BetaOrganizationServiceVerifyOrganizationDomainRequest +from zitadel_client.models.beta_organization_service_verify_organization_domain_response import BetaOrganizationServiceVerifyOrganizationDomainResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaOrganizationServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def activate_organization( self, beta_organization_service_activate_organization_request: BetaOrganizationServiceActivateOrganizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceActivateOrganizationResponse: + """ActivateOrganization + + Activate Organization Set the state of my organization to active. The state of the organization has to be deactivated to perform the request. Users of this organization will be able to log in again. Required permission: - `org.write` + + :param beta_organization_service_activate_organization_request: (required) + :type beta_organization_service_activate_organization_request: BetaOrganizationServiceActivateOrganizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_organization_serialize( + beta_organization_service_activate_organization_request=beta_organization_service_activate_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceActivateOrganizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _activate_organization_serialize( + self, + beta_organization_service_activate_organization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_activate_organization_request is not None: + _body_params = beta_organization_service_activate_organization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/ActivateOrganization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def add_organization_domain( self, beta_organization_service_add_organization_domain_request: BetaOrganizationServiceAddOrganizationDomainRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceAddOrganizationDomainResponse: + """AddOrganizationDomain + + Add Organization Domain Add a new domain to an organization. The domains are used to identify to which organization a user belongs. Required permission: - `org.write` + + :param beta_organization_service_add_organization_domain_request: (required) + :type beta_organization_service_add_organization_domain_request: BetaOrganizationServiceAddOrganizationDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_organization_domain_serialize( + beta_organization_service_add_organization_domain_request=beta_organization_service_add_organization_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceAddOrganizationDomainResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_organization_domain_serialize( + self, + beta_organization_service_add_organization_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_add_organization_domain_request is not None: + _body_params = beta_organization_service_add_organization_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/AddOrganizationDomain', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_organization( self, beta_organization_service_create_organization_request: BetaOrganizationServiceCreateOrganizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceCreateOrganizationResponse: + """CreateOrganization + + Create Organization Create a new organization with an administrative user. If no specific roles are sent for the users, they will be granted the role ORG_OWNER. Required permission: - `org.create` + + :param beta_organization_service_create_organization_request: (required) + :type beta_organization_service_create_organization_request: BetaOrganizationServiceCreateOrganizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_organization_serialize( + beta_organization_service_create_organization_request=beta_organization_service_create_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceCreateOrganizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_organization_serialize( + self, + beta_organization_service_create_organization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_create_organization_request is not None: + _body_params = beta_organization_service_create_organization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/CreateOrganization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def deactivate_organization( self, beta_organization_service_deactivate_organization_request: BetaOrganizationServiceDeactivateOrganizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceDeactivateOrganizationResponse: + """DeactivateOrganization + + Deactivate Organization Sets the state of my organization to deactivated. Users of this organization will not be able to log in. Required permission: - `org.write` + + :param beta_organization_service_deactivate_organization_request: (required) + :type beta_organization_service_deactivate_organization_request: BetaOrganizationServiceDeactivateOrganizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deactivate_organization_serialize( + beta_organization_service_deactivate_organization_request=beta_organization_service_deactivate_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceDeactivateOrganizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _deactivate_organization_serialize( + self, + beta_organization_service_deactivate_organization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_deactivate_organization_request is not None: + _body_params = beta_organization_service_deactivate_organization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/DeactivateOrganization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_organization( self, beta_organization_service_delete_organization_request: BetaOrganizationServiceDeleteOrganizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceDeleteOrganizationResponse: + """DeleteOrganization + + Delete Organization Deletes the organization and all its resources (Users, Projects, Grants to and from the org). Users of this organization will not be able to log in. Required permission: - `org.delete` + + :param beta_organization_service_delete_organization_request: (required) + :type beta_organization_service_delete_organization_request: BetaOrganizationServiceDeleteOrganizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_organization_serialize( + beta_organization_service_delete_organization_request=beta_organization_service_delete_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceDeleteOrganizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_organization_serialize( + self, + beta_organization_service_delete_organization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_delete_organization_request is not None: + _body_params = beta_organization_service_delete_organization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/DeleteOrganization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_organization_domain( self, beta_organization_service_delete_organization_domain_request: BetaOrganizationServiceDeleteOrganizationDomainRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceDeleteOrganizationDomainResponse: + """DeleteOrganizationDomain + + Delete Organization Domain Delete a new domain from an organization. The domains are used to identify to which organization a user belongs. If the uses use the domain for login, this will not be possible afterwards. They have to use another domain instead. Required permission: - `org.write` + + :param beta_organization_service_delete_organization_domain_request: (required) + :type beta_organization_service_delete_organization_domain_request: BetaOrganizationServiceDeleteOrganizationDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_organization_domain_serialize( + beta_organization_service_delete_organization_domain_request=beta_organization_service_delete_organization_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceDeleteOrganizationDomainResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_organization_domain_serialize( + self, + beta_organization_service_delete_organization_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_delete_organization_domain_request is not None: + _body_params = beta_organization_service_delete_organization_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/DeleteOrganizationDomain', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_organization_metadata( self, beta_organization_service_delete_organization_metadata_request: BetaOrganizationServiceDeleteOrganizationMetadataRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceDeleteOrganizationMetadataResponse: + """DeleteOrganizationMetadata + + Delete Organization Metadata Delete metadata objects from an organization with a specific key. Required permission: - `org.write` + + :param beta_organization_service_delete_organization_metadata_request: (required) + :type beta_organization_service_delete_organization_metadata_request: BetaOrganizationServiceDeleteOrganizationMetadataRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_organization_metadata_serialize( + beta_organization_service_delete_organization_metadata_request=beta_organization_service_delete_organization_metadata_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceDeleteOrganizationMetadataResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_organization_metadata_serialize( + self, + beta_organization_service_delete_organization_metadata_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_delete_organization_metadata_request is not None: + _body_params = beta_organization_service_delete_organization_metadata_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/DeleteOrganizationMetadata', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def generate_organization_domain_validation( self, beta_organization_service_generate_organization_domain_validation_request: BetaOrganizationServiceGenerateOrganizationDomainValidationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceGenerateOrganizationDomainValidationResponse: + """GenerateOrganizationDomainValidation + + Generate Organization Domain Validation Generate a new file to be able to verify your domain with DNS or HTTP challenge. Required permission: - `org.write` + + :param beta_organization_service_generate_organization_domain_validation_request: (required) + :type beta_organization_service_generate_organization_domain_validation_request: BetaOrganizationServiceGenerateOrganizationDomainValidationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._generate_organization_domain_validation_serialize( + beta_organization_service_generate_organization_domain_validation_request=beta_organization_service_generate_organization_domain_validation_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceGenerateOrganizationDomainValidationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _generate_organization_domain_validation_serialize( + self, + beta_organization_service_generate_organization_domain_validation_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_generate_organization_domain_validation_request is not None: + _body_params = beta_organization_service_generate_organization_domain_validation_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/GenerateOrganizationDomainValidation', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_organization_domains( self, beta_organization_service_list_organization_domains_request: BetaOrganizationServiceListOrganizationDomainsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceListOrganizationDomainsResponse: + """ListOrganizationDomains + + List Organization Domains Returns the list of registered domains of an organization. The domains are used to identify to which organization a user belongs. Required permission: - `org.read` + + :param beta_organization_service_list_organization_domains_request: (required) + :type beta_organization_service_list_organization_domains_request: BetaOrganizationServiceListOrganizationDomainsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_domains_serialize( + beta_organization_service_list_organization_domains_request=beta_organization_service_list_organization_domains_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceListOrganizationDomainsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_organization_domains_serialize( + self, + beta_organization_service_list_organization_domains_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_list_organization_domains_request is not None: + _body_params = beta_organization_service_list_organization_domains_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/ListOrganizationDomains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_organization_metadata( self, beta_organization_service_list_organization_metadata_request: BetaOrganizationServiceListOrganizationMetadataRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceListOrganizationMetadataResponse: + """ListOrganizationMetadata + + List Organization Metadata List metadata of an organization filtered by query. Required permission: - `org.read` + + :param beta_organization_service_list_organization_metadata_request: (required) + :type beta_organization_service_list_organization_metadata_request: BetaOrganizationServiceListOrganizationMetadataRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organization_metadata_serialize( + beta_organization_service_list_organization_metadata_request=beta_organization_service_list_organization_metadata_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceListOrganizationMetadataResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_organization_metadata_serialize( + self, + beta_organization_service_list_organization_metadata_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_list_organization_metadata_request is not None: + _body_params = beta_organization_service_list_organization_metadata_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/ListOrganizationMetadata', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_organizations( self, beta_organization_service_list_organizations_request: BetaOrganizationServiceListOrganizationsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceListOrganizationsResponse: + """ListOrganizations + + List Organizations Returns a list of organizations that match the requesting filters. All filters are applied with an AND condition. Required permission: - `iam.read` + + :param beta_organization_service_list_organizations_request: (required) + :type beta_organization_service_list_organizations_request: BetaOrganizationServiceListOrganizationsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_organizations_serialize( + beta_organization_service_list_organizations_request=beta_organization_service_list_organizations_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceListOrganizationsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_organizations_serialize( + self, + beta_organization_service_list_organizations_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_list_organizations_request is not None: + _body_params = beta_organization_service_list_organizations_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/ListOrganizations', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_organization_metadata( self, beta_organization_service_set_organization_metadata_request: BetaOrganizationServiceSetOrganizationMetadataRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceSetOrganizationMetadataResponse: + """SetOrganizationMetadata + + Set Organization Metadata Adds or updates a metadata value for the requested key. Make sure the value is base64 encoded. Required permission: - `org.write` + + :param beta_organization_service_set_organization_metadata_request: (required) + :type beta_organization_service_set_organization_metadata_request: BetaOrganizationServiceSetOrganizationMetadataRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_organization_metadata_serialize( + beta_organization_service_set_organization_metadata_request=beta_organization_service_set_organization_metadata_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceSetOrganizationMetadataResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_organization_metadata_serialize( + self, + beta_organization_service_set_organization_metadata_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_set_organization_metadata_request is not None: + _body_params = beta_organization_service_set_organization_metadata_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/SetOrganizationMetadata', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_organization( self, beta_organization_service_update_organization_request: BetaOrganizationServiceUpdateOrganizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceUpdateOrganizationResponse: + """UpdateOrganization + + Update Organization Change the name of the organization. Required permission: - `org.write` + + :param beta_organization_service_update_organization_request: (required) + :type beta_organization_service_update_organization_request: BetaOrganizationServiceUpdateOrganizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_serialize( + beta_organization_service_update_organization_request=beta_organization_service_update_organization_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceUpdateOrganizationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_organization_serialize( + self, + beta_organization_service_update_organization_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_update_organization_request is not None: + _body_params = beta_organization_service_update_organization_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/UpdateOrganization', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def verify_organization_domain( self, beta_organization_service_verify_organization_domain_request: BetaOrganizationServiceVerifyOrganizationDomainRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaOrganizationServiceVerifyOrganizationDomainResponse: + """VerifyOrganizationDomain + + Verify Organization Domain Make sure you have added the required verification to your domain, depending on the method you have chosen (HTTP or DNS challenge). ZITADEL will check it and set the domain as verified if it was successful. A verify domain has to be unique. Required permission: - `org.write` + + :param beta_organization_service_verify_organization_domain_request: (required) + :type beta_organization_service_verify_organization_domain_request: BetaOrganizationServiceVerifyOrganizationDomainRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._verify_organization_domain_serialize( + beta_organization_service_verify_organization_domain_request=beta_organization_service_verify_organization_domain_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaOrganizationServiceVerifyOrganizationDomainResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _verify_organization_domain_serialize( + self, + beta_organization_service_verify_organization_domain_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_organization_service_verify_organization_domain_request is not None: + _body_params = beta_organization_service_verify_organization_domain_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.org.v2beta.OrganizationService/VerifyOrganizationDomain', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_project_service_api.py b/zitadel_client/api/beta_project_service_api.py new file mode 100644 index 00000000..ade527e8 --- /dev/null +++ b/zitadel_client/api/beta_project_service_api.py @@ -0,0 +1,2245 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_project_service_activate_project_grant_request import BetaProjectServiceActivateProjectGrantRequest +from zitadel_client.models.beta_project_service_activate_project_grant_response import BetaProjectServiceActivateProjectGrantResponse +from zitadel_client.models.beta_project_service_activate_project_request import BetaProjectServiceActivateProjectRequest +from zitadel_client.models.beta_project_service_activate_project_response import BetaProjectServiceActivateProjectResponse +from zitadel_client.models.beta_project_service_add_project_role_request import BetaProjectServiceAddProjectRoleRequest +from zitadel_client.models.beta_project_service_add_project_role_response import BetaProjectServiceAddProjectRoleResponse +from zitadel_client.models.beta_project_service_create_project_grant_request import BetaProjectServiceCreateProjectGrantRequest +from zitadel_client.models.beta_project_service_create_project_grant_response import BetaProjectServiceCreateProjectGrantResponse +from zitadel_client.models.beta_project_service_create_project_request import BetaProjectServiceCreateProjectRequest +from zitadel_client.models.beta_project_service_create_project_response import BetaProjectServiceCreateProjectResponse +from zitadel_client.models.beta_project_service_deactivate_project_grant_request import BetaProjectServiceDeactivateProjectGrantRequest +from zitadel_client.models.beta_project_service_deactivate_project_grant_response import BetaProjectServiceDeactivateProjectGrantResponse +from zitadel_client.models.beta_project_service_deactivate_project_request import BetaProjectServiceDeactivateProjectRequest +from zitadel_client.models.beta_project_service_deactivate_project_response import BetaProjectServiceDeactivateProjectResponse +from zitadel_client.models.beta_project_service_delete_project_grant_request import BetaProjectServiceDeleteProjectGrantRequest +from zitadel_client.models.beta_project_service_delete_project_grant_response import BetaProjectServiceDeleteProjectGrantResponse +from zitadel_client.models.beta_project_service_delete_project_request import BetaProjectServiceDeleteProjectRequest +from zitadel_client.models.beta_project_service_delete_project_response import BetaProjectServiceDeleteProjectResponse +from zitadel_client.models.beta_project_service_get_project_request import BetaProjectServiceGetProjectRequest +from zitadel_client.models.beta_project_service_get_project_response import BetaProjectServiceGetProjectResponse +from zitadel_client.models.beta_project_service_list_project_grants_request import BetaProjectServiceListProjectGrantsRequest +from zitadel_client.models.beta_project_service_list_project_grants_response import BetaProjectServiceListProjectGrantsResponse +from zitadel_client.models.beta_project_service_list_project_roles_request import BetaProjectServiceListProjectRolesRequest +from zitadel_client.models.beta_project_service_list_project_roles_response import BetaProjectServiceListProjectRolesResponse +from zitadel_client.models.beta_project_service_list_projects_request import BetaProjectServiceListProjectsRequest +from zitadel_client.models.beta_project_service_list_projects_response import BetaProjectServiceListProjectsResponse +from zitadel_client.models.beta_project_service_remove_project_role_request import BetaProjectServiceRemoveProjectRoleRequest +from zitadel_client.models.beta_project_service_remove_project_role_response import BetaProjectServiceRemoveProjectRoleResponse +from zitadel_client.models.beta_project_service_update_project_grant_request import BetaProjectServiceUpdateProjectGrantRequest +from zitadel_client.models.beta_project_service_update_project_grant_response import BetaProjectServiceUpdateProjectGrantResponse +from zitadel_client.models.beta_project_service_update_project_request import BetaProjectServiceUpdateProjectRequest +from zitadel_client.models.beta_project_service_update_project_response import BetaProjectServiceUpdateProjectResponse +from zitadel_client.models.beta_project_service_update_project_role_request import BetaProjectServiceUpdateProjectRoleRequest +from zitadel_client.models.beta_project_service_update_project_role_response import BetaProjectServiceUpdateProjectRoleResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaProjectServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def activate_project( self, beta_project_service_activate_project_request: BetaProjectServiceActivateProjectRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceActivateProjectResponse: + """ActivateProject + + Activate Project Set the state of a project to active. Request returns no error if the project is already activated. Required permission: - `project.write` + + :param beta_project_service_activate_project_request: (required) + :type beta_project_service_activate_project_request: BetaProjectServiceActivateProjectRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_project_serialize( + beta_project_service_activate_project_request=beta_project_service_activate_project_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceActivateProjectResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _activate_project_serialize( + self, + beta_project_service_activate_project_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_activate_project_request is not None: + _body_params = beta_project_service_activate_project_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/ActivateProject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def activate_project_grant( self, beta_project_service_activate_project_grant_request: BetaProjectServiceActivateProjectGrantRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceActivateProjectGrantResponse: + """ActivateProjectGrant + + Activate Project Grant Set the state of the project grant to activated. Required permission: - `project.grant.write` + + :param beta_project_service_activate_project_grant_request: (required) + :type beta_project_service_activate_project_grant_request: BetaProjectServiceActivateProjectGrantRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_project_grant_serialize( + beta_project_service_activate_project_grant_request=beta_project_service_activate_project_grant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceActivateProjectGrantResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _activate_project_grant_serialize( + self, + beta_project_service_activate_project_grant_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_activate_project_grant_request is not None: + _body_params = beta_project_service_activate_project_grant_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/ActivateProjectGrant', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def add_project_role( self, beta_project_service_add_project_role_request: BetaProjectServiceAddProjectRoleRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceAddProjectRoleResponse: + """AddProjectRole + + Add Project Role Add a new project role to a project. The key must be unique within the project. Required permission: - `project.role.write` + + :param beta_project_service_add_project_role_request: (required) + :type beta_project_service_add_project_role_request: BetaProjectServiceAddProjectRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_project_role_serialize( + beta_project_service_add_project_role_request=beta_project_service_add_project_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceAddProjectRoleResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_project_role_serialize( + self, + beta_project_service_add_project_role_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_add_project_role_request is not None: + _body_params = beta_project_service_add_project_role_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/AddProjectRole', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_project( self, beta_project_service_create_project_request: BetaProjectServiceCreateProjectRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceCreateProjectResponse: + """CreateProject + + Create Project Create a new Project. Required permission: - `project.create` + + :param beta_project_service_create_project_request: (required) + :type beta_project_service_create_project_request: BetaProjectServiceCreateProjectRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_project_serialize( + beta_project_service_create_project_request=beta_project_service_create_project_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceCreateProjectResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_project_serialize( + self, + beta_project_service_create_project_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_create_project_request is not None: + _body_params = beta_project_service_create_project_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/CreateProject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_project_grant( self, beta_project_service_create_project_grant_request: BetaProjectServiceCreateProjectGrantRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceCreateProjectGrantResponse: + """CreateProjectGrant + + Create Project Grant Grant a project to another organization. The project grant will allow the granted organization to access the project and manage the authorizations for its users. Required permission: - `project.grant.create` + + :param beta_project_service_create_project_grant_request: (required) + :type beta_project_service_create_project_grant_request: BetaProjectServiceCreateProjectGrantRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_project_grant_serialize( + beta_project_service_create_project_grant_request=beta_project_service_create_project_grant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceCreateProjectGrantResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_project_grant_serialize( + self, + beta_project_service_create_project_grant_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_create_project_grant_request is not None: + _body_params = beta_project_service_create_project_grant_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/CreateProjectGrant', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def deactivate_project( self, beta_project_service_deactivate_project_request: BetaProjectServiceDeactivateProjectRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceDeactivateProjectResponse: + """DeactivateProject + + Deactivate Project Set the state of a project to deactivated. Request returns no error if the project is already deactivated. Applications under deactivated projects are not able to login anymore. Required permission: - `project.write` + + :param beta_project_service_deactivate_project_request: (required) + :type beta_project_service_deactivate_project_request: BetaProjectServiceDeactivateProjectRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deactivate_project_serialize( + beta_project_service_deactivate_project_request=beta_project_service_deactivate_project_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceDeactivateProjectResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _deactivate_project_serialize( + self, + beta_project_service_deactivate_project_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_deactivate_project_request is not None: + _body_params = beta_project_service_deactivate_project_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/DeactivateProject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def deactivate_project_grant( self, beta_project_service_deactivate_project_grant_request: BetaProjectServiceDeactivateProjectGrantRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceDeactivateProjectGrantResponse: + """DeactivateProjectGrant + + Deactivate Project Grant Set the state of the project grant to deactivated. Applications under deactivated projects grants are not able to login anymore. Required permission: - `project.grant.write` + + :param beta_project_service_deactivate_project_grant_request: (required) + :type beta_project_service_deactivate_project_grant_request: BetaProjectServiceDeactivateProjectGrantRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deactivate_project_grant_serialize( + beta_project_service_deactivate_project_grant_request=beta_project_service_deactivate_project_grant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceDeactivateProjectGrantResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _deactivate_project_grant_serialize( + self, + beta_project_service_deactivate_project_grant_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_deactivate_project_grant_request is not None: + _body_params = beta_project_service_deactivate_project_grant_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/DeactivateProjectGrant', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_project( self, beta_project_service_delete_project_request: BetaProjectServiceDeleteProjectRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceDeleteProjectResponse: + """DeleteProject + + Delete Project Delete an existing project. In case the project is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `project.delete` + + :param beta_project_service_delete_project_request: (required) + :type beta_project_service_delete_project_request: BetaProjectServiceDeleteProjectRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_project_serialize( + beta_project_service_delete_project_request=beta_project_service_delete_project_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceDeleteProjectResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_project_serialize( + self, + beta_project_service_delete_project_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_delete_project_request is not None: + _body_params = beta_project_service_delete_project_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/DeleteProject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_project_grant( self, beta_project_service_delete_project_grant_request: BetaProjectServiceDeleteProjectGrantRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceDeleteProjectGrantResponse: + """DeleteProjectGrant + + Delete Project Grant Delete a project grant. All user grants for this project grant will also be removed. A user will not have access to the project afterward (if permissions are checked). In case the project grant is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `project.grant.delete` + + :param beta_project_service_delete_project_grant_request: (required) + :type beta_project_service_delete_project_grant_request: BetaProjectServiceDeleteProjectGrantRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_project_grant_serialize( + beta_project_service_delete_project_grant_request=beta_project_service_delete_project_grant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceDeleteProjectGrantResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_project_grant_serialize( + self, + beta_project_service_delete_project_grant_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_delete_project_grant_request is not None: + _body_params = beta_project_service_delete_project_grant_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/DeleteProjectGrant', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_project( self, beta_project_service_get_project_request: BetaProjectServiceGetProjectRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceGetProjectResponse: + """GetProject + + Get Project Returns the project identified by the requested ID. Required permission: - `project.read` + + :param beta_project_service_get_project_request: (required) + :type beta_project_service_get_project_request: BetaProjectServiceGetProjectRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_project_serialize( + beta_project_service_get_project_request=beta_project_service_get_project_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceGetProjectResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_project_serialize( + self, + beta_project_service_get_project_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_get_project_request is not None: + _body_params = beta_project_service_get_project_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/GetProject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_project_grants( self, beta_project_service_list_project_grants_request: BetaProjectServiceListProjectGrantsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceListProjectGrantsResponse: + """ListProjectGrants + + List Project Grants Returns a list of project grants. A project grant is when the organization grants its project to another organization. Required permission: - `project.grant.write` + + :param beta_project_service_list_project_grants_request: (required) + :type beta_project_service_list_project_grants_request: BetaProjectServiceListProjectGrantsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_project_grants_serialize( + beta_project_service_list_project_grants_request=beta_project_service_list_project_grants_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceListProjectGrantsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_project_grants_serialize( + self, + beta_project_service_list_project_grants_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_list_project_grants_request is not None: + _body_params = beta_project_service_list_project_grants_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/ListProjectGrants', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_project_roles( self, beta_project_service_list_project_roles_request: BetaProjectServiceListProjectRolesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceListProjectRolesResponse: + """ListProjectRoles + + List Project Roles Returns all roles of a project matching the search query. Required permission: - `project.role.read` + + :param beta_project_service_list_project_roles_request: (required) + :type beta_project_service_list_project_roles_request: BetaProjectServiceListProjectRolesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_project_roles_serialize( + beta_project_service_list_project_roles_request=beta_project_service_list_project_roles_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceListProjectRolesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_project_roles_serialize( + self, + beta_project_service_list_project_roles_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_list_project_roles_request is not None: + _body_params = beta_project_service_list_project_roles_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/ListProjectRoles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_projects( self, beta_project_service_list_projects_request: BetaProjectServiceListProjectsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceListProjectsResponse: + """ListProjects + + List Projects List all matching projects. By default all projects of the instance that the caller has permission to read are returned. Make sure to include a limit and sorting for pagination. Required permission: - `project.read` + + :param beta_project_service_list_projects_request: (required) + :type beta_project_service_list_projects_request: BetaProjectServiceListProjectsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_projects_serialize( + beta_project_service_list_projects_request=beta_project_service_list_projects_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceListProjectsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_projects_serialize( + self, + beta_project_service_list_projects_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_list_projects_request is not None: + _body_params = beta_project_service_list_projects_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/ListProjects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_project_role( self, beta_project_service_remove_project_role_request: BetaProjectServiceRemoveProjectRoleRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceRemoveProjectRoleResponse: + """RemoveProjectRole + + Remove Project Role Removes the role from the project and on every resource it has a dependency. This includes project grants and user grants. Required permission: - `project.role.write` + + :param beta_project_service_remove_project_role_request: (required) + :type beta_project_service_remove_project_role_request: BetaProjectServiceRemoveProjectRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_project_role_serialize( + beta_project_service_remove_project_role_request=beta_project_service_remove_project_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceRemoveProjectRoleResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_project_role_serialize( + self, + beta_project_service_remove_project_role_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_remove_project_role_request is not None: + _body_params = beta_project_service_remove_project_role_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/RemoveProjectRole', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_project( self, beta_project_service_update_project_request: BetaProjectServiceUpdateProjectRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceUpdateProjectResponse: + """UpdateProject + + Update Project Update an existing project. Required permission: - `project.write` + + :param beta_project_service_update_project_request: (required) + :type beta_project_service_update_project_request: BetaProjectServiceUpdateProjectRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_project_serialize( + beta_project_service_update_project_request=beta_project_service_update_project_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceUpdateProjectResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_project_serialize( + self, + beta_project_service_update_project_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_update_project_request is not None: + _body_params = beta_project_service_update_project_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/UpdateProject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_project_grant( self, beta_project_service_update_project_grant_request: BetaProjectServiceUpdateProjectGrantRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceUpdateProjectGrantResponse: + """UpdateProjectGrant + + Update Project Grant Change the roles of the project that is granted to another organization. The project grant will allow the granted organization to access the project and manage the authorizations for its users. Required permission: - `project.grant.write` + + :param beta_project_service_update_project_grant_request: (required) + :type beta_project_service_update_project_grant_request: BetaProjectServiceUpdateProjectGrantRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_project_grant_serialize( + beta_project_service_update_project_grant_request=beta_project_service_update_project_grant_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceUpdateProjectGrantResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_project_grant_serialize( + self, + beta_project_service_update_project_grant_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_update_project_grant_request is not None: + _body_params = beta_project_service_update_project_grant_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/UpdateProjectGrant', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_project_role( self, beta_project_service_update_project_role_request: BetaProjectServiceUpdateProjectRoleRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaProjectServiceUpdateProjectRoleResponse: + """UpdateProjectRole + + Update Project Role Change a project role. The key is not editable. If a key should change, remove the role and create a new one. Required permission: - `project.role.write` + + :param beta_project_service_update_project_role_request: (required) + :type beta_project_service_update_project_role_request: BetaProjectServiceUpdateProjectRoleRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_project_role_serialize( + beta_project_service_update_project_role_request=beta_project_service_update_project_role_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaProjectServiceUpdateProjectRoleResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_project_role_serialize( + self, + beta_project_service_update_project_role_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_project_service_update_project_role_request is not None: + _body_params = beta_project_service_update_project_role_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.project.v2beta.ProjectService/UpdateProjectRole', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_session_service_api.py b/zitadel_client/api/beta_session_service_api.py new file mode 100644 index 00000000..c0eb19ce --- /dev/null +++ b/zitadel_client/api/beta_session_service_api.py @@ -0,0 +1,685 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_session_service_create_session_request import BetaSessionServiceCreateSessionRequest +from zitadel_client.models.beta_session_service_create_session_response import BetaSessionServiceCreateSessionResponse +from zitadel_client.models.beta_session_service_delete_session_request import BetaSessionServiceDeleteSessionRequest +from zitadel_client.models.beta_session_service_delete_session_response import BetaSessionServiceDeleteSessionResponse +from zitadel_client.models.beta_session_service_get_session_request import BetaSessionServiceGetSessionRequest +from zitadel_client.models.beta_session_service_get_session_response import BetaSessionServiceGetSessionResponse +from zitadel_client.models.beta_session_service_list_sessions_request import BetaSessionServiceListSessionsRequest +from zitadel_client.models.beta_session_service_list_sessions_response import BetaSessionServiceListSessionsResponse +from zitadel_client.models.beta_session_service_set_session_request import BetaSessionServiceSetSessionRequest +from zitadel_client.models.beta_session_service_set_session_response import BetaSessionServiceSetSessionResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaSessionServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_session( self, beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSessionServiceCreateSessionResponse: + """CreateSession + + Create a new session + + :param beta_session_service_create_session_request: (required) + :type beta_session_service_create_session_request: BetaSessionServiceCreateSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_session_serialize( + beta_session_service_create_session_request=beta_session_service_create_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceCreateSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_session_serialize( + self, + beta_session_service_create_session_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_create_session_request is not None: + _body_params = beta_session_service_create_session_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.session.v2beta.SessionService/CreateSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_session( self, beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSessionServiceDeleteSessionResponse: + """DeleteSession + + Terminate a session + + :param beta_session_service_delete_session_request: (required) + :type beta_session_service_delete_session_request: BetaSessionServiceDeleteSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_session_serialize( + beta_session_service_delete_session_request=beta_session_service_delete_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceDeleteSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_session_serialize( + self, + beta_session_service_delete_session_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_delete_session_request is not None: + _body_params = beta_session_service_delete_session_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.session.v2beta.SessionService/DeleteSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_session( self, beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSessionServiceGetSessionResponse: + """GetSession + + GetSession a session + + :param beta_session_service_get_session_request: (required) + :type beta_session_service_get_session_request: BetaSessionServiceGetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_session_serialize( + beta_session_service_get_session_request=beta_session_service_get_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceGetSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_session_serialize( + self, + beta_session_service_get_session_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_get_session_request is not None: + _body_params = beta_session_service_get_session_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.session.v2beta.SessionService/GetSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_sessions( self, beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSessionServiceListSessionsResponse: + """ListSessions + + Search sessions + + :param beta_session_service_list_sessions_request: (required) + :type beta_session_service_list_sessions_request: BetaSessionServiceListSessionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_sessions_serialize( + beta_session_service_list_sessions_request=beta_session_service_list_sessions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceListSessionsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_sessions_serialize( + self, + beta_session_service_list_sessions_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_list_sessions_request is not None: + _body_params = beta_session_service_list_sessions_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.session.v2beta.SessionService/ListSessions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_session( self, beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSessionServiceSetSessionResponse: + """SetSession + + Update a session + + :param beta_session_service_set_session_request: (required) + :type beta_session_service_set_session_request: BetaSessionServiceSetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_session_serialize( + beta_session_service_set_session_request=beta_session_service_set_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSessionServiceSetSessionResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_session_serialize( + self, + beta_session_service_set_session_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_session_service_set_session_request is not None: + _body_params = beta_session_service_set_session_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.session.v2beta.SessionService/SetSession', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_settings_service_api.py b/zitadel_client/api/beta_settings_service_api.py new file mode 100644 index 00000000..aa980fdd --- /dev/null +++ b/zitadel_client/api/beta_settings_service_api.py @@ -0,0 +1,1468 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict +from zitadel_client.models.beta_settings_service_get_active_identity_providers_request import BetaSettingsServiceGetActiveIdentityProvidersRequest +from zitadel_client.models.beta_settings_service_get_active_identity_providers_response import BetaSettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.beta_settings_service_get_branding_settings_request import BetaSettingsServiceGetBrandingSettingsRequest +from zitadel_client.models.beta_settings_service_get_branding_settings_response import BetaSettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.beta_settings_service_get_domain_settings_request import BetaSettingsServiceGetDomainSettingsRequest +from zitadel_client.models.beta_settings_service_get_domain_settings_response import BetaSettingsServiceGetDomainSettingsResponse +from zitadel_client.models.beta_settings_service_get_general_settings_response import BetaSettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_request import BetaSettingsServiceGetLegalAndSupportSettingsRequest +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_response import BetaSettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.beta_settings_service_get_lockout_settings_request import BetaSettingsServiceGetLockoutSettingsRequest +from zitadel_client.models.beta_settings_service_get_lockout_settings_response import BetaSettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.beta_settings_service_get_login_settings_request import BetaSettingsServiceGetLoginSettingsRequest +from zitadel_client.models.beta_settings_service_get_login_settings_response import BetaSettingsServiceGetLoginSettingsResponse +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_request import BetaSettingsServiceGetPasswordComplexitySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_response import BetaSettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_request import BetaSettingsServiceGetPasswordExpirySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_response import BetaSettingsServiceGetPasswordExpirySettingsResponse +from zitadel_client.models.beta_settings_service_get_security_settings_response import BetaSettingsServiceGetSecuritySettingsResponse +from zitadel_client.models.beta_settings_service_set_security_settings_request import BetaSettingsServiceSetSecuritySettingsRequest +from zitadel_client.models.beta_settings_service_set_security_settings_response import BetaSettingsServiceSetSecuritySettingsResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaSettingsServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_active_identity_providers( self, beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetActiveIdentityProvidersResponse: + """GetActiveIdentityProviders + + Get the current active identity providers + + :param beta_settings_service_get_active_identity_providers_request: (required) + :type beta_settings_service_get_active_identity_providers_request: BetaSettingsServiceGetActiveIdentityProvidersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_active_identity_providers_serialize( + beta_settings_service_get_active_identity_providers_request=beta_settings_service_get_active_identity_providers_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetActiveIdentityProvidersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_active_identity_providers_serialize( + self, + beta_settings_service_get_active_identity_providers_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_active_identity_providers_request is not None: + _body_params = beta_settings_service_get_active_identity_providers_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetActiveIdentityProviders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_branding_settings( self, beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetBrandingSettingsResponse: + """GetBrandingSettings + + Get the current active branding settings + + :param beta_settings_service_get_branding_settings_request: (required) + :type beta_settings_service_get_branding_settings_request: BetaSettingsServiceGetBrandingSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_branding_settings_serialize( + beta_settings_service_get_branding_settings_request=beta_settings_service_get_branding_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetBrandingSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_branding_settings_serialize( + self, + beta_settings_service_get_branding_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_branding_settings_request is not None: + _body_params = beta_settings_service_get_branding_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetBrandingSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_domain_settings( self, beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetDomainSettingsResponse: + """GetDomainSettings + + Get the domain settings + + :param beta_settings_service_get_domain_settings_request: (required) + :type beta_settings_service_get_domain_settings_request: BetaSettingsServiceGetDomainSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_domain_settings_serialize( + beta_settings_service_get_domain_settings_request=beta_settings_service_get_domain_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetDomainSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_domain_settings_serialize( + self, + beta_settings_service_get_domain_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_domain_settings_request is not None: + _body_params = beta_settings_service_get_domain_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetDomainSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_general_settings( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetGeneralSettingsResponse: + if body is None: + body = {} + """GetGeneralSettings + + Get basic information over the instance + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_general_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetGeneralSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_general_settings_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetGeneralSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_legal_and_support_settings( self, beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetLegalAndSupportSettingsResponse: + """GetLegalAndSupportSettings + + Get the legal and support settings + + :param beta_settings_service_get_legal_and_support_settings_request: (required) + :type beta_settings_service_get_legal_and_support_settings_request: BetaSettingsServiceGetLegalAndSupportSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_legal_and_support_settings_serialize( + beta_settings_service_get_legal_and_support_settings_request=beta_settings_service_get_legal_and_support_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLegalAndSupportSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_legal_and_support_settings_serialize( + self, + beta_settings_service_get_legal_and_support_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_legal_and_support_settings_request is not None: + _body_params = beta_settings_service_get_legal_and_support_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetLegalAndSupportSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_lockout_settings( self, beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetLockoutSettingsResponse: + """GetLockoutSettings + + Get the lockout settings + + :param beta_settings_service_get_lockout_settings_request: (required) + :type beta_settings_service_get_lockout_settings_request: BetaSettingsServiceGetLockoutSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_lockout_settings_serialize( + beta_settings_service_get_lockout_settings_request=beta_settings_service_get_lockout_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLockoutSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_lockout_settings_serialize( + self, + beta_settings_service_get_lockout_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_lockout_settings_request is not None: + _body_params = beta_settings_service_get_lockout_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetLockoutSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_login_settings( self, beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetLoginSettingsResponse: + """GetLoginSettings + + Get the login settings + + :param beta_settings_service_get_login_settings_request: (required) + :type beta_settings_service_get_login_settings_request: BetaSettingsServiceGetLoginSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_login_settings_serialize( + beta_settings_service_get_login_settings_request=beta_settings_service_get_login_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetLoginSettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_login_settings_serialize( + self, + beta_settings_service_get_login_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_login_settings_request is not None: + _body_params = beta_settings_service_get_login_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetLoginSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_password_complexity_settings( self, beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetPasswordComplexitySettingsResponse: + """GetPasswordComplexitySettings + + Get the password complexity settings + + :param beta_settings_service_get_password_complexity_settings_request: (required) + :type beta_settings_service_get_password_complexity_settings_request: BetaSettingsServiceGetPasswordComplexitySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_complexity_settings_serialize( + beta_settings_service_get_password_complexity_settings_request=beta_settings_service_get_password_complexity_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordComplexitySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_password_complexity_settings_serialize( + self, + beta_settings_service_get_password_complexity_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_password_complexity_settings_request is not None: + _body_params = beta_settings_service_get_password_complexity_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetPasswordComplexitySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_password_expiry_settings( self, beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetPasswordExpirySettingsResponse: + """GetPasswordExpirySettings + + Get the password expiry settings + + :param beta_settings_service_get_password_expiry_settings_request: (required) + :type beta_settings_service_get_password_expiry_settings_request: BetaSettingsServiceGetPasswordExpirySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_password_expiry_settings_serialize( + beta_settings_service_get_password_expiry_settings_request=beta_settings_service_get_password_expiry_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetPasswordExpirySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_password_expiry_settings_serialize( + self, + beta_settings_service_get_password_expiry_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_get_password_expiry_settings_request is not None: + _body_params = beta_settings_service_get_password_expiry_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetPasswordExpirySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_security_settings( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceGetSecuritySettingsResponse: + if body is None: + body = {} + """GetSecuritySettings + + Get the security settings + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_security_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceGetSecuritySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_security_settings_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/GetSecuritySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_security_settings( self, beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaSettingsServiceSetSecuritySettingsResponse: + """SetSecuritySettings + + Set the security settings + + :param beta_settings_service_set_security_settings_request: (required) + :type beta_settings_service_set_security_settings_request: BetaSettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_security_settings_serialize( + beta_settings_service_set_security_settings_request=beta_settings_service_set_security_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaSettingsServiceSetSecuritySettingsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_security_settings_serialize( + self, + beta_settings_service_set_security_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_settings_service_set_security_settings_request is not None: + _body_params = beta_settings_service_set_security_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2beta.SettingsService/SetSecuritySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_telemetry_service_api.py b/zitadel_client/api/beta_telemetry_service_api.py new file mode 100644 index 00000000..7e0d9e45 --- /dev/null +++ b/zitadel_client/api/beta_telemetry_service_api.py @@ -0,0 +1,295 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_telemetry_service_report_base_information_request import BetaTelemetryServiceReportBaseInformationRequest +from zitadel_client.models.beta_telemetry_service_report_base_information_response import BetaTelemetryServiceReportBaseInformationResponse +from zitadel_client.models.beta_telemetry_service_report_resource_counts_request import BetaTelemetryServiceReportResourceCountsRequest +from zitadel_client.models.beta_telemetry_service_report_resource_counts_response import BetaTelemetryServiceReportResourceCountsResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaTelemetryServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def report_base_information( self, beta_telemetry_service_report_base_information_request: BetaTelemetryServiceReportBaseInformationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaTelemetryServiceReportBaseInformationResponse: + """ReportBaseInformation + + ReportBaseInformation is used to report the base information of the ZITADEL system, including the version, instances, their creation date and domains. The response contains a report ID to link it to the resource counts or other reports. The report ID is only valid for the same system ID. + + :param beta_telemetry_service_report_base_information_request: (required) + :type beta_telemetry_service_report_base_information_request: BetaTelemetryServiceReportBaseInformationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_base_information_serialize( + beta_telemetry_service_report_base_information_request=beta_telemetry_service_report_base_information_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaTelemetryServiceReportBaseInformationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _report_base_information_serialize( + self, + beta_telemetry_service_report_base_information_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_telemetry_service_report_base_information_request is not None: + _body_params = beta_telemetry_service_report_base_information_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.analytics.v2beta.TelemetryService/ReportBaseInformation', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def report_resource_counts( self, beta_telemetry_service_report_resource_counts_request: BetaTelemetryServiceReportResourceCountsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaTelemetryServiceReportResourceCountsResponse: + """ReportResourceCounts + + ReportResourceCounts is used to report the resource counts such as amount of organizations or users per organization and much more. Since the resource counts can be reported in multiple batches, the response contains a report ID to continue reporting. The report ID is only valid for the same system ID. + + :param beta_telemetry_service_report_resource_counts_request: (required) + :type beta_telemetry_service_report_resource_counts_request: BetaTelemetryServiceReportResourceCountsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._report_resource_counts_serialize( + beta_telemetry_service_report_resource_counts_request=beta_telemetry_service_report_resource_counts_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaTelemetryServiceReportResourceCountsResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _report_resource_counts_serialize( + self, + beta_telemetry_service_report_resource_counts_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_telemetry_service_report_resource_counts_request is not None: + _body_params = beta_telemetry_service_report_resource_counts_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.analytics.v2beta.TelemetryService/ReportResourceCounts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_user_service_api.py b/zitadel_client/api/beta_user_service_api.py new file mode 100644 index 00000000..18babd05 --- /dev/null +++ b/zitadel_client/api/beta_user_service_api.py @@ -0,0 +1,4455 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from zitadel_client.models.beta_user_service_add_human_user_request import BetaUserServiceAddHumanUserRequest +from zitadel_client.models.beta_user_service_add_human_user_response import BetaUserServiceAddHumanUserResponse +from zitadel_client.models.beta_user_service_add_idp_link_request import BetaUserServiceAddIDPLinkRequest +from zitadel_client.models.beta_user_service_add_idp_link_response import BetaUserServiceAddIDPLinkResponse +from zitadel_client.models.beta_user_service_add_otp_email_request import BetaUserServiceAddOTPEmailRequest +from zitadel_client.models.beta_user_service_add_otp_email_response import BetaUserServiceAddOTPEmailResponse +from zitadel_client.models.beta_user_service_add_otpsms_request import BetaUserServiceAddOTPSMSRequest +from zitadel_client.models.beta_user_service_add_otpsms_response import BetaUserServiceAddOTPSMSResponse +from zitadel_client.models.beta_user_service_create_passkey_registration_link_request import BetaUserServiceCreatePasskeyRegistrationLinkRequest +from zitadel_client.models.beta_user_service_create_passkey_registration_link_response import BetaUserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.beta_user_service_deactivate_user_request import BetaUserServiceDeactivateUserRequest +from zitadel_client.models.beta_user_service_deactivate_user_response import BetaUserServiceDeactivateUserResponse +from zitadel_client.models.beta_user_service_delete_user_request import BetaUserServiceDeleteUserRequest +from zitadel_client.models.beta_user_service_delete_user_response import BetaUserServiceDeleteUserResponse +from zitadel_client.models.beta_user_service_get_user_by_id_request import BetaUserServiceGetUserByIDRequest +from zitadel_client.models.beta_user_service_get_user_by_id_response import BetaUserServiceGetUserByIDResponse +from zitadel_client.models.beta_user_service_list_authentication_method_types_request import BetaUserServiceListAuthenticationMethodTypesRequest +from zitadel_client.models.beta_user_service_list_authentication_method_types_response import BetaUserServiceListAuthenticationMethodTypesResponse +from zitadel_client.models.beta_user_service_list_users_request import BetaUserServiceListUsersRequest +from zitadel_client.models.beta_user_service_list_users_response import BetaUserServiceListUsersResponse +from zitadel_client.models.beta_user_service_lock_user_request import BetaUserServiceLockUserRequest +from zitadel_client.models.beta_user_service_lock_user_response import BetaUserServiceLockUserResponse +from zitadel_client.models.beta_user_service_password_reset_request import BetaUserServicePasswordResetRequest +from zitadel_client.models.beta_user_service_password_reset_response import BetaUserServicePasswordResetResponse +from zitadel_client.models.beta_user_service_reactivate_user_request import BetaUserServiceReactivateUserRequest +from zitadel_client.models.beta_user_service_reactivate_user_response import BetaUserServiceReactivateUserResponse +from zitadel_client.models.beta_user_service_register_passkey_request import BetaUserServiceRegisterPasskeyRequest +from zitadel_client.models.beta_user_service_register_passkey_response import BetaUserServiceRegisterPasskeyResponse +from zitadel_client.models.beta_user_service_register_totp_request import BetaUserServiceRegisterTOTPRequest +from zitadel_client.models.beta_user_service_register_totp_response import BetaUserServiceRegisterTOTPResponse +from zitadel_client.models.beta_user_service_register_u2_f_request import BetaUserServiceRegisterU2FRequest +from zitadel_client.models.beta_user_service_register_u2_f_response import BetaUserServiceRegisterU2FResponse +from zitadel_client.models.beta_user_service_remove_otp_email_request import BetaUserServiceRemoveOTPEmailRequest +from zitadel_client.models.beta_user_service_remove_otp_email_response import BetaUserServiceRemoveOTPEmailResponse +from zitadel_client.models.beta_user_service_remove_otpsms_request import BetaUserServiceRemoveOTPSMSRequest +from zitadel_client.models.beta_user_service_remove_otpsms_response import BetaUserServiceRemoveOTPSMSResponse +from zitadel_client.models.beta_user_service_remove_phone_request import BetaUserServiceRemovePhoneRequest +from zitadel_client.models.beta_user_service_remove_phone_response import BetaUserServiceRemovePhoneResponse +from zitadel_client.models.beta_user_service_remove_totp_request import BetaUserServiceRemoveTOTPRequest +from zitadel_client.models.beta_user_service_remove_totp_response import BetaUserServiceRemoveTOTPResponse +from zitadel_client.models.beta_user_service_resend_email_code_request import BetaUserServiceResendEmailCodeRequest +from zitadel_client.models.beta_user_service_resend_email_code_response import BetaUserServiceResendEmailCodeResponse +from zitadel_client.models.beta_user_service_resend_phone_code_request import BetaUserServiceResendPhoneCodeRequest +from zitadel_client.models.beta_user_service_resend_phone_code_response import BetaUserServiceResendPhoneCodeResponse +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_request import BetaUserServiceRetrieveIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_response import BetaUserServiceRetrieveIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_set_email_request import BetaUserServiceSetEmailRequest +from zitadel_client.models.beta_user_service_set_email_response import BetaUserServiceSetEmailResponse +from zitadel_client.models.beta_user_service_set_password_request import BetaUserServiceSetPasswordRequest +from zitadel_client.models.beta_user_service_set_password_response import BetaUserServiceSetPasswordResponse +from zitadel_client.models.beta_user_service_set_phone_request import BetaUserServiceSetPhoneRequest +from zitadel_client.models.beta_user_service_set_phone_response import BetaUserServiceSetPhoneResponse +from zitadel_client.models.beta_user_service_start_identity_provider_intent_request import BetaUserServiceStartIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_start_identity_provider_intent_response import BetaUserServiceStartIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_unlock_user_request import BetaUserServiceUnlockUserRequest +from zitadel_client.models.beta_user_service_unlock_user_response import BetaUserServiceUnlockUserResponse +from zitadel_client.models.beta_user_service_update_human_user_request import BetaUserServiceUpdateHumanUserRequest +from zitadel_client.models.beta_user_service_update_human_user_response import BetaUserServiceUpdateHumanUserResponse +from zitadel_client.models.beta_user_service_verify_email_request import BetaUserServiceVerifyEmailRequest +from zitadel_client.models.beta_user_service_verify_email_response import BetaUserServiceVerifyEmailResponse +from zitadel_client.models.beta_user_service_verify_passkey_registration_request import BetaUserServiceVerifyPasskeyRegistrationRequest +from zitadel_client.models.beta_user_service_verify_passkey_registration_response import BetaUserServiceVerifyPasskeyRegistrationResponse +from zitadel_client.models.beta_user_service_verify_phone_request import BetaUserServiceVerifyPhoneRequest +from zitadel_client.models.beta_user_service_verify_phone_response import BetaUserServiceVerifyPhoneResponse +from zitadel_client.models.beta_user_service_verify_totp_registration_request import BetaUserServiceVerifyTOTPRegistrationRequest +from zitadel_client.models.beta_user_service_verify_totp_registration_response import BetaUserServiceVerifyTOTPRegistrationResponse +from zitadel_client.models.beta_user_service_verify_u2_f_registration_request import BetaUserServiceVerifyU2FRegistrationRequest +from zitadel_client.models.beta_user_service_verify_u2_f_registration_response import BetaUserServiceVerifyU2FRegistrationResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaUserServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_human_user( self, beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceAddHumanUserResponse: + """AddHumanUser + + Create a new human user Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. Deprecated: please move to the corresponding endpoint under user service v2 (GA) + + :param beta_user_service_add_human_user_request: (required) + :type beta_user_service_add_human_user_request: BetaUserServiceAddHumanUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_human_user_serialize( + beta_user_service_add_human_user_request=beta_user_service_add_human_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddHumanUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_human_user_serialize( + self, + beta_user_service_add_human_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_add_human_user_request is not None: + _body_params = beta_user_service_add_human_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/AddHumanUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def add_idp_link( self, beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceAddIDPLinkResponse: + """AddIDPLink + + Add link to an identity provider to an user Add link to an identity provider to an user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_idp_link_request: (required) + :type beta_user_service_add_idp_link_request: BetaUserServiceAddIDPLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_idp_link_serialize( + beta_user_service_add_idp_link_request=beta_user_service_add_idp_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddIDPLinkResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_idp_link_serialize( + self, + beta_user_service_add_idp_link_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_add_idp_link_request is not None: + _body_params = beta_user_service_add_idp_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/AddIDPLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def add_otp_email( self, beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceAddOTPEmailResponse: + """AddOTPEmail + + Add OTP Email for a user Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otp_email_request: (required) + :type beta_user_service_add_otp_email_request: BetaUserServiceAddOTPEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_otp_email_serialize( + beta_user_service_add_otp_email_request=beta_user_service_add_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_otp_email_serialize( + self, + beta_user_service_add_otp_email_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_add_otp_email_request is not None: + _body_params = beta_user_service_add_otp_email_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/AddOTPEmail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def add_otpsms( self, beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceAddOTPSMSResponse: + """AddOTPSMS + + Add OTP SMS for a user Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_add_otpsms_request: (required) + :type beta_user_service_add_otpsms_request: BetaUserServiceAddOTPSMSRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_otpsms_serialize( + beta_user_service_add_otpsms_request=beta_user_service_add_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceAddOTPSMSResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _add_otpsms_serialize( + self, + beta_user_service_add_otpsms_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_add_otpsms_request is not None: + _body_params = beta_user_service_add_otpsms_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/AddOTPSMS', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_passkey_registration_link( self, beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceCreatePasskeyRegistrationLinkResponse: + """CreatePasskeyRegistrationLink + + Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_create_passkey_registration_link_request: (required) + :type beta_user_service_create_passkey_registration_link_request: BetaUserServiceCreatePasskeyRegistrationLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_passkey_registration_link_serialize( + beta_user_service_create_passkey_registration_link_request=beta_user_service_create_passkey_registration_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceCreatePasskeyRegistrationLinkResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_passkey_registration_link_serialize( + self, + beta_user_service_create_passkey_registration_link_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_create_passkey_registration_link_request is not None: + _body_params = beta_user_service_create_passkey_registration_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/CreatePasskeyRegistrationLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def deactivate_user( self, beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceDeactivateUserResponse: + """DeactivateUser + + Deactivate user The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_deactivate_user_request: (required) + :type beta_user_service_deactivate_user_request: BetaUserServiceDeactivateUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deactivate_user_serialize( + beta_user_service_deactivate_user_request=beta_user_service_deactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeactivateUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _deactivate_user_serialize( + self, + beta_user_service_deactivate_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_deactivate_user_request is not None: + _body_params = beta_user_service_deactivate_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/DeactivateUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_user( self, beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceDeleteUserResponse: + """DeleteUser + + Delete user The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_delete_user_request: (required) + :type beta_user_service_delete_user_request: BetaUserServiceDeleteUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_user_serialize( + beta_user_service_delete_user_request=beta_user_service_delete_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceDeleteUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_user_serialize( + self, + beta_user_service_delete_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_delete_user_request is not None: + _body_params = beta_user_service_delete_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/DeleteUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_user_by_id( self, beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceGetUserByIDResponse: + """GetUserByID + + User by ID Returns the full user object (human or machine) including the profile, email, etc. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_get_user_by_id_request: (required) + :type beta_user_service_get_user_by_id_request: BetaUserServiceGetUserByIDRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_by_id_serialize( + beta_user_service_get_user_by_id_request=beta_user_service_get_user_by_id_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceGetUserByIDResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_user_by_id_serialize( + self, + beta_user_service_get_user_by_id_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_get_user_by_id_request is not None: + _body_params = beta_user_service_get_user_by_id_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/GetUserByID', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_authentication_method_types( self, beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceListAuthenticationMethodTypesResponse: + """ListAuthenticationMethodTypes + + List all possible authentication methods of a user List all possible authentication methods of a user like password, passwordless, (T)OTP and more. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_authentication_method_types_request: (required) + :type beta_user_service_list_authentication_method_types_request: BetaUserServiceListAuthenticationMethodTypesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_authentication_method_types_serialize( + beta_user_service_list_authentication_method_types_request=beta_user_service_list_authentication_method_types_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceListAuthenticationMethodTypesResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_authentication_method_types_serialize( + self, + beta_user_service_list_authentication_method_types_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_list_authentication_method_types_request is not None: + _body_params = beta_user_service_list_authentication_method_types_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/ListAuthenticationMethodTypes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_users( self, beta_user_service_list_users_request: BetaUserServiceListUsersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceListUsersResponse: + """ListUsers + + Search Users Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_list_users_request: (required) + :type beta_user_service_list_users_request: BetaUserServiceListUsersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_users_serialize( + beta_user_service_list_users_request=beta_user_service_list_users_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceListUsersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_users_serialize( + self, + beta_user_service_list_users_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_list_users_request is not None: + _body_params = beta_user_service_list_users_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/ListUsers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def lock_user( self, beta_user_service_lock_user_request: BetaUserServiceLockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceLockUserResponse: + """LockUser + + Lock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_lock_user_request: (required) + :type beta_user_service_lock_user_request: BetaUserServiceLockUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._lock_user_serialize( + beta_user_service_lock_user_request=beta_user_service_lock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceLockUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _lock_user_serialize( + self, + beta_user_service_lock_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_lock_user_request is not None: + _body_params = beta_user_service_lock_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/LockUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def password_reset( self, beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServicePasswordResetResponse: + """PasswordReset + + Request a code to reset a password Request a code to reset a password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_password_reset_request: (required) + :type beta_user_service_password_reset_request: BetaUserServicePasswordResetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._password_reset_serialize( + beta_user_service_password_reset_request=beta_user_service_password_reset_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServicePasswordResetResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _password_reset_serialize( + self, + beta_user_service_password_reset_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_password_reset_request is not None: + _body_params = beta_user_service_password_reset_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/PasswordReset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reactivate_user( self, beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceReactivateUserResponse: + """ReactivateUser + + Reactivate user Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_reactivate_user_request: (required) + :type beta_user_service_reactivate_user_request: BetaUserServiceReactivateUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reactivate_user_serialize( + beta_user_service_reactivate_user_request=beta_user_service_reactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceReactivateUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _reactivate_user_serialize( + self, + beta_user_service_reactivate_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_reactivate_user_request is not None: + _body_params = beta_user_service_reactivate_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/ReactivateUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def register_passkey( self, beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRegisterPasskeyResponse: + """RegisterPasskey + + Start the registration of passkey for a user Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_passkey_request: (required) + :type beta_user_service_register_passkey_request: BetaUserServiceRegisterPasskeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_passkey_serialize( + beta_user_service_register_passkey_request=beta_user_service_register_passkey_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRegisterPasskeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _register_passkey_serialize( + self, + beta_user_service_register_passkey_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_register_passkey_request is not None: + _body_params = beta_user_service_register_passkey_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RegisterPasskey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def register_totp( self, beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRegisterTOTPResponse: + """RegisterTOTP + + Start the registration of a TOTP generator for a user Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_totp_request: (required) + :type beta_user_service_register_totp_request: BetaUserServiceRegisterTOTPRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_totp_serialize( + beta_user_service_register_totp_request=beta_user_service_register_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRegisterTOTPResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _register_totp_serialize( + self, + beta_user_service_register_totp_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_register_totp_request is not None: + _body_params = beta_user_service_register_totp_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RegisterTOTP', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def register_u2_f( self, beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRegisterU2FResponse: + """RegisterU2F + + Start the registration of a u2f token for a user Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_register_u2_f_request: (required) + :type beta_user_service_register_u2_f_request: BetaUserServiceRegisterU2FRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_u2_f_serialize( + beta_user_service_register_u2_f_request=beta_user_service_register_u2_f_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRegisterU2FResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _register_u2_f_serialize( + self, + beta_user_service_register_u2_f_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_register_u2_f_request is not None: + _body_params = beta_user_service_register_u2_f_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RegisterU2F', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_otp_email( self, beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRemoveOTPEmailResponse: + """RemoveOTPEmail + + Remove One-Time Password (OTP) Email from a user Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otp_email_request: (required) + :type beta_user_service_remove_otp_email_request: BetaUserServiceRemoveOTPEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_otp_email_serialize( + beta_user_service_remove_otp_email_request=beta_user_service_remove_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_otp_email_serialize( + self, + beta_user_service_remove_otp_email_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_remove_otp_email_request is not None: + _body_params = beta_user_service_remove_otp_email_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RemoveOTPEmail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_otpsms( self, beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRemoveOTPSMSResponse: + """RemoveOTPSMS + + Remove One-Time Password (OTP) SMS from a user Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_otpsms_request: (required) + :type beta_user_service_remove_otpsms_request: BetaUserServiceRemoveOTPSMSRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_otpsms_serialize( + beta_user_service_remove_otpsms_request=beta_user_service_remove_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveOTPSMSResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_otpsms_serialize( + self, + beta_user_service_remove_otpsms_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_remove_otpsms_request is not None: + _body_params = beta_user_service_remove_otpsms_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RemoveOTPSMS', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_phone( self, beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRemovePhoneResponse: + """RemovePhone + + Remove the user phone Remove the user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_phone_request: (required) + :type beta_user_service_remove_phone_request: BetaUserServiceRemovePhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_phone_serialize( + beta_user_service_remove_phone_request=beta_user_service_remove_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemovePhoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_phone_serialize( + self, + beta_user_service_remove_phone_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_remove_phone_request is not None: + _body_params = beta_user_service_remove_phone_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RemovePhone', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_totp( self, beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRemoveTOTPResponse: + """RemoveTOTP + + Remove TOTP generator from a user Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_remove_totp_request: (required) + :type beta_user_service_remove_totp_request: BetaUserServiceRemoveTOTPRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_totp_serialize( + beta_user_service_remove_totp_request=beta_user_service_remove_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRemoveTOTPResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_totp_serialize( + self, + beta_user_service_remove_totp_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_remove_totp_request is not None: + _body_params = beta_user_service_remove_totp_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RemoveTOTP', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def resend_email_code( self, beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceResendEmailCodeResponse: + """ResendEmailCode + + Resend code to verify user email Resend code to verify user email Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_email_code_request: (required) + :type beta_user_service_resend_email_code_request: BetaUserServiceResendEmailCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resend_email_code_serialize( + beta_user_service_resend_email_code_request=beta_user_service_resend_email_code_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceResendEmailCodeResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _resend_email_code_serialize( + self, + beta_user_service_resend_email_code_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_resend_email_code_request is not None: + _body_params = beta_user_service_resend_email_code_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/ResendEmailCode', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def resend_phone_code( self, beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceResendPhoneCodeResponse: + """ResendPhoneCode + + Resend code to verify user phone Resend code to verify user phone Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_resend_phone_code_request: (required) + :type beta_user_service_resend_phone_code_request: BetaUserServiceResendPhoneCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resend_phone_code_serialize( + beta_user_service_resend_phone_code_request=beta_user_service_resend_phone_code_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceResendPhoneCodeResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _resend_phone_code_serialize( + self, + beta_user_service_resend_phone_code_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_resend_phone_code_request is not None: + _body_params = beta_user_service_resend_phone_code_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/ResendPhoneCode', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_identity_provider_intent( self, beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceRetrieveIdentityProviderIntentResponse: + """RetrieveIdentityProviderIntent + + Retrieve the information returned by the identity provider Retrieve the information returned by the identity provider for registration or updating an existing user with new information. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_retrieve_identity_provider_intent_request: (required) + :type beta_user_service_retrieve_identity_provider_intent_request: BetaUserServiceRetrieveIdentityProviderIntentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_identity_provider_intent_serialize( + beta_user_service_retrieve_identity_provider_intent_request=beta_user_service_retrieve_identity_provider_intent_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceRetrieveIdentityProviderIntentResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _retrieve_identity_provider_intent_serialize( + self, + beta_user_service_retrieve_identity_provider_intent_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_retrieve_identity_provider_intent_request is not None: + _body_params = beta_user_service_retrieve_identity_provider_intent_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/RetrieveIdentityProviderIntent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_email( self, beta_user_service_set_email_request: BetaUserServiceSetEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceSetEmailResponse: + """SetEmail + + Change the user email Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_email_request: (required) + :type beta_user_service_set_email_request: BetaUserServiceSetEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_email_serialize( + beta_user_service_set_email_request=beta_user_service_set_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceSetEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_email_serialize( + self, + beta_user_service_set_email_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_set_email_request is not None: + _body_params = beta_user_service_set_email_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/SetEmail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_password( self, beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceSetPasswordResponse: + """SetPassword + + Change password Change the password of a user with either a verification code or the current password. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_password_request: (required) + :type beta_user_service_set_password_request: BetaUserServiceSetPasswordRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_password_serialize( + beta_user_service_set_password_request=beta_user_service_set_password_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceSetPasswordResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_password_serialize( + self, + beta_user_service_set_password_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_set_password_request is not None: + _body_params = beta_user_service_set_password_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/SetPassword', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_phone( self, beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceSetPhoneResponse: + """SetPhone + + Set the user phone Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_set_phone_request: (required) + :type beta_user_service_set_phone_request: BetaUserServiceSetPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_phone_serialize( + beta_user_service_set_phone_request=beta_user_service_set_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceSetPhoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _set_phone_serialize( + self, + beta_user_service_set_phone_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_set_phone_request is not None: + _body_params = beta_user_service_set_phone_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/SetPhone', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_identity_provider_intent( self, beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceStartIdentityProviderIntentResponse: + """StartIdentityProviderIntent + + Start flow with an identity provider Start a flow with an identity provider, for external login, registration or linking. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_start_identity_provider_intent_request: (required) + :type beta_user_service_start_identity_provider_intent_request: BetaUserServiceStartIdentityProviderIntentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_identity_provider_intent_serialize( + beta_user_service_start_identity_provider_intent_request=beta_user_service_start_identity_provider_intent_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceStartIdentityProviderIntentResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _start_identity_provider_intent_serialize( + self, + beta_user_service_start_identity_provider_intent_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_start_identity_provider_intent_request is not None: + _body_params = beta_user_service_start_identity_provider_intent_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/StartIdentityProviderIntent', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def unlock_user( self, beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceUnlockUserResponse: + """UnlockUser + + Unlock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.). Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_unlock_user_request: (required) + :type beta_user_service_unlock_user_request: BetaUserServiceUnlockUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._unlock_user_serialize( + beta_user_service_unlock_user_request=beta_user_service_unlock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceUnlockUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _unlock_user_serialize( + self, + beta_user_service_unlock_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_unlock_user_request is not None: + _body_params = beta_user_service_unlock_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/UnlockUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_human_user( self, beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceUpdateHumanUserResponse: + """UpdateHumanUser + + Update User Update all information from a user. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_update_human_user_request: (required) + :type beta_user_service_update_human_user_request: BetaUserServiceUpdateHumanUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_human_user_serialize( + beta_user_service_update_human_user_request=beta_user_service_update_human_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceUpdateHumanUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _update_human_user_serialize( + self, + beta_user_service_update_human_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_update_human_user_request is not None: + _body_params = beta_user_service_update_human_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/UpdateHumanUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def verify_email( self, beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceVerifyEmailResponse: + """VerifyEmail + + Verify the email Verify the email with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_email_request: (required) + :type beta_user_service_verify_email_request: BetaUserServiceVerifyEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._verify_email_serialize( + beta_user_service_verify_email_request=beta_user_service_verify_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _verify_email_serialize( + self, + beta_user_service_verify_email_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_email_request is not None: + _body_params = beta_user_service_verify_email_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/VerifyEmail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def verify_passkey_registration( self, beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceVerifyPasskeyRegistrationResponse: + """VerifyPasskeyRegistration + + Verify a passkey for a user Verify the passkey registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_passkey_registration_request: (required) + :type beta_user_service_verify_passkey_registration_request: BetaUserServiceVerifyPasskeyRegistrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._verify_passkey_registration_serialize( + beta_user_service_verify_passkey_registration_request=beta_user_service_verify_passkey_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyPasskeyRegistrationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _verify_passkey_registration_serialize( + self, + beta_user_service_verify_passkey_registration_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_passkey_registration_request is not None: + _body_params = beta_user_service_verify_passkey_registration_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/VerifyPasskeyRegistration', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def verify_phone( self, beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceVerifyPhoneResponse: + """VerifyPhone + + Verify the phone Verify the phone with the generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_phone_request: (required) + :type beta_user_service_verify_phone_request: BetaUserServiceVerifyPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._verify_phone_serialize( + beta_user_service_verify_phone_request=beta_user_service_verify_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyPhoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _verify_phone_serialize( + self, + beta_user_service_verify_phone_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_phone_request is not None: + _body_params = beta_user_service_verify_phone_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/VerifyPhone', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def verify_totp_registration( self, beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceVerifyTOTPRegistrationResponse: + """VerifyTOTPRegistration + + Verify a TOTP generator for a user Verify the TOTP registration with a generated code. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_totp_registration_request: (required) + :type beta_user_service_verify_totp_registration_request: BetaUserServiceVerifyTOTPRegistrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._verify_totp_registration_serialize( + beta_user_service_verify_totp_registration_request=beta_user_service_verify_totp_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyTOTPRegistrationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _verify_totp_registration_serialize( + self, + beta_user_service_verify_totp_registration_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_totp_registration_request is not None: + _body_params = beta_user_service_verify_totp_registration_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/VerifyTOTPRegistration', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def verify_u2_f_registration( self, beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaUserServiceVerifyU2FRegistrationResponse: + """VerifyU2FRegistration + + Verify a u2f token for a user Verify the u2f token registration with the public key credential. Deprecated: please move to the corresponding endpoint under user service v2 (GA). + + :param beta_user_service_verify_u2_f_registration_request: (required) + :type beta_user_service_verify_u2_f_registration_request: BetaUserServiceVerifyU2FRegistrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._verify_u2_f_registration_serialize( + beta_user_service_verify_u2_f_registration_request=beta_user_service_verify_u2_f_registration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaUserServiceVerifyU2FRegistrationResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _verify_u2_f_registration_serialize( + self, + beta_user_service_verify_u2_f_registration_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_user_service_verify_u2_f_registration_request is not None: + _body_params = beta_user_service_verify_u2_f_registration_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2beta.UserService/VerifyU2FRegistration', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/beta_web_key_service_api.py b/zitadel_client/api/beta_web_key_service_api.py new file mode 100644 index 00000000..d6acb1c1 --- /dev/null +++ b/zitadel_client/api/beta_web_key_service_api.py @@ -0,0 +1,557 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict +from zitadel_client.models.beta_web_key_service_activate_web_key_request import BetaWebKeyServiceActivateWebKeyRequest +from zitadel_client.models.beta_web_key_service_activate_web_key_response import BetaWebKeyServiceActivateWebKeyResponse +from zitadel_client.models.beta_web_key_service_create_web_key_request import BetaWebKeyServiceCreateWebKeyRequest +from zitadel_client.models.beta_web_key_service_create_web_key_response import BetaWebKeyServiceCreateWebKeyResponse +from zitadel_client.models.beta_web_key_service_delete_web_key_request import BetaWebKeyServiceDeleteWebKeyRequest +from zitadel_client.models.beta_web_key_service_delete_web_key_response import BetaWebKeyServiceDeleteWebKeyResponse +from zitadel_client.models.beta_web_key_service_list_web_keys_response import BetaWebKeyServiceListWebKeysResponse + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class BetaWebKeyServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def activate_web_key( self, beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaWebKeyServiceActivateWebKeyResponse: + """ActivateWebKey + + Activate Web Key Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param beta_web_key_service_activate_web_key_request: (required) + :type beta_web_key_service_activate_web_key_request: BetaWebKeyServiceActivateWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._activate_web_key_serialize( + beta_web_key_service_activate_web_key_request=beta_web_key_service_activate_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaWebKeyServiceActivateWebKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _activate_web_key_serialize( + self, + beta_web_key_service_activate_web_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_web_key_service_activate_web_key_request is not None: + _body_params = beta_web_key_service_activate_web_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.webkey.v2beta.WebKeyService/ActivateWebKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_web_key( self, beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaWebKeyServiceCreateWebKeyResponse: + """CreateWebKey + + Create Web Key Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param beta_web_key_service_create_web_key_request: (required) + :type beta_web_key_service_create_web_key_request: BetaWebKeyServiceCreateWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_web_key_serialize( + beta_web_key_service_create_web_key_request=beta_web_key_service_create_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaWebKeyServiceCreateWebKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _create_web_key_serialize( + self, + beta_web_key_service_create_web_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_web_key_service_create_web_key_request is not None: + _body_params = beta_web_key_service_create_web_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.webkey.v2beta.WebKeyService/CreateWebKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_web_key( self, beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaWebKeyServiceDeleteWebKeyResponse: + """DeleteWebKey + + Delete Web Key Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` + + :param beta_web_key_service_delete_web_key_request: (required) + :type beta_web_key_service_delete_web_key_request: BetaWebKeyServiceDeleteWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_web_key_serialize( + beta_web_key_service_delete_web_key_request=beta_web_key_service_delete_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaWebKeyServiceDeleteWebKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _delete_web_key_serialize( + self, + beta_web_key_service_delete_web_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if beta_web_key_service_delete_web_key_request is not None: + _body_params = beta_web_key_service_delete_web_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.webkey.v2beta.WebKeyService/DeleteWebKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_web_keys( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BetaWebKeyServiceListWebKeysResponse: + if body is None: + body = {} + """ListWebKeys + + List Web Keys List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_web_keys_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BetaWebKeyServiceListWebKeysResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_web_keys_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.webkey.v2beta.WebKeyService/ListWebKeys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/feature_service_api.py b/zitadel_client/api/feature_service_api.py index e246abeb..d8a83816 100644 --- a/zitadel_client/api/feature_service_api.py +++ b/zitadel_client/api/feature_service_api.py @@ -16,22 +16,27 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr -from typing import Optional -from typing_extensions import Annotated +from typing import Any, Dict +from zitadel_client.models.feature_service_get_instance_features_request import FeatureServiceGetInstanceFeaturesRequest from zitadel_client.models.feature_service_get_instance_features_response import FeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.feature_service_get_organization_features_request import FeatureServiceGetOrganizationFeaturesRequest from zitadel_client.models.feature_service_get_organization_features_response import FeatureServiceGetOrganizationFeaturesResponse from zitadel_client.models.feature_service_get_system_features_response import FeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.feature_service_get_user_features_request import FeatureServiceGetUserFeaturesRequest from zitadel_client.models.feature_service_get_user_features_response import FeatureServiceGetUserFeaturesResponse from zitadel_client.models.feature_service_reset_instance_features_response import FeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.feature_service_reset_organization_features_request import FeatureServiceResetOrganizationFeaturesRequest from zitadel_client.models.feature_service_reset_organization_features_response import FeatureServiceResetOrganizationFeaturesResponse from zitadel_client.models.feature_service_reset_system_features_response import FeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.feature_service_reset_user_features_request import FeatureServiceResetUserFeaturesRequest from zitadel_client.models.feature_service_reset_user_features_response import FeatureServiceResetUserFeaturesResponse from zitadel_client.models.feature_service_set_instance_features_request import FeatureServiceSetInstanceFeaturesRequest from zitadel_client.models.feature_service_set_instance_features_response import FeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.feature_service_set_organization_features_request import FeatureServiceSetOrganizationFeaturesRequest from zitadel_client.models.feature_service_set_organization_features_response import FeatureServiceSetOrganizationFeaturesResponse from zitadel_client.models.feature_service_set_system_features_request import FeatureServiceSetSystemFeaturesRequest from zitadel_client.models.feature_service_set_system_features_response import FeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.feature_service_set_user_feature_request import FeatureServiceSetUserFeatureRequest from zitadel_client.models.feature_service_set_user_features_response import FeatureServiceSetUserFeaturesResponse from zitadel_client.api_client import ApiClient, RequestSerialized @@ -53,36 +58,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def feature_service_get_instance_features( - self, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the instance, it will be omitted from the response or Not Found is returned when the instance has no features flags at all.")] = None, - ) -> FeatureServiceGetInstanceFeaturesResponse: - """Get Instance Features - - Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none - - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the instance, it will be omitted from the response or Not Found is returned when the instance has no features flags at all. - :type inheritance: bool + def get_instance_features( self, feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetInstanceFeaturesResponse: + """GetInstanceFeatures + + Get Instance Features Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + + :param feature_service_get_instance_features_request: (required) + :type feature_service_get_instance_features_request: FeatureServiceGetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_get_instance_features_serialize( - inheritance=inheritance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_instance_features_serialize( + feature_service_get_instance_features_request=feature_service_get_instance_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -90,9 +108,9 @@ def feature_service_get_instance_features( response_types_map=_response_types_map, ).data - def __feature_service_get_instance_features_serialize( + def _get_instance_features_serialize( self, - inheritance, + feature_service_get_instance_features_request, _request_auth, _content_type, _headers, @@ -115,13 +133,11 @@ def __feature_service_get_instance_features_serialize( # process the path parameters # process the query parameters - if inheritance is not None: - - _query_params.append(('inheritance', inheritance)) - # process the header parameters # process the form parameters # process the body parameter + if feature_service_get_instance_features_request is not None: + _body_params = feature_service_get_instance_features_request # set the HTTP header `Accept` @@ -132,6 +148,19 @@ def __feature_service_get_instance_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -139,8 +168,8 @@ def __feature_service_get_instance_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/instance', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetInstanceFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -157,40 +186,49 @@ def __feature_service_get_instance_features_serialize( @validate_call - def feature_service_get_organization_features( - self, - organization_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all.")] = None, - ) -> FeatureServiceGetOrganizationFeaturesResponse: - """Get Organization Features - - Returns all configured features for an organization. Unset fields mean the feature is the current instance default. Required permissions: - org.feature.read - no permission required for the organization the user belongs to - - :param organization_id: (required) - :type organization_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all. - :type inheritance: bool + def get_organization_features( self, feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetOrganizationFeaturesResponse: + """GetOrganizationFeatures + + Get Organization Features Returns all configured features for an organization. Unset fields mean the feature is the current instance default. Required permissions: - org.feature.read - no permission required for the organization the user belongs to + + :param feature_service_get_organization_features_request: (required) + :type feature_service_get_organization_features_request: FeatureServiceGetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_get_organization_features_serialize( - organization_id=organization_id, - inheritance=inheritance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_organization_features_serialize( + feature_service_get_organization_features_request=feature_service_get_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -198,10 +236,9 @@ def feature_service_get_organization_features( response_types_map=_response_types_map, ).data - def __feature_service_get_organization_features_serialize( + def _get_organization_features_serialize( self, - organization_id, - inheritance, + feature_service_get_organization_features_request, _request_auth, _content_type, _headers, @@ -223,16 +260,12 @@ def __feature_service_get_organization_features_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params['organizationId'] = organization_id # process the query parameters - if inheritance is not None: - - _query_params.append(('inheritance', inheritance)) - # process the header parameters # process the form parameters # process the body parameter + if feature_service_get_organization_features_request is not None: + _body_params = feature_service_get_organization_features_request # set the HTTP header `Accept` @@ -243,6 +276,19 @@ def __feature_service_get_organization_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -250,8 +296,8 @@ def __feature_service_get_organization_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/organization/{organizationId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetOrganizationFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -268,32 +314,51 @@ def __feature_service_get_organization_features_serialize( @validate_call - def feature_service_get_system_features( - self, - ) -> FeatureServiceGetSystemFeaturesResponse: - """Get System Features - - Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none - + def get_system_features( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetSystemFeaturesResponse: + if body is None: + body = {} + """GetSystemFeatures + + Get System Features Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_get_system_features_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -301,8 +366,9 @@ def feature_service_get_system_features( response_types_map=_response_types_map, ).data - def __feature_service_get_system_features_serialize( + def _get_system_features_serialize( self, + body, _request_auth, _content_type, _headers, @@ -328,6 +394,8 @@ def __feature_service_get_system_features_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -338,6 +406,19 @@ def __feature_service_get_system_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -345,8 +426,8 @@ def __feature_service_get_system_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/system', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetSystemFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -363,40 +444,49 @@ def __feature_service_get_system_features_serialize( @validate_call - def feature_service_get_user_features( - self, - user_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all.")] = None, - ) -> FeatureServiceGetUserFeaturesResponse: - """Get User Features - - Returns all configured features for a user. Unset fields mean the feature is the current organization default. Required permissions: - user.feature.read - no permission required for the own user - - :param user_id: (required) - :type user_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all. - :type inheritance: bool + def get_user_features( self, feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceGetUserFeaturesResponse: + """GetUserFeatures + + Get User Features Returns all configured features for a user. Unset fields mean the feature is the current organization default. Required permissions: - user.feature.read - no permission required for the own user + + :param feature_service_get_user_features_request: (required) + :type feature_service_get_user_features_request: FeatureServiceGetUserFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_get_user_features_serialize( - user_id=user_id, - inheritance=inheritance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_user_features_serialize( + feature_service_get_user_features_request=feature_service_get_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceGetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -404,10 +494,9 @@ def feature_service_get_user_features( response_types_map=_response_types_map, ).data - def __feature_service_get_user_features_serialize( + def _get_user_features_serialize( self, - user_id, - inheritance, + feature_service_get_user_features_request, _request_auth, _content_type, _headers, @@ -429,16 +518,12 @@ def __feature_service_get_user_features_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters - if inheritance is not None: - - _query_params.append(('inheritance', inheritance)) - # process the header parameters # process the form parameters # process the body parameter + if feature_service_get_user_features_request is not None: + _body_params = feature_service_get_user_features_request # set the HTTP header `Accept` @@ -449,6 +534,19 @@ def __feature_service_get_user_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -456,8 +554,8 @@ def __feature_service_get_user_features_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/user/{userId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/GetUserFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -474,32 +572,51 @@ def __feature_service_get_user_features_serialize( @validate_call - def feature_service_reset_instance_features( - self, - ) -> FeatureServiceResetInstanceFeaturesResponse: - """Reset Instance Features - - Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete - + def reset_instance_features( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetInstanceFeaturesResponse: + if body is None: + body = {} + """ResetInstanceFeatures + + Reset Instance Features Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_reset_instance_features_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._reset_instance_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -507,8 +624,9 @@ def feature_service_reset_instance_features( response_types_map=_response_types_map, ).data - def __feature_service_reset_instance_features_serialize( + def _reset_instance_features_serialize( self, + body, _request_auth, _content_type, _headers, @@ -534,6 +652,8 @@ def __feature_service_reset_instance_features_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -544,6 +664,19 @@ def __feature_service_reset_instance_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -551,8 +684,8 @@ def __feature_service_reset_instance_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/instance', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetInstanceFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -569,36 +702,49 @@ def __feature_service_reset_instance_features_serialize( @validate_call - def feature_service_reset_organization_features( - self, - organization_id: StrictStr, - ) -> FeatureServiceResetOrganizationFeaturesResponse: - """Reset Organization Features - - Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete - - :param organization_id: (required) - :type organization_id: str + def reset_organization_features( self, feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetOrganizationFeaturesResponse: + """ResetOrganizationFeatures + + Reset Organization Features Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete + + :param feature_service_reset_organization_features_request: (required) + :type feature_service_reset_organization_features_request: FeatureServiceResetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_reset_organization_features_serialize( - organization_id=organization_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._reset_organization_features_serialize( + feature_service_reset_organization_features_request=feature_service_reset_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -606,9 +752,9 @@ def feature_service_reset_organization_features( response_types_map=_response_types_map, ).data - def __feature_service_reset_organization_features_serialize( + def _reset_organization_features_serialize( self, - organization_id, + feature_service_reset_organization_features_request, _request_auth, _content_type, _headers, @@ -630,12 +776,12 @@ def __feature_service_reset_organization_features_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params['organizationId'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if feature_service_reset_organization_features_request is not None: + _body_params = feature_service_reset_organization_features_request # set the HTTP header `Accept` @@ -646,6 +792,19 @@ def __feature_service_reset_organization_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -653,8 +812,8 @@ def __feature_service_reset_organization_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/organization/{organizationId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetOrganizationFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -671,32 +830,51 @@ def __feature_service_reset_organization_features_serialize( @validate_call - def feature_service_reset_system_features( - self, - ) -> FeatureServiceResetSystemFeaturesResponse: - """Reset System Features - - Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete - + def reset_system_features( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetSystemFeaturesResponse: + if body is None: + body = {} + """ResetSystemFeatures + + Reset System Features Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_reset_system_features_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._reset_system_features_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -704,8 +882,9 @@ def feature_service_reset_system_features( response_types_map=_response_types_map, ).data - def __feature_service_reset_system_features_serialize( + def _reset_system_features_serialize( self, + body, _request_auth, _content_type, _headers, @@ -731,6 +910,8 @@ def __feature_service_reset_system_features_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -741,6 +922,19 @@ def __feature_service_reset_system_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -748,8 +942,8 @@ def __feature_service_reset_system_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/system', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetSystemFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -766,36 +960,49 @@ def __feature_service_reset_system_features_serialize( @validate_call - def feature_service_reset_user_features( - self, - user_id: StrictStr, - ) -> FeatureServiceResetUserFeaturesResponse: - """Reset User Features - - Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete - - :param user_id: (required) - :type user_id: str + def reset_user_features( self, feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceResetUserFeaturesResponse: + """ResetUserFeatures + + Reset User Features Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete + + :param feature_service_reset_user_features_request: (required) + :type feature_service_reset_user_features_request: FeatureServiceResetUserFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_reset_user_features_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._reset_user_features_serialize( + feature_service_reset_user_features_request=feature_service_reset_user_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceResetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -803,9 +1010,9 @@ def feature_service_reset_user_features( response_types_map=_response_types_map, ).data - def __feature_service_reset_user_features_serialize( + def _reset_user_features_serialize( self, - user_id, + feature_service_reset_user_features_request, _request_auth, _content_type, _headers, @@ -827,12 +1034,12 @@ def __feature_service_reset_user_features_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if feature_service_reset_user_features_request is not None: + _body_params = feature_service_reset_user_features_request # set the HTTP header `Accept` @@ -843,6 +1050,19 @@ def __feature_service_reset_user_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -850,8 +1070,8 @@ def __feature_service_reset_user_features_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/user/{userId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/ResetUserFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -868,36 +1088,49 @@ def __feature_service_reset_user_features_serialize( @validate_call - def feature_service_set_instance_features( - self, - feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, - ) -> FeatureServiceSetInstanceFeaturesResponse: - """Set Instance Features + def set_instance_features( self, feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetInstanceFeaturesResponse: + """SetInstanceFeatures - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - iam.feature.write + Set Instance Features Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - iam.feature.write :param feature_service_set_instance_features_request: (required) :type feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_set_instance_features_serialize( + _param = self._set_instance_features_serialize( feature_service_set_instance_features_request=feature_service_set_instance_features_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -905,7 +1138,7 @@ def feature_service_set_instance_features( response_types_map=_response_types_map, ).data - def __feature_service_set_instance_features_serialize( + def _set_instance_features_serialize( self, feature_service_set_instance_features_request, _request_auth, @@ -965,8 +1198,8 @@ def __feature_service_set_instance_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/instance', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetInstanceFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -983,36 +1216,49 @@ def __feature_service_set_instance_features_serialize( @validate_call - def feature_service_set_organization_features( - self, - organization_id: StrictStr, - ) -> FeatureServiceSetOrganizationFeaturesResponse: - """Set Organization Features - - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - org.feature.write - - :param organization_id: (required) - :type organization_id: str + def set_organization_features( self, feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetOrganizationFeaturesResponse: + """SetOrganizationFeatures + + Set Organization Features Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - org.feature.write + + :param feature_service_set_organization_features_request: (required) + :type feature_service_set_organization_features_request: FeatureServiceSetOrganizationFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_set_organization_features_serialize( - organization_id=organization_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._set_organization_features_serialize( + feature_service_set_organization_features_request=feature_service_set_organization_features_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1020,9 +1266,9 @@ def feature_service_set_organization_features( response_types_map=_response_types_map, ).data - def __feature_service_set_organization_features_serialize( + def _set_organization_features_serialize( self, - organization_id, + feature_service_set_organization_features_request, _request_auth, _content_type, _headers, @@ -1044,12 +1290,12 @@ def __feature_service_set_organization_features_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params['organizationId'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if feature_service_set_organization_features_request is not None: + _body_params = feature_service_set_organization_features_request # set the HTTP header `Accept` @@ -1060,6 +1306,19 @@ def __feature_service_set_organization_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1067,8 +1326,8 @@ def __feature_service_set_organization_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/organization/{organizationId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetOrganizationFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1085,36 +1344,49 @@ def __feature_service_set_organization_features_serialize( @validate_call - def feature_service_set_system_features( - self, - feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, - ) -> FeatureServiceSetSystemFeaturesResponse: - """Set System Features + def set_system_features( self, feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetSystemFeaturesResponse: + """SetSystemFeatures - Configure and set features that apply to the complete system. Only fields present in the request are set or unset. Required permissions: - system.feature.write + Set System Features Configure and set features that apply to the complete system. Only fields present in the request are set or unset. Required permissions: - system.feature.write :param feature_service_set_system_features_request: (required) :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_set_system_features_serialize( + _param = self._set_system_features_serialize( feature_service_set_system_features_request=feature_service_set_system_features_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1122,7 +1394,7 @@ def feature_service_set_system_features( response_types_map=_response_types_map, ).data - def __feature_service_set_system_features_serialize( + def _set_system_features_serialize( self, feature_service_set_system_features_request, _request_auth, @@ -1182,8 +1454,8 @@ def __feature_service_set_system_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/system', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetSystemFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1200,36 +1472,49 @@ def __feature_service_set_system_features_serialize( @validate_call - def feature_service_set_user_features( - self, - user_id: StrictStr, - ) -> FeatureServiceSetUserFeaturesResponse: - """Set User Features - - Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write - - :param user_id: (required) - :type user_id: str + def set_user_features( self, feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FeatureServiceSetUserFeaturesResponse: + """SetUserFeatures + + Set User Features Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write + + :param feature_service_set_user_feature_request: (required) + :type feature_service_set_user_feature_request: FeatureServiceSetUserFeatureRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__feature_service_set_user_features_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._set_user_features_serialize( + feature_service_set_user_feature_request=feature_service_set_user_feature_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "FeatureServiceSetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1237,9 +1522,9 @@ def feature_service_set_user_features( response_types_map=_response_types_map, ).data - def __feature_service_set_user_features_serialize( + def _set_user_features_serialize( self, - user_id, + feature_service_set_user_feature_request, _request_auth, _content_type, _headers, @@ -1261,12 +1546,12 @@ def __feature_service_set_user_features_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if feature_service_set_user_feature_request is not None: + _body_params = feature_service_set_user_feature_request # set the HTTP header `Accept` @@ -1277,6 +1562,19 @@ def __feature_service_set_user_features_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1284,8 +1582,8 @@ def __feature_service_set_user_features_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/user/{userId}', + method='POST', + resource_path='/zitadel.feature.v2.FeatureService/SetUserFeatures', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/identity_provider_service_api.py b/zitadel_client/api/identity_provider_service_api.py index 4c7a61ad..30e1b51f 100644 --- a/zitadel_client/api/identity_provider_service_api.py +++ b/zitadel_client/api/identity_provider_service_api.py @@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from zitadel_client.models.identity_provider_service_get_idpby_id_request import IdentityProviderServiceGetIDPByIDRequest from zitadel_client.models.identity_provider_service_get_idpby_id_response import IdentityProviderServiceGetIDPByIDResponse from zitadel_client.api_client import ApiClient, RequestSerialized @@ -38,36 +38,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def identity_provider_service_get_idpby_id( - self, - id: StrictStr, - ) -> IdentityProviderServiceGetIDPByIDResponse: - """Get identity provider (IdP) by ID - - Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. - - :param id: (required) - :type id: str + def get_idpby_id( self, identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> IdentityProviderServiceGetIDPByIDResponse: + """GetIDPByID + + Get identity provider (IdP) by ID Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. + + :param identity_provider_service_get_idpby_id_request: (required) + :type identity_provider_service_get_idpby_id_request: IdentityProviderServiceGetIDPByIDRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__identity_provider_service_get_idpby_id_serialize( - id=id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_idpby_id_serialize( + identity_provider_service_get_idpby_id_request=identity_provider_service_get_idpby_id_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "IdentityProviderServiceGetIDPByIDResponse", - '403': "IdentityProviderServiceRpcStatus", - '404': "IdentityProviderServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -75,9 +88,9 @@ def identity_provider_service_get_idpby_id( response_types_map=_response_types_map, ).data - def __identity_provider_service_get_idpby_id_serialize( + def _get_idpby_id_serialize( self, - id, + identity_provider_service_get_idpby_id_request, _request_auth, _content_type, _headers, @@ -99,12 +112,12 @@ def __identity_provider_service_get_idpby_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if identity_provider_service_get_idpby_id_request is not None: + _body_params = identity_provider_service_get_idpby_id_request # set the HTTP header `Accept` @@ -115,6 +128,19 @@ def __identity_provider_service_get_idpby_id_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -122,8 +148,8 @@ def __identity_provider_service_get_idpby_id_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/idps/{id}', + method='POST', + resource_path='/zitadel.idp.v2.IdentityProviderService/GetIDPByID', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/oidc_service_api.py b/zitadel_client/api/oidc_service_api.py index 0c06b8f2..882a9292 100644 --- a/zitadel_client/api/oidc_service_api.py +++ b/zitadel_client/api/oidc_service_api.py @@ -16,13 +16,13 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr from typing import Any, Dict -from typing_extensions import Annotated from zitadel_client.models.oidc_service_authorize_or_deny_device_authorization_request import OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest from zitadel_client.models.oidc_service_create_callback_request import OIDCServiceCreateCallbackRequest from zitadel_client.models.oidc_service_create_callback_response import OIDCServiceCreateCallbackResponse +from zitadel_client.models.oidc_service_get_auth_request_request import OIDCServiceGetAuthRequestRequest from zitadel_client.models.oidc_service_get_auth_request_response import OIDCServiceGetAuthRequestResponse +from zitadel_client.models.oidc_service_get_device_authorization_request_request import OIDCServiceGetDeviceAuthorizationRequestRequest from zitadel_client.models.oidc_service_get_device_authorization_request_response import OIDCServiceGetDeviceAuthorizationRequestResponse from zitadel_client.api_client import ApiClient, RequestSerialized @@ -44,40 +44,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def o_idc_service_authorize_or_deny_device_authorization( - self, - device_authorization_id: Annotated[StrictStr, Field(description="The device authorization id returned when submitting the user code.")], - oidc_service_authorize_or_deny_device_authorization_request: OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest, - ) -> object: - """Authorize or deny device authorization + def authorize_or_deny_device_authorization( self, oidc_service_authorize_or_deny_device_authorization_request: OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: + """AuthorizeOrDenyDeviceAuthorization - Authorize or deny the device authorization request based on the provided device authorization id. + Authorize or deny device authorization Authorize or deny the device authorization request based on the provided device authorization id. - :param device_authorization_id: The device authorization id returned when submitting the user code. (required) - :type device_authorization_id: str :param oidc_service_authorize_or_deny_device_authorization_request: (required) :type oidc_service_authorize_or_deny_device_authorization_request: OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__o_idc_service_authorize_or_deny_device_authorization_serialize( - device_authorization_id=device_authorization_id, + _param = self._authorize_or_deny_device_authorization_serialize( oidc_service_authorize_or_deny_device_authorization_request=oidc_service_authorize_or_deny_device_authorization_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "object", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -85,9 +94,8 @@ def o_idc_service_authorize_or_deny_device_authorization( response_types_map=_response_types_map, ).data - def __o_idc_service_authorize_or_deny_device_authorization_serialize( + def _authorize_or_deny_device_authorization_serialize( self, - device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, _request_auth, _content_type, @@ -110,8 +118,6 @@ def __o_idc_service_authorize_or_deny_device_authorization_serialize( _body_params: Optional[bytes] = None # process the path parameters - if device_authorization_id is not None: - _path_params['deviceAuthorizationId'] = device_authorization_id # process the query parameters # process the header parameters # process the form parameters @@ -149,7 +155,7 @@ def __o_idc_service_authorize_or_deny_device_authorization_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/oidc/device_authorization/{deviceAuthorizationId}', + resource_path='/zitadel.oidc.v2.OIDCService/AuthorizeOrDenyDeviceAuthorization', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -166,40 +172,48 @@ def __o_idc_service_authorize_or_deny_device_authorization_serialize( @validate_call - def o_idc_service_create_callback( - self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request.")], - oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest, - ) -> OIDCServiceCreateCallbackResponse: - """Finalize an Auth Request and get the callback URL. + def create_callback( self, oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OIDCServiceCreateCallbackResponse: + """CreateCallback - Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. - :param auth_request_id: ID of the Auth Request. (required) - :type auth_request_id: str :param oidc_service_create_callback_request: (required) :type oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__o_idc_service_create_callback_serialize( - auth_request_id=auth_request_id, + _param = self._create_callback_serialize( oidc_service_create_callback_request=oidc_service_create_callback_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceCreateCallbackResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -207,9 +221,8 @@ def o_idc_service_create_callback( response_types_map=_response_types_map, ).data - def __o_idc_service_create_callback_serialize( + def _create_callback_serialize( self, - auth_request_id, oidc_service_create_callback_request, _request_auth, _content_type, @@ -232,8 +245,6 @@ def __o_idc_service_create_callback_serialize( _body_params: Optional[bytes] = None # process the path parameters - if auth_request_id is not None: - _path_params['authRequestId'] = auth_request_id # process the query parameters # process the header parameters # process the form parameters @@ -271,7 +282,7 @@ def __o_idc_service_create_callback_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/oidc/auth_requests/{authRequestId}', + resource_path='/zitadel.oidc.v2.OIDCService/CreateCallback', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -288,36 +299,48 @@ def __o_idc_service_create_callback_serialize( @validate_call - def o_idc_service_get_auth_request( - self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request, as obtained from the redirect URL.")], - ) -> OIDCServiceGetAuthRequestResponse: - """Get OIDC Auth Request details - - Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. - - :param auth_request_id: ID of the Auth Request, as obtained from the redirect URL. (required) - :type auth_request_id: str + def get_auth_request( self, oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OIDCServiceGetAuthRequestResponse: + """GetAuthRequest + + + :param oidc_service_get_auth_request_request: (required) + :type oidc_service_get_auth_request_request: OIDCServiceGetAuthRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__o_idc_service_get_auth_request_serialize( - auth_request_id=auth_request_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_auth_request_serialize( + oidc_service_get_auth_request_request=oidc_service_get_auth_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetAuthRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -325,9 +348,9 @@ def o_idc_service_get_auth_request( response_types_map=_response_types_map, ).data - def __o_idc_service_get_auth_request_serialize( + def _get_auth_request_serialize( self, - auth_request_id, + oidc_service_get_auth_request_request, _request_auth, _content_type, _headers, @@ -349,12 +372,12 @@ def __o_idc_service_get_auth_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if auth_request_id is not None: - _path_params['authRequestId'] = auth_request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if oidc_service_get_auth_request_request is not None: + _body_params = oidc_service_get_auth_request_request # set the HTTP header `Accept` @@ -365,6 +388,19 @@ def __o_idc_service_get_auth_request_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -372,8 +408,8 @@ def __o_idc_service_get_auth_request_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/oidc/auth_requests/{authRequestId}', + method='POST', + resource_path='/zitadel.oidc.v2.OIDCService/GetAuthRequest', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -390,36 +426,49 @@ def __o_idc_service_get_auth_request_serialize( @validate_call - def o_idc_service_get_device_authorization_request( - self, - user_code: Annotated[StrictStr, Field(description="The user_code returned by the device authorization request and provided to the user by the device.")], - ) -> OIDCServiceGetDeviceAuthorizationRequestResponse: - """Get device authorization request - - Get the device authorization based on the provided \"user code\". This will return the device authorization request, which contains the device authorization id that is required to authorize the request once the user signed in or to deny it. - - :param user_code: The user_code returned by the device authorization request and provided to the user by the device. (required) - :type user_code: str + def get_device_authorization_request( self, oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OIDCServiceGetDeviceAuthorizationRequestResponse: + """GetDeviceAuthorizationRequest + + Get device authorization request Get the device authorization based on the provided \"user code\". This will return the device authorization request, which contains the device authorization id that is required to authorize the request once the user signed in or to deny it. + + :param oidc_service_get_device_authorization_request_request: (required) + :type oidc_service_get_device_authorization_request_request: OIDCServiceGetDeviceAuthorizationRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__o_idc_service_get_device_authorization_request_serialize( - user_code=user_code, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_device_authorization_request_serialize( + oidc_service_get_device_authorization_request_request=oidc_service_get_device_authorization_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "OIDCServiceGetDeviceAuthorizationRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -427,9 +476,9 @@ def o_idc_service_get_device_authorization_request( response_types_map=_response_types_map, ).data - def __o_idc_service_get_device_authorization_request_serialize( + def _get_device_authorization_request_serialize( self, - user_code, + oidc_service_get_device_authorization_request_request, _request_auth, _content_type, _headers, @@ -451,12 +500,12 @@ def __o_idc_service_get_device_authorization_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_code is not None: - _path_params['userCode'] = user_code # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if oidc_service_get_device_authorization_request_request is not None: + _body_params = oidc_service_get_device_authorization_request_request # set the HTTP header `Accept` @@ -467,6 +516,19 @@ def __o_idc_service_get_device_authorization_request_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -474,8 +536,8 @@ def __o_idc_service_get_device_authorization_request_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/oidc/device_authorization/{userCode}', + method='POST', + resource_path='/zitadel.oidc.v2.OIDCService/GetDeviceAuthorizationRequest', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/organization_service_api.py b/zitadel_client/api/organization_service_api.py index 7542b79b..04a43cc9 100644 --- a/zitadel_client/api/organization_service_api.py +++ b/zitadel_client/api/organization_service_api.py @@ -40,36 +40,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def organization_service_add_organization( - self, - organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest, - ) -> OrganizationServiceAddOrganizationResponse: - """Create an Organization + def add_organization( self, organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OrganizationServiceAddOrganizationResponse: + """AddOrganization - Create a new organization with an administrative user. If no specific roles are sent for the users, they will be granted the role ORG_OWNER. + Create an Organization Create a new organization with an administrative user. If no specific roles are sent for the users, they will be granted the role ORG_OWNER. :param organization_service_add_organization_request: (required) :type organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__organization_service_add_organization_serialize( + _param = self._add_organization_serialize( organization_service_add_organization_request=organization_service_add_organization_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceAddOrganizationResponse", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -77,7 +90,7 @@ def organization_service_add_organization( response_types_map=_response_types_map, ).data - def __organization_service_add_organization_serialize( + def _add_organization_serialize( self, organization_service_add_organization_request, _request_auth, @@ -138,7 +151,7 @@ def __organization_service_add_organization_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/organizations', + resource_path='/zitadel.org.v2.OrganizationService/AddOrganization', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -155,37 +168,49 @@ def __organization_service_add_organization_serialize( @validate_call - def organization_service_list_organizations( - self, - organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest, - ) -> OrganizationServiceListOrganizationsResponse: - """Search Organizations + def list_organizations( self, organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OrganizationServiceListOrganizationsResponse: + """ListOrganizations - Search for Organizations. By default, we will return all organization of the instance. Make sure to include a limit and sorting for pagination.. + Search Organizations Search for Organizations. By default, we will return all organization of the instance. Make sure to include a limit and sorting for pagination.. :param organization_service_list_organizations_request: (required) :type organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__organization_service_list_organizations_serialize( + _param = self._list_organizations_serialize( organization_service_list_organizations_request=organization_service_list_organizations_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "OrganizationServiceListOrganizationsResponse", - '400': "OrganizationServiceRpcStatus", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -193,7 +218,7 @@ def organization_service_list_organizations( response_types_map=_response_types_map, ).data - def __organization_service_list_organizations_serialize( + def _list_organizations_serialize( self, organization_service_list_organizations_request, _request_auth, @@ -254,7 +279,7 @@ def __organization_service_list_organizations_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/organizations/_search', + resource_path='/zitadel.org.v2.OrganizationService/ListOrganizations', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/saml_service_api.py b/zitadel_client/api/saml_service_api.py index 27c75b60..e403c3cc 100644 --- a/zitadel_client/api/saml_service_api.py +++ b/zitadel_client/api/saml_service_api.py @@ -16,10 +16,9 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr -from typing_extensions import Annotated from zitadel_client.models.saml_service_create_response_request import SAMLServiceCreateResponseRequest from zitadel_client.models.saml_service_create_response_response import SAMLServiceCreateResponseResponse +from zitadel_client.models.saml_service_get_saml_request_request import SAMLServiceGetSAMLRequestRequest from zitadel_client.models.saml_service_get_saml_request_response import SAMLServiceGetSAMLRequestResponse from zitadel_client.api_client import ApiClient, RequestSerialized @@ -41,40 +40,48 @@ def __init__(self, api_client=None) -> None: @validate_call - def s_aml_service_create_response( - self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request.")], - saml_service_create_response_request: SAMLServiceCreateResponseRequest, - ) -> SAMLServiceCreateResponseResponse: - """Finalize a SAML Request and get the response. + def create_response( self, saml_service_create_response_request: SAMLServiceCreateResponseRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SAMLServiceCreateResponseResponse: + """CreateResponse - Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request. - :param saml_request_id: ID of the SAML Request. (required) - :type saml_request_id: str :param saml_service_create_response_request: (required) :type saml_service_create_response_request: SAMLServiceCreateResponseRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__s_aml_service_create_response_serialize( - saml_request_id=saml_request_id, + _param = self._create_response_serialize( saml_service_create_response_request=saml_service_create_response_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceCreateResponseResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -82,9 +89,8 @@ def s_aml_service_create_response( response_types_map=_response_types_map, ).data - def __s_aml_service_create_response_serialize( + def _create_response_serialize( self, - saml_request_id, saml_service_create_response_request, _request_auth, _content_type, @@ -107,8 +113,6 @@ def __s_aml_service_create_response_serialize( _body_params: Optional[bytes] = None # process the path parameters - if saml_request_id is not None: - _path_params['samlRequestId'] = saml_request_id # process the query parameters # process the header parameters # process the form parameters @@ -146,7 +150,7 @@ def __s_aml_service_create_response_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/saml/saml_requests/{samlRequestId}', + resource_path='/zitadel.saml.v2.SAMLService/CreateResponse', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -163,36 +167,48 @@ def __s_aml_service_create_response_serialize( @validate_call - def s_aml_service_get_saml_request( - self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request, as obtained from the redirect URL.")], - ) -> SAMLServiceGetSAMLRequestResponse: - """Get SAML Request details - - Get SAML Request details by ID. Returns details that are parsed from the application's SAML Request. - - :param saml_request_id: ID of the SAML Request, as obtained from the redirect URL. (required) - :type saml_request_id: str + def get_saml_request( self, saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SAMLServiceGetSAMLRequestResponse: + """GetSAMLRequest + + + :param saml_service_get_saml_request_request: (required) + :type saml_service_get_saml_request_request: SAMLServiceGetSAMLRequestRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__s_aml_service_get_saml_request_serialize( - saml_request_id=saml_request_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_saml_request_serialize( + saml_service_get_saml_request_request=saml_service_get_saml_request_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SAMLServiceGetSAMLRequestResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -200,9 +216,9 @@ def s_aml_service_get_saml_request( response_types_map=_response_types_map, ).data - def __s_aml_service_get_saml_request_serialize( + def _get_saml_request_serialize( self, - saml_request_id, + saml_service_get_saml_request_request, _request_auth, _content_type, _headers, @@ -224,12 +240,12 @@ def __s_aml_service_get_saml_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if saml_request_id is not None: - _path_params['samlRequestId'] = saml_request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if saml_service_get_saml_request_request is not None: + _body_params = saml_service_get_saml_request_request # set the HTTP header `Accept` @@ -240,6 +256,19 @@ def __s_aml_service_get_saml_request_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -247,8 +276,8 @@ def __s_aml_service_get_saml_request_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/saml/saml_requests/{samlRequestId}', + method='POST', + resource_path='/zitadel.saml.v2.SAMLService/GetSAMLRequest', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/session_service_api.py b/zitadel_client/api/session_service_api.py index 71f9a0ac..71c1e5d5 100644 --- a/zitadel_client/api/session_service_api.py +++ b/zitadel_client/api/session_service_api.py @@ -16,13 +16,11 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr -from typing import Optional -from typing_extensions import Annotated from zitadel_client.models.session_service_create_session_request import SessionServiceCreateSessionRequest from zitadel_client.models.session_service_create_session_response import SessionServiceCreateSessionResponse from zitadel_client.models.session_service_delete_session_request import SessionServiceDeleteSessionRequest from zitadel_client.models.session_service_delete_session_response import SessionServiceDeleteSessionResponse +from zitadel_client.models.session_service_get_session_request import SessionServiceGetSessionRequest from zitadel_client.models.session_service_get_session_response import SessionServiceGetSessionResponse from zitadel_client.models.session_service_list_sessions_request import SessionServiceListSessionsRequest from zitadel_client.models.session_service_list_sessions_response import SessionServiceListSessionsResponse @@ -48,36 +46,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def session_service_create_session( - self, - session_service_create_session_request: SessionServiceCreateSessionRequest, - ) -> SessionServiceCreateSessionResponse: - """Create a new session + def create_session( self, session_service_create_session_request: SessionServiceCreateSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceCreateSessionResponse: + """CreateSession - Create a new session. A token will be returned, which is required for further updates of the session. + Create a new session :param session_service_create_session_request: (required) :type session_service_create_session_request: SessionServiceCreateSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__session_service_create_session_serialize( + _param = self._create_session_serialize( session_service_create_session_request=session_service_create_session_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SessionServiceCreateSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", + '200': "SessionServiceCreateSessionResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -85,7 +96,7 @@ def session_service_create_session( response_types_map=_response_types_map, ).data - def __session_service_create_session_serialize( + def _create_session_serialize( self, session_service_create_session_request, _request_auth, @@ -146,7 +157,7 @@ def __session_service_create_session_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/sessions', + resource_path='/zitadel.session.v2.SessionService/CreateSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -163,40 +174,49 @@ def __session_service_create_session_serialize( @validate_call - def session_service_delete_session( - self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to terminate\"")], - session_service_delete_session_request: SessionServiceDeleteSessionRequest, - ) -> SessionServiceDeleteSessionResponse: - """Terminate an existing session + def delete_session( self, session_service_delete_session_request: SessionServiceDeleteSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceDeleteSessionResponse: + """DeleteSession - Terminate your own session or if granted any other session. + Terminate a session - :param session_id: \"id of the session to terminate\" (required) - :type session_id: str :param session_service_delete_session_request: (required) :type session_service_delete_session_request: SessionServiceDeleteSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__session_service_delete_session_serialize( - session_id=session_id, + _param = self._delete_session_serialize( session_service_delete_session_request=session_service_delete_session_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceDeleteSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -204,9 +224,8 @@ def session_service_delete_session( response_types_map=_response_types_map, ).data - def __session_service_delete_session_serialize( + def _delete_session_serialize( self, - session_id, session_service_delete_session_request, _request_auth, _content_type, @@ -229,8 +248,6 @@ def __session_service_delete_session_serialize( _body_params: Optional[bytes] = None # process the path parameters - if session_id is not None: - _path_params['sessionId'] = session_id # process the query parameters # process the header parameters # process the form parameters @@ -267,8 +284,8 @@ def __session_service_delete_session_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/sessions/{sessionId}', + method='POST', + resource_path='/zitadel.session.v2.SessionService/DeleteSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -285,40 +302,49 @@ def __session_service_delete_session_serialize( @validate_call - def session_service_get_session( - self, - session_id: StrictStr, - session_token: Optional[StrictStr] = None, - ) -> SessionServiceGetSessionResponse: - """Get a session - - Get a session and all its information like the time of the user or password verification - - :param session_id: (required) - :type session_id: str - :param session_token: - :type session_token: str + def get_session( self, session_service_get_session_request: SessionServiceGetSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceGetSessionResponse: + """GetSession + + GetSession a session + + :param session_service_get_session_request: (required) + :type session_service_get_session_request: SessionServiceGetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__session_service_get_session_serialize( - session_id=session_id, - session_token=session_token, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_session_serialize( + session_service_get_session_request=session_service_get_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceGetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -326,10 +352,9 @@ def session_service_get_session( response_types_map=_response_types_map, ).data - def __session_service_get_session_serialize( + def _get_session_serialize( self, - session_id, - session_token, + session_service_get_session_request, _request_auth, _content_type, _headers, @@ -351,16 +376,12 @@ def __session_service_get_session_serialize( _body_params: Optional[bytes] = None # process the path parameters - if session_id is not None: - _path_params['sessionId'] = session_id # process the query parameters - if session_token is not None: - - _query_params.append(('sessionToken', session_token)) - # process the header parameters # process the form parameters # process the body parameter + if session_service_get_session_request is not None: + _body_params = session_service_get_session_request # set the HTTP header `Accept` @@ -371,6 +392,19 @@ def __session_service_get_session_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -378,8 +412,8 @@ def __session_service_get_session_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/sessions/{sessionId}', + method='POST', + resource_path='/zitadel.session.v2.SessionService/GetSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -396,37 +430,49 @@ def __session_service_get_session_serialize( @validate_call - def session_service_list_sessions( - self, - session_service_list_sessions_request: SessionServiceListSessionsRequest, - ) -> SessionServiceListSessionsResponse: - """Search sessions + def list_sessions( self, session_service_list_sessions_request: SessionServiceListSessionsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceListSessionsResponse: + """ListSessions - Search for sessions + Search sessions :param session_service_list_sessions_request: (required) :type session_service_list_sessions_request: SessionServiceListSessionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__session_service_list_sessions_serialize( + _param = self._list_sessions_serialize( session_service_list_sessions_request=session_service_list_sessions_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceListSessionsResponse", - '400': "SessionServiceRpcStatus", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -434,7 +480,7 @@ def session_service_list_sessions( response_types_map=_response_types_map, ).data - def __session_service_list_sessions_serialize( + def _list_sessions_serialize( self, session_service_list_sessions_request, _request_auth, @@ -495,7 +541,7 @@ def __session_service_list_sessions_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/sessions/search', + resource_path='/zitadel.session.v2.SessionService/ListSessions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -512,40 +558,49 @@ def __session_service_list_sessions_serialize( @validate_call - def session_service_set_session( - self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to update\"")], - session_service_set_session_request: SessionServiceSetSessionRequest, - ) -> SessionServiceSetSessionResponse: - """Update an existing session + def set_session( self, session_service_set_session_request: SessionServiceSetSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SessionServiceSetSessionResponse: + """SetSession - Update an existing session with new information. + Update a session - :param session_id: \"id of the session to update\" (required) - :type session_id: str :param session_service_set_session_request: (required) :type session_service_set_session_request: SessionServiceSetSessionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__session_service_set_session_serialize( - session_id=session_id, + _param = self._set_session_serialize( session_service_set_session_request=session_service_set_session_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SessionServiceSetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -553,9 +608,8 @@ def session_service_set_session( response_types_map=_response_types_map, ).data - def __session_service_set_session_serialize( + def _set_session_serialize( self, - session_id, session_service_set_session_request, _request_auth, _content_type, @@ -578,8 +632,6 @@ def __session_service_set_session_serialize( _body_params: Optional[bytes] = None # process the path parameters - if session_id is not None: - _path_params['sessionId'] = session_id # process the query parameters # process the header parameters # process the form parameters @@ -616,8 +668,8 @@ def __session_service_set_session_serialize( ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v2/sessions/{sessionId}', + method='POST', + resource_path='/zitadel.session.v2.SessionService/SetSession', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/settings_service_api.py b/zitadel_client/api/settings_service_api.py index 6f45d5d7..61a0bd38 100644 --- a/zitadel_client/api/settings_service_api.py +++ b/zitadel_client/api/settings_service_api.py @@ -16,18 +16,29 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictBool, StrictStr -from typing import Optional +from typing import Any, Dict +from zitadel_client.models.settings_service_get_active_identity_providers_request import SettingsServiceGetActiveIdentityProvidersRequest from zitadel_client.models.settings_service_get_active_identity_providers_response import SettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.settings_service_get_branding_settings_request import SettingsServiceGetBrandingSettingsRequest from zitadel_client.models.settings_service_get_branding_settings_response import SettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.settings_service_get_domain_settings_request import SettingsServiceGetDomainSettingsRequest from zitadel_client.models.settings_service_get_domain_settings_response import SettingsServiceGetDomainSettingsResponse from zitadel_client.models.settings_service_get_general_settings_response import SettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.settings_service_get_hosted_login_translation_request import SettingsServiceGetHostedLoginTranslationRequest +from zitadel_client.models.settings_service_get_hosted_login_translation_response import SettingsServiceGetHostedLoginTranslationResponse +from zitadel_client.models.settings_service_get_legal_and_support_settings_request import SettingsServiceGetLegalAndSupportSettingsRequest from zitadel_client.models.settings_service_get_legal_and_support_settings_response import SettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.settings_service_get_lockout_settings_request import SettingsServiceGetLockoutSettingsRequest from zitadel_client.models.settings_service_get_lockout_settings_response import SettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.settings_service_get_login_settings_request import SettingsServiceGetLoginSettingsRequest from zitadel_client.models.settings_service_get_login_settings_response import SettingsServiceGetLoginSettingsResponse +from zitadel_client.models.settings_service_get_password_complexity_settings_request import SettingsServiceGetPasswordComplexitySettingsRequest from zitadel_client.models.settings_service_get_password_complexity_settings_response import SettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.settings_service_get_password_expiry_settings_request import SettingsServiceGetPasswordExpirySettingsRequest from zitadel_client.models.settings_service_get_password_expiry_settings_response import SettingsServiceGetPasswordExpirySettingsResponse from zitadel_client.models.settings_service_get_security_settings_response import SettingsServiceGetSecuritySettingsResponse +from zitadel_client.models.settings_service_set_hosted_login_translation_request import SettingsServiceSetHostedLoginTranslationRequest +from zitadel_client.models.settings_service_set_hosted_login_translation_response import SettingsServiceSetHostedLoginTranslationResponse from zitadel_client.models.settings_service_set_security_settings_request import SettingsServiceSetSecuritySettingsRequest from zitadel_client.models.settings_service_set_security_settings_response import SettingsServiceSetSecuritySettingsResponse @@ -50,56 +61,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def settings_service_get_active_identity_providers( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - creation_allowed: Optional[StrictBool] = None, - linking_allowed: Optional[StrictBool] = None, - auto_creation: Optional[StrictBool] = None, - auto_linking: Optional[StrictBool] = None, - ) -> SettingsServiceGetActiveIdentityProvidersResponse: - """Get the current active identity providers - - Return the current active identity providers for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param creation_allowed: - :type creation_allowed: bool - :param linking_allowed: - :type linking_allowed: bool - :param auto_creation: - :type auto_creation: bool - :param auto_linking: - :type auto_linking: bool + def get_active_identity_providers( self, settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetActiveIdentityProvidersResponse: + """GetActiveIdentityProviders + + Get the current active identity providers + + :param settings_service_get_active_identity_providers_request: (required) + :type settings_service_get_active_identity_providers_request: SettingsServiceGetActiveIdentityProvidersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_active_identity_providers_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - creation_allowed=creation_allowed, - linking_allowed=linking_allowed, - auto_creation=auto_creation, - auto_linking=auto_linking, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_active_identity_providers_serialize( + settings_service_get_active_identity_providers_request=settings_service_get_active_identity_providers_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetActiveIdentityProvidersResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -107,14 +111,9 @@ def settings_service_get_active_identity_providers( response_types_map=_response_types_map, ).data - def __settings_service_get_active_identity_providers_serialize( + def _get_active_identity_providers_serialize( self, - ctx_org_id, - ctx_instance, - creation_allowed, - linking_allowed, - auto_creation, - auto_linking, + settings_service_get_active_identity_providers_request, _request_auth, _content_type, _headers, @@ -137,33 +136,11 @@ def __settings_service_get_active_identity_providers_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - - if creation_allowed is not None: - - _query_params.append(('creationAllowed', creation_allowed)) - - if linking_allowed is not None: - - _query_params.append(('linkingAllowed', linking_allowed)) - - if auto_creation is not None: - - _query_params.append(('autoCreation', auto_creation)) - - if auto_linking is not None: - - _query_params.append(('autoLinking', auto_linking)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_active_identity_providers_request is not None: + _body_params = settings_service_get_active_identity_providers_request # set the HTTP header `Accept` @@ -174,6 +151,19 @@ def __settings_service_get_active_identity_providers_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -181,8 +171,8 @@ def __settings_service_get_active_identity_providers_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/login/idps', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetActiveIdentityProviders', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -199,40 +189,49 @@ def __settings_service_get_active_identity_providers_serialize( @validate_call - def settings_service_get_branding_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - ) -> SettingsServiceGetBrandingSettingsResponse: - """Get the current active branding settings - - Return the current active branding settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + def get_branding_settings( self, settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetBrandingSettingsResponse: + """GetBrandingSettings + + Get the current active branding settings + + :param settings_service_get_branding_settings_request: (required) + :type settings_service_get_branding_settings_request: SettingsServiceGetBrandingSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_branding_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_branding_settings_serialize( + settings_service_get_branding_settings_request=settings_service_get_branding_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetBrandingSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -240,10 +239,9 @@ def settings_service_get_branding_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_branding_settings_serialize( + def _get_branding_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_branding_settings_request, _request_auth, _content_type, _headers, @@ -266,17 +264,11 @@ def __settings_service_get_branding_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_branding_settings_request is not None: + _body_params = settings_service_get_branding_settings_request # set the HTTP header `Accept` @@ -287,6 +279,19 @@ def __settings_service_get_branding_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -294,8 +299,8 @@ def __settings_service_get_branding_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/branding', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetBrandingSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -312,40 +317,49 @@ def __settings_service_get_branding_settings_serialize( @validate_call - def settings_service_get_domain_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - ) -> SettingsServiceGetDomainSettingsResponse: - """Get the domain settings - - Return the domain settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + def get_domain_settings( self, settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetDomainSettingsResponse: + """GetDomainSettings + + Get the domain settings + + :param settings_service_get_domain_settings_request: (required) + :type settings_service_get_domain_settings_request: SettingsServiceGetDomainSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_domain_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_domain_settings_serialize( + settings_service_get_domain_settings_request=settings_service_get_domain_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetDomainSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -353,10 +367,9 @@ def settings_service_get_domain_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_domain_settings_serialize( + def _get_domain_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_domain_settings_request, _request_auth, _content_type, _headers, @@ -379,17 +392,11 @@ def __settings_service_get_domain_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_domain_settings_request is not None: + _body_params = settings_service_get_domain_settings_request # set the HTTP header `Accept` @@ -400,6 +407,19 @@ def __settings_service_get_domain_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -407,8 +427,8 @@ def __settings_service_get_domain_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/domain', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetDomainSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -425,32 +445,179 @@ def __settings_service_get_domain_settings_serialize( @validate_call - def settings_service_get_general_settings( - self, - ) -> SettingsServiceGetGeneralSettingsResponse: - """Get basic information over the instance - - Return the basic information of the instance for the requested context - + def get_general_settings( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetGeneralSettingsResponse: + if body is None: + body = {} + """GetGeneralSettings + + Get basic information over the instance + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_general_settings_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_general_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetGeneralSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_general_settings_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetGeneralSettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_hosted_login_translation( self, settings_service_get_hosted_login_translation_request: SettingsServiceGetHostedLoginTranslationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetHostedLoginTranslationResponse: + """GetHostedLoginTranslation + + Get Hosted Login Translation Returns the translations in the requested locale for the hosted login. The translations returned are based on the input level specified (system, instance or organization). If the requested level doesn't contain all translations, and ignore_inheritance is set to false, a merging process fallbacks onto the higher levels ensuring all keys in the file have a translation, which could be in the default language if the one of the locale is missing on all levels. The etag returned in the response represents the hash of the translations as they are stored on DB and its reliable only if ignore_inheritance = true. Required permissions: - `iam.policy.read` + + :param settings_service_get_hosted_login_translation_request: (required) + :type settings_service_get_hosted_login_translation_request: SettingsServiceGetHostedLoginTranslationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_hosted_login_translation_serialize( + settings_service_get_hosted_login_translation_request=settings_service_get_hosted_login_translation_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceGetHostedLoginTranslationResponse", + } response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -458,8 +625,9 @@ def settings_service_get_general_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_general_settings_serialize( + def _get_hosted_login_translation_serialize( self, + settings_service_get_hosted_login_translation_request, _request_auth, _content_type, _headers, @@ -485,6 +653,8 @@ def __settings_service_get_general_settings_serialize( # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_hosted_login_translation_request is not None: + _body_params = settings_service_get_hosted_login_translation_request # set the HTTP header `Accept` @@ -495,6 +665,19 @@ def __settings_service_get_general_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -502,8 +685,8 @@ def __settings_service_get_general_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetHostedLoginTranslation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -520,40 +703,49 @@ def __settings_service_get_general_settings_serialize( @validate_call - def settings_service_get_legal_and_support_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - ) -> SettingsServiceGetLegalAndSupportSettingsResponse: - """Get the legal and support settings - - Return the legal settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + def get_legal_and_support_settings( self, settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetLegalAndSupportSettingsResponse: + """GetLegalAndSupportSettings + + Get the legal and support settings + + :param settings_service_get_legal_and_support_settings_request: (required) + :type settings_service_get_legal_and_support_settings_request: SettingsServiceGetLegalAndSupportSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_legal_and_support_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_legal_and_support_settings_serialize( + settings_service_get_legal_and_support_settings_request=settings_service_get_legal_and_support_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLegalAndSupportSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -561,10 +753,9 @@ def settings_service_get_legal_and_support_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_legal_and_support_settings_serialize( + def _get_legal_and_support_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_legal_and_support_settings_request, _request_auth, _content_type, _headers, @@ -587,17 +778,11 @@ def __settings_service_get_legal_and_support_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_legal_and_support_settings_request is not None: + _body_params = settings_service_get_legal_and_support_settings_request # set the HTTP header `Accept` @@ -608,6 +793,19 @@ def __settings_service_get_legal_and_support_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -615,8 +813,8 @@ def __settings_service_get_legal_and_support_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/legal_support', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetLegalAndSupportSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -633,40 +831,49 @@ def __settings_service_get_legal_and_support_settings_serialize( @validate_call - def settings_service_get_lockout_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - ) -> SettingsServiceGetLockoutSettingsResponse: - """Get the lockout settings - - Return the lockout settings for the requested context, which define when a user will be locked - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + def get_lockout_settings( self, settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetLockoutSettingsResponse: + """GetLockoutSettings + + Get the lockout settings + + :param settings_service_get_lockout_settings_request: (required) + :type settings_service_get_lockout_settings_request: SettingsServiceGetLockoutSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_lockout_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_lockout_settings_serialize( + settings_service_get_lockout_settings_request=settings_service_get_lockout_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLockoutSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -674,10 +881,9 @@ def settings_service_get_lockout_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_lockout_settings_serialize( + def _get_lockout_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_lockout_settings_request, _request_auth, _content_type, _headers, @@ -700,17 +906,11 @@ def __settings_service_get_lockout_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_lockout_settings_request is not None: + _body_params = settings_service_get_lockout_settings_request # set the HTTP header `Accept` @@ -721,6 +921,19 @@ def __settings_service_get_lockout_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -728,8 +941,8 @@ def __settings_service_get_lockout_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/lockout', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetLockoutSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -746,40 +959,49 @@ def __settings_service_get_lockout_settings_serialize( @validate_call - def settings_service_get_login_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - ) -> SettingsServiceGetLoginSettingsResponse: - """Get the login settings - - Return the settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + def get_login_settings( self, settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetLoginSettingsResponse: + """GetLoginSettings + + Get the login settings + + :param settings_service_get_login_settings_request: (required) + :type settings_service_get_login_settings_request: SettingsServiceGetLoginSettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_login_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_login_settings_serialize( + settings_service_get_login_settings_request=settings_service_get_login_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetLoginSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -787,10 +1009,9 @@ def settings_service_get_login_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_login_settings_serialize( + def _get_login_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_login_settings_request, _request_auth, _content_type, _headers, @@ -813,17 +1034,11 @@ def __settings_service_get_login_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_login_settings_request is not None: + _body_params = settings_service_get_login_settings_request # set the HTTP header `Accept` @@ -834,6 +1049,19 @@ def __settings_service_get_login_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -841,8 +1069,8 @@ def __settings_service_get_login_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/login', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetLoginSettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -859,40 +1087,49 @@ def __settings_service_get_login_settings_serialize( @validate_call - def settings_service_get_password_complexity_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - ) -> SettingsServiceGetPasswordComplexitySettingsResponse: - """Get the password complexity settings - - Return the password complexity settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + def get_password_complexity_settings( self, settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetPasswordComplexitySettingsResponse: + """GetPasswordComplexitySettings + + Get the password complexity settings + + :param settings_service_get_password_complexity_settings_request: (required) + :type settings_service_get_password_complexity_settings_request: SettingsServiceGetPasswordComplexitySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_password_complexity_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_password_complexity_settings_serialize( + settings_service_get_password_complexity_settings_request=settings_service_get_password_complexity_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordComplexitySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -900,10 +1137,9 @@ def settings_service_get_password_complexity_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_password_complexity_settings_serialize( + def _get_password_complexity_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_password_complexity_settings_request, _request_auth, _content_type, _headers, @@ -926,17 +1162,11 @@ def __settings_service_get_password_complexity_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_password_complexity_settings_request is not None: + _body_params = settings_service_get_password_complexity_settings_request # set the HTTP header `Accept` @@ -947,6 +1177,19 @@ def __settings_service_get_password_complexity_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -954,8 +1197,8 @@ def __settings_service_get_password_complexity_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/password/complexity', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetPasswordComplexitySettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -972,40 +1215,49 @@ def __settings_service_get_password_complexity_settings_serialize( @validate_call - def settings_service_get_password_expiry_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - ) -> SettingsServiceGetPasswordExpirySettingsResponse: - """Get the password expiry settings - - Return the password expiry settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool + def get_password_expiry_settings( self, settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetPasswordExpirySettingsResponse: + """GetPasswordExpirySettings + + Get the password expiry settings + + :param settings_service_get_password_expiry_settings_request: (required) + :type settings_service_get_password_expiry_settings_request: SettingsServiceGetPasswordExpirySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_password_expiry_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_password_expiry_settings_serialize( + settings_service_get_password_expiry_settings_request=settings_service_get_password_expiry_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetPasswordExpirySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1013,10 +1265,9 @@ def settings_service_get_password_expiry_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_password_expiry_settings_serialize( + def _get_password_expiry_settings_serialize( self, - ctx_org_id, - ctx_instance, + settings_service_get_password_expiry_settings_request, _request_auth, _content_type, _headers, @@ -1039,17 +1290,11 @@ def __settings_service_get_password_expiry_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter + if settings_service_get_password_expiry_settings_request is not None: + _body_params = settings_service_get_password_expiry_settings_request # set the HTTP header `Accept` @@ -1060,6 +1305,19 @@ def __settings_service_get_password_expiry_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1067,8 +1325,8 @@ def __settings_service_get_password_expiry_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/password/expiry', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetPasswordExpirySettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1085,32 +1343,179 @@ def __settings_service_get_password_expiry_settings_serialize( @validate_call - def settings_service_get_security_settings( - self, - ) -> SettingsServiceGetSecuritySettingsResponse: - """Get Security Settings - - Returns the security settings of the ZITADEL instance. - + def get_security_settings( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceGetSecuritySettingsResponse: + if body is None: + body = {} + """GetSecuritySettings + + Get the security settings + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_get_security_settings_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_security_settings_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _get_security_settings_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/GetSecuritySettings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def set_hosted_login_translation( self, settings_service_set_hosted_login_translation_request: SettingsServiceSetHostedLoginTranslationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceSetHostedLoginTranslationResponse: + """SetHostedLoginTranslation + + Set Hosted Login Translation Sets the input translations at the specified level (instance or organization) for the input language. Required permissions: - `iam.policy.write` + + :param settings_service_set_hosted_login_translation_request: (required) + :type settings_service_set_hosted_login_translation_request: SettingsServiceSetHostedLoginTranslationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._set_hosted_login_translation_serialize( + settings_service_set_hosted_login_translation_request=settings_service_set_hosted_login_translation_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceSetHostedLoginTranslationResponse", + } response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1118,8 +1523,9 @@ def settings_service_get_security_settings( response_types_map=_response_types_map, ).data - def __settings_service_get_security_settings_serialize( + def _set_hosted_login_translation_serialize( self, + settings_service_set_hosted_login_translation_request, _request_auth, _content_type, _headers, @@ -1145,6 +1551,8 @@ def __settings_service_get_security_settings_serialize( # process the header parameters # process the form parameters # process the body parameter + if settings_service_set_hosted_login_translation_request is not None: + _body_params = settings_service_set_hosted_login_translation_request # set the HTTP header `Accept` @@ -1155,6 +1563,19 @@ def __settings_service_get_security_settings_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1162,8 +1583,8 @@ def __settings_service_get_security_settings_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/security', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/SetHostedLoginTranslation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1180,36 +1601,49 @@ def __settings_service_get_security_settings_serialize( @validate_call - def settings_service_set_security_settings( - self, - settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, - ) -> SettingsServiceSetSecuritySettingsResponse: - """Set Security Settings + def set_security_settings( self, settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SettingsServiceSetSecuritySettingsResponse: + """SetSecuritySettings - Set the security settings of the ZITADEL instance. + Set the security settings :param settings_service_set_security_settings_request: (required) :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__settings_service_set_security_settings_serialize( + _param = self._set_security_settings_serialize( settings_service_set_security_settings_request=settings_service_set_security_settings_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1217,7 +1651,7 @@ def settings_service_set_security_settings( response_types_map=_response_types_map, ).data - def __settings_service_set_security_settings_serialize( + def _set_security_settings_serialize( self, settings_service_set_security_settings_request, _request_auth, @@ -1277,8 +1711,8 @@ def __settings_service_set_security_settings_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/policies/security', + method='POST', + resource_path='/zitadel.settings.v2.SettingsService/SetSecuritySettings', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/user_service_api.py b/zitadel_client/api/user_service_api.py index 66198d19..fce66706 100644 --- a/zitadel_client/api/user_service_api.py +++ b/zitadel_client/api/user_service_api.py @@ -16,48 +16,87 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated from zitadel_client.models.user_service_add_human_user_request import UserServiceAddHumanUserRequest from zitadel_client.models.user_service_add_human_user_response import UserServiceAddHumanUserResponse from zitadel_client.models.user_service_add_idp_link_request import UserServiceAddIDPLinkRequest from zitadel_client.models.user_service_add_idp_link_response import UserServiceAddIDPLinkResponse +from zitadel_client.models.user_service_add_key_request import UserServiceAddKeyRequest +from zitadel_client.models.user_service_add_key_response import UserServiceAddKeyResponse +from zitadel_client.models.user_service_add_otp_email_request import UserServiceAddOTPEmailRequest from zitadel_client.models.user_service_add_otp_email_response import UserServiceAddOTPEmailResponse +from zitadel_client.models.user_service_add_otpsms_request import UserServiceAddOTPSMSRequest from zitadel_client.models.user_service_add_otpsms_response import UserServiceAddOTPSMSResponse +from zitadel_client.models.user_service_add_personal_access_token_request import UserServiceAddPersonalAccessTokenRequest +from zitadel_client.models.user_service_add_personal_access_token_response import UserServiceAddPersonalAccessTokenResponse +from zitadel_client.models.user_service_add_secret_request import UserServiceAddSecretRequest +from zitadel_client.models.user_service_add_secret_response import UserServiceAddSecretResponse from zitadel_client.models.user_service_create_invite_code_request import UserServiceCreateInviteCodeRequest from zitadel_client.models.user_service_create_invite_code_response import UserServiceCreateInviteCodeResponse from zitadel_client.models.user_service_create_passkey_registration_link_request import UserServiceCreatePasskeyRegistrationLinkRequest from zitadel_client.models.user_service_create_passkey_registration_link_response import UserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.user_service_create_user_request import UserServiceCreateUserRequest +from zitadel_client.models.user_service_create_user_response import UserServiceCreateUserResponse +from zitadel_client.models.user_service_deactivate_user_request import UserServiceDeactivateUserRequest from zitadel_client.models.user_service_deactivate_user_response import UserServiceDeactivateUserResponse +from zitadel_client.models.user_service_delete_user_metadata_request import UserServiceDeleteUserMetadataRequest +from zitadel_client.models.user_service_delete_user_metadata_response import UserServiceDeleteUserMetadataResponse +from zitadel_client.models.user_service_delete_user_request import UserServiceDeleteUserRequest from zitadel_client.models.user_service_delete_user_response import UserServiceDeleteUserResponse +from zitadel_client.models.user_service_get_user_by_id_request import UserServiceGetUserByIDRequest from zitadel_client.models.user_service_get_user_by_id_response import UserServiceGetUserByIDResponse +from zitadel_client.models.user_service_human_mfa_init_skipped_request import UserServiceHumanMFAInitSkippedRequest from zitadel_client.models.user_service_human_mfa_init_skipped_response import UserServiceHumanMFAInitSkippedResponse +from zitadel_client.models.user_service_list_authentication_factors_request import UserServiceListAuthenticationFactorsRequest from zitadel_client.models.user_service_list_authentication_factors_response import UserServiceListAuthenticationFactorsResponse +from zitadel_client.models.user_service_list_authentication_method_types_request import UserServiceListAuthenticationMethodTypesRequest from zitadel_client.models.user_service_list_authentication_method_types_response import UserServiceListAuthenticationMethodTypesResponse from zitadel_client.models.user_service_list_idp_links_request import UserServiceListIDPLinksRequest from zitadel_client.models.user_service_list_idp_links_response import UserServiceListIDPLinksResponse +from zitadel_client.models.user_service_list_keys_request import UserServiceListKeysRequest +from zitadel_client.models.user_service_list_keys_response import UserServiceListKeysResponse +from zitadel_client.models.user_service_list_passkeys_request import UserServiceListPasskeysRequest from zitadel_client.models.user_service_list_passkeys_response import UserServiceListPasskeysResponse +from zitadel_client.models.user_service_list_personal_access_tokens_request import UserServiceListPersonalAccessTokensRequest +from zitadel_client.models.user_service_list_personal_access_tokens_response import UserServiceListPersonalAccessTokensResponse +from zitadel_client.models.user_service_list_user_metadata_request import UserServiceListUserMetadataRequest +from zitadel_client.models.user_service_list_user_metadata_response import UserServiceListUserMetadataResponse from zitadel_client.models.user_service_list_users_request import UserServiceListUsersRequest from zitadel_client.models.user_service_list_users_response import UserServiceListUsersResponse +from zitadel_client.models.user_service_lock_user_request import UserServiceLockUserRequest from zitadel_client.models.user_service_lock_user_response import UserServiceLockUserResponse from zitadel_client.models.user_service_password_reset_request import UserServicePasswordResetRequest from zitadel_client.models.user_service_password_reset_response import UserServicePasswordResetResponse +from zitadel_client.models.user_service_reactivate_user_request import UserServiceReactivateUserRequest from zitadel_client.models.user_service_reactivate_user_response import UserServiceReactivateUserResponse from zitadel_client.models.user_service_register_passkey_request import UserServiceRegisterPasskeyRequest from zitadel_client.models.user_service_register_passkey_response import UserServiceRegisterPasskeyResponse +from zitadel_client.models.user_service_register_totp_request import UserServiceRegisterTOTPRequest from zitadel_client.models.user_service_register_totp_response import UserServiceRegisterTOTPResponse from zitadel_client.models.user_service_register_u2_f_request import UserServiceRegisterU2FRequest from zitadel_client.models.user_service_register_u2_f_response import UserServiceRegisterU2FResponse +from zitadel_client.models.user_service_remove_idp_link_request import UserServiceRemoveIDPLinkRequest from zitadel_client.models.user_service_remove_idp_link_response import UserServiceRemoveIDPLinkResponse +from zitadel_client.models.user_service_remove_key_request import UserServiceRemoveKeyRequest +from zitadel_client.models.user_service_remove_key_response import UserServiceRemoveKeyResponse +from zitadel_client.models.user_service_remove_otp_email_request import UserServiceRemoveOTPEmailRequest from zitadel_client.models.user_service_remove_otp_email_response import UserServiceRemoveOTPEmailResponse +from zitadel_client.models.user_service_remove_otpsms_request import UserServiceRemoveOTPSMSRequest from zitadel_client.models.user_service_remove_otpsms_response import UserServiceRemoveOTPSMSResponse +from zitadel_client.models.user_service_remove_passkey_request import UserServiceRemovePasskeyRequest from zitadel_client.models.user_service_remove_passkey_response import UserServiceRemovePasskeyResponse +from zitadel_client.models.user_service_remove_personal_access_token_request import UserServiceRemovePersonalAccessTokenRequest +from zitadel_client.models.user_service_remove_personal_access_token_response import UserServiceRemovePersonalAccessTokenResponse +from zitadel_client.models.user_service_remove_phone_request import UserServiceRemovePhoneRequest from zitadel_client.models.user_service_remove_phone_response import UserServiceRemovePhoneResponse +from zitadel_client.models.user_service_remove_secret_request import UserServiceRemoveSecretRequest +from zitadel_client.models.user_service_remove_secret_response import UserServiceRemoveSecretResponse +from zitadel_client.models.user_service_remove_totp_request import UserServiceRemoveTOTPRequest from zitadel_client.models.user_service_remove_totp_response import UserServiceRemoveTOTPResponse +from zitadel_client.models.user_service_remove_u2_f_request import UserServiceRemoveU2FRequest from zitadel_client.models.user_service_remove_u2_f_response import UserServiceRemoveU2FResponse from zitadel_client.models.user_service_resend_email_code_request import UserServiceResendEmailCodeRequest from zitadel_client.models.user_service_resend_email_code_response import UserServiceResendEmailCodeResponse +from zitadel_client.models.user_service_resend_invite_code_request import UserServiceResendInviteCodeRequest from zitadel_client.models.user_service_resend_invite_code_response import UserServiceResendInviteCodeResponse from zitadel_client.models.user_service_resend_phone_code_request import UserServiceResendPhoneCodeRequest from zitadel_client.models.user_service_resend_phone_code_response import UserServiceResendPhoneCodeResponse @@ -71,11 +110,16 @@ from zitadel_client.models.user_service_set_password_response import UserServiceSetPasswordResponse from zitadel_client.models.user_service_set_phone_request import UserServiceSetPhoneRequest from zitadel_client.models.user_service_set_phone_response import UserServiceSetPhoneResponse +from zitadel_client.models.user_service_set_user_metadata_request import UserServiceSetUserMetadataRequest +from zitadel_client.models.user_service_set_user_metadata_response import UserServiceSetUserMetadataResponse from zitadel_client.models.user_service_start_identity_provider_intent_request import UserServiceStartIdentityProviderIntentRequest from zitadel_client.models.user_service_start_identity_provider_intent_response import UserServiceStartIdentityProviderIntentResponse +from zitadel_client.models.user_service_unlock_user_request import UserServiceUnlockUserRequest from zitadel_client.models.user_service_unlock_user_response import UserServiceUnlockUserResponse from zitadel_client.models.user_service_update_human_user_request import UserServiceUpdateHumanUserRequest from zitadel_client.models.user_service_update_human_user_response import UserServiceUpdateHumanUserResponse +from zitadel_client.models.user_service_update_user_request import UserServiceUpdateUserRequest +from zitadel_client.models.user_service_update_user_response import UserServiceUpdateUserResponse from zitadel_client.models.user_service_verify_email_request import UserServiceVerifyEmailRequest from zitadel_client.models.user_service_verify_email_response import UserServiceVerifyEmailResponse from zitadel_client.models.user_service_verify_invite_code_request import UserServiceVerifyInviteCodeRequest @@ -108,36 +152,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def user_service_add_human_user( - self, - user_service_add_human_user_request: UserServiceAddHumanUserRequest, - ) -> UserServiceAddHumanUserResponse: - """Create a new human user + def add_human_user( self, user_service_add_human_user_request: UserServiceAddHumanUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddHumanUserResponse: + """AddHumanUser - Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. + Create a new human user Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. :param user_service_add_human_user_request: (required) :type user_service_add_human_user_request: UserServiceAddHumanUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_add_human_user_serialize( + _param = self._add_human_user_serialize( user_service_add_human_user_request=user_service_add_human_user_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserServiceAddHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddHumanUserResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -145,7 +202,7 @@ def user_service_add_human_user( response_types_map=_response_types_map, ).data - def __user_service_add_human_user_serialize( + def _add_human_user_serialize( self, user_service_add_human_user_request, _request_auth, @@ -206,7 +263,7 @@ def __user_service_add_human_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/human', + resource_path='/zitadel.user.v2.UserService/AddHumanUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -223,40 +280,49 @@ def __user_service_add_human_user_serialize( @validate_call - def user_service_add_idp_link( - self, - user_id: StrictStr, - user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, - ) -> UserServiceAddIDPLinkResponse: - """Add link to an identity provider to an user + def add_idp_link( self, user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddIDPLinkResponse: + """AddIDPLink - Add link to an identity provider to an user.. + Add link to an identity provider to an user Add link to an identity provider to an user.. - :param user_id: (required) - :type user_id: str :param user_service_add_idp_link_request: (required) :type user_service_add_idp_link_request: UserServiceAddIDPLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_add_idp_link_serialize( - user_id=user_id, + _param = self._add_idp_link_serialize( user_service_add_idp_link_request=user_service_add_idp_link_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceAddIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -264,9 +330,8 @@ def user_service_add_idp_link( response_types_map=_response_types_map, ).data - def __user_service_add_idp_link_serialize( + def _add_idp_link_serialize( self, - user_id, user_service_add_idp_link_request, _request_auth, _content_type, @@ -289,8 +354,6 @@ def __user_service_add_idp_link_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -328,7 +391,7 @@ def __user_service_add_idp_link_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/links', + resource_path='/zitadel.user.v2.UserService/AddIDPLink', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -345,36 +408,49 @@ def __user_service_add_idp_link_serialize( @validate_call - def user_service_add_otp_email( - self, - user_id: StrictStr, - ) -> UserServiceAddOTPEmailResponse: - """Add OTP Email for a user - - Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. - - :param user_id: (required) - :type user_id: str + def add_key( self, user_service_add_key_request: UserServiceAddKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddKeyResponse: + """AddKey + + Add a Key Add a keys that can be used to securely authenticate at the Zitadel APIs using JWT profile authentication using short-lived tokens. Make sure you store the returned key safely, as you won't be able to read it from the Zitadel API anymore. Only users of type machine can have keys. Required permission: - user.write + + :param user_service_add_key_request: (required) + :type user_service_add_key_request: UserServiceAddKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_add_otp_email_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._add_key_serialize( + user_service_add_key_request=user_service_add_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddKeyResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -382,9 +458,9 @@ def user_service_add_otp_email( response_types_map=_response_types_map, ).data - def __user_service_add_otp_email_serialize( + def _add_key_serialize( self, - user_id, + user_service_add_key_request, _request_auth, _content_type, _headers, @@ -406,12 +482,12 @@ def __user_service_add_otp_email_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_add_key_request is not None: + _body_params = user_service_add_key_request # set the HTTP header `Accept` @@ -422,6 +498,19 @@ def __user_service_add_otp_email_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -430,7 +519,7 @@ def __user_service_add_otp_email_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/otp_email', + resource_path='/zitadel.user.v2.UserService/AddKey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -447,36 +536,49 @@ def __user_service_add_otp_email_serialize( @validate_call - def user_service_add_otpsms( - self, - user_id: StrictStr, - ) -> UserServiceAddOTPSMSResponse: - """Add OTP SMS for a user - - Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. - - :param user_id: (required) - :type user_id: str + def add_otp_email( self, user_service_add_otp_email_request: UserServiceAddOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddOTPEmailResponse: + """AddOTPEmail + + Add OTP Email for a user Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. + + :param user_service_add_otp_email_request: (required) + :type user_service_add_otp_email_request: UserServiceAddOTPEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_add_otpsms_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._add_otp_email_serialize( + user_service_add_otp_email_request=user_service_add_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddOTPEmailResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -484,9 +586,9 @@ def user_service_add_otpsms( response_types_map=_response_types_map, ).data - def __user_service_add_otpsms_serialize( + def _add_otp_email_serialize( self, - user_id, + user_service_add_otp_email_request, _request_auth, _content_type, _headers, @@ -508,12 +610,12 @@ def __user_service_add_otpsms_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_add_otp_email_request is not None: + _body_params = user_service_add_otp_email_request # set the HTTP header `Accept` @@ -524,6 +626,19 @@ def __user_service_add_otpsms_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -532,7 +647,7 @@ def __user_service_add_otpsms_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/otp_sms', + resource_path='/zitadel.user.v2.UserService/AddOTPEmail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -549,40 +664,49 @@ def __user_service_add_otpsms_serialize( @validate_call - def user_service_create_invite_code( - self, - user_id: StrictStr, - user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, - ) -> UserServiceCreateInviteCodeResponse: - """Create an invite code for a user - - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. - - :param user_id: (required) - :type user_id: str - :param user_service_create_invite_code_request: (required) - :type user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest + def add_otpsms( self, user_service_add_otpsms_request: UserServiceAddOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddOTPSMSResponse: + """AddOTPSMS + + Add OTP SMS for a user Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. + + :param user_service_add_otpsms_request: (required) + :type user_service_add_otpsms_request: UserServiceAddOTPSMSRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_create_invite_code_serialize( - user_id=user_id, - user_service_create_invite_code_request=user_service_create_invite_code_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._add_otpsms_serialize( + user_service_add_otpsms_request=user_service_add_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreateInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddOTPSMSResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -590,10 +714,9 @@ def user_service_create_invite_code( response_types_map=_response_types_map, ).data - def __user_service_create_invite_code_serialize( + def _add_otpsms_serialize( self, - user_id, - user_service_create_invite_code_request, + user_service_add_otpsms_request, _request_auth, _content_type, _headers, @@ -615,14 +738,12 @@ def __user_service_create_invite_code_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_create_invite_code_request is not None: - _body_params = user_service_create_invite_code_request + if user_service_add_otpsms_request is not None: + _body_params = user_service_add_otpsms_request # set the HTTP header `Accept` @@ -654,7 +775,7 @@ def __user_service_create_invite_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/invite_code', + resource_path='/zitadel.user.v2.UserService/AddOTPSMS', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -671,40 +792,49 @@ def __user_service_create_invite_code_serialize( @validate_call - def user_service_create_passkey_registration_link( - self, - user_id: StrictStr, - user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, - ) -> UserServiceCreatePasskeyRegistrationLinkResponse: - """Create a passkey registration link for a user - - Create a passkey registration link which includes a code and either return it or send it to the user.. - - :param user_id: (required) - :type user_id: str - :param user_service_create_passkey_registration_link_request: (required) - :type user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest + def add_personal_access_token( self, user_service_add_personal_access_token_request: UserServiceAddPersonalAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddPersonalAccessTokenResponse: + """AddPersonalAccessToken + + Add a Personal Access Token Personal access tokens (PAT) are the easiest way to authenticate to the Zitadel APIs. Make sure you store the returned PAT safely, as you won't be able to read it from the Zitadel API anymore. Only users of type machine can have personal access tokens. Required permission: - user.write + + :param user_service_add_personal_access_token_request: (required) + :type user_service_add_personal_access_token_request: UserServiceAddPersonalAccessTokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_create_passkey_registration_link_serialize( - user_id=user_id, - user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._add_personal_access_token_serialize( + user_service_add_personal_access_token_request=user_service_add_personal_access_token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreatePasskeyRegistrationLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddPersonalAccessTokenResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -712,10 +842,9 @@ def user_service_create_passkey_registration_link( response_types_map=_response_types_map, ).data - def __user_service_create_passkey_registration_link_serialize( + def _add_personal_access_token_serialize( self, - user_id, - user_service_create_passkey_registration_link_request, + user_service_add_personal_access_token_request, _request_auth, _content_type, _headers, @@ -737,14 +866,12 @@ def __user_service_create_passkey_registration_link_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_create_passkey_registration_link_request is not None: - _body_params = user_service_create_passkey_registration_link_request + if user_service_add_personal_access_token_request is not None: + _body_params = user_service_add_personal_access_token_request # set the HTTP header `Accept` @@ -776,7 +903,7 @@ def __user_service_create_passkey_registration_link_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys/registration_link', + resource_path='/zitadel.user.v2.UserService/AddPersonalAccessToken', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -793,36 +920,49 @@ def __user_service_create_passkey_registration_link_serialize( @validate_call - def user_service_deactivate_user( - self, - user_id: StrictStr, - ) -> UserServiceDeactivateUserResponse: - """Deactivate user - - The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. - - :param user_id: (required) - :type user_id: str + def add_secret( self, user_service_add_secret_request: UserServiceAddSecretRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceAddSecretResponse: + """AddSecret + + Add a Users Secret Generates a client secret for the user. The client id is the users username. If the user already has a secret, it is overwritten. Only users of type machine can have a secret. Required permission: - user.write + + :param user_service_add_secret_request: (required) + :type user_service_add_secret_request: UserServiceAddSecretRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_deactivate_user_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._add_secret_serialize( + user_service_add_secret_request=user_service_add_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceAddSecretResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -830,9 +970,9 @@ def user_service_deactivate_user( response_types_map=_response_types_map, ).data - def __user_service_deactivate_user_serialize( + def _add_secret_serialize( self, - user_id, + user_service_add_secret_request, _request_auth, _content_type, _headers, @@ -854,12 +994,12 @@ def __user_service_deactivate_user_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_add_secret_request is not None: + _body_params = user_service_add_secret_request # set the HTTP header `Accept` @@ -870,6 +1010,19 @@ def __user_service_deactivate_user_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -878,7 +1031,7 @@ def __user_service_deactivate_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/deactivate', + resource_path='/zitadel.user.v2.UserService/AddSecret', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -895,36 +1048,49 @@ def __user_service_deactivate_user_serialize( @validate_call - def user_service_delete_user( - self, - user_id: StrictStr, - ) -> UserServiceDeleteUserResponse: - """Delete user + def create_invite_code( self, user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceCreateInviteCodeResponse: + """CreateInviteCode - The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. + Create an invite code for a user Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. - :param user_id: (required) - :type user_id: str + :param user_service_create_invite_code_request: (required) + :type user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_delete_user_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._create_invite_code_serialize( + user_service_create_invite_code_request=user_service_create_invite_code_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeleteUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceCreateInviteCodeResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -932,9 +1098,9 @@ def user_service_delete_user( response_types_map=_response_types_map, ).data - def __user_service_delete_user_serialize( + def _create_invite_code_serialize( self, - user_id, + user_service_create_invite_code_request, _request_auth, _content_type, _headers, @@ -956,12 +1122,12 @@ def __user_service_delete_user_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_create_invite_code_request is not None: + _body_params = user_service_create_invite_code_request # set the HTTP header `Accept` @@ -972,6 +1138,19 @@ def __user_service_delete_user_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -979,8 +1158,8 @@ def __user_service_delete_user_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/CreateInviteCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -997,36 +1176,49 @@ def __user_service_delete_user_serialize( @validate_call - def user_service_get_user_by_id( - self, - user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], - ) -> UserServiceGetUserByIDResponse: - """User by ID + def create_passkey_registration_link( self, user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceCreatePasskeyRegistrationLinkResponse: + """CreatePasskeyRegistrationLink - Returns the full user object (human or machine) including the profile, email, etc.. + Create a passkey registration link for a user Create a passkey registration link which includes a code and either return it or send it to the user.. - :param user_id: User ID of the user you like to get. (required) - :type user_id: str + :param user_service_create_passkey_registration_link_request: (required) + :type user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_get_user_by_id_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._create_passkey_registration_link_serialize( + user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceGetUserByIDResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceCreatePasskeyRegistrationLinkResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1034,9 +1226,9 @@ def user_service_get_user_by_id( response_types_map=_response_types_map, ).data - def __user_service_get_user_by_id_serialize( + def _create_passkey_registration_link_serialize( self, - user_id, + user_service_create_passkey_registration_link_request, _request_auth, _content_type, _headers, @@ -1058,12 +1250,12 @@ def __user_service_get_user_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_create_passkey_registration_link_request is not None: + _body_params = user_service_create_passkey_registration_link_request # set the HTTP header `Accept` @@ -1074,6 +1266,19 @@ def __user_service_get_user_by_id_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1081,8 +1286,8 @@ def __user_service_get_user_by_id_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/users/{userId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/CreatePasskeyRegistrationLink', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1099,36 +1304,49 @@ def __user_service_get_user_by_id_serialize( @validate_call - def user_service_human_mfa_init_skipped( - self, - user_id: StrictStr, - ) -> UserServiceHumanMFAInitSkippedResponse: - """MFA Init Skipped - - Update the last time the user has skipped MFA initialization. The server timestamp is used. - - :param user_id: (required) - :type user_id: str + def create_user( self, user_service_create_user_request: UserServiceCreateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceCreateUserResponse: + """CreateUser + + Create a User Create a new human or machine user in the specified organization. Required permission: - user.write + + :param user_service_create_user_request: (required) + :type user_service_create_user_request: UserServiceCreateUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_human_mfa_init_skipped_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._create_user_serialize( + user_service_create_user_request=user_service_create_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceHumanMFAInitSkippedResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceCreateUserResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1136,9 +1354,9 @@ def user_service_human_mfa_init_skipped( response_types_map=_response_types_map, ).data - def __user_service_human_mfa_init_skipped_serialize( + def _create_user_serialize( self, - user_id, + user_service_create_user_request, _request_auth, _content_type, _headers, @@ -1160,12 +1378,12 @@ def __user_service_human_mfa_init_skipped_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_create_user_request is not None: + _body_params = user_service_create_user_request # set the HTTP header `Accept` @@ -1176,6 +1394,19 @@ def __user_service_human_mfa_init_skipped_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1184,7 +1415,7 @@ def __user_service_human_mfa_init_skipped_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/mfa_init_skipped', + resource_path='/zitadel.user.v2.UserService/CreateUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1201,43 +1432,49 @@ def __user_service_human_mfa_init_skipped_serialize( @validate_call - def user_service_list_authentication_factors( - self, - user_id: StrictStr, - auth_factors: Annotated[Optional[List[StrictStr]], Field(description="Specify the Auth Factors you are interested in")] = None, - states: Annotated[Optional[List[StrictStr]], Field(description="Specify the state of the Auth Factors")] = None, - ) -> UserServiceListAuthenticationFactorsResponse: - """user_service_list_authentication_factors - - - :param user_id: (required) - :type user_id: str - :param auth_factors: Specify the Auth Factors you are interested in - :type auth_factors: List[str] - :param states: Specify the state of the Auth Factors - :type states: List[str] + def deactivate_user( self, user_service_deactivate_user_request: UserServiceDeactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceDeactivateUserResponse: + """DeactivateUser + + Deactivate user The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. + + :param user_service_deactivate_user_request: (required) + :type user_service_deactivate_user_request: UserServiceDeactivateUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_list_authentication_factors_serialize( - user_id=user_id, - auth_factors=auth_factors, - states=states, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._deactivate_user_serialize( + user_service_deactivate_user_request=user_service_deactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationFactorsResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceDeactivateUserResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1245,11 +1482,9 @@ def user_service_list_authentication_factors( response_types_map=_response_types_map, ).data - def __user_service_list_authentication_factors_serialize( + def _deactivate_user_serialize( self, - user_id, - auth_factors, - states, + user_service_deactivate_user_request, _request_auth, _content_type, _headers, @@ -1259,8 +1494,6 @@ def __user_service_list_authentication_factors_serialize( _host = None _collection_formats: Dict[str, str] = { - 'authFactors': 'csv', - 'states': 'csv', } _path_params: Dict[str, str] = {} @@ -1273,20 +1506,12 @@ def __user_service_list_authentication_factors_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters - if auth_factors is not None: - - _query_params.append(('authFactors', auth_factors)) - - if states is not None: - - _query_params.append(('states', states)) - # process the header parameters # process the form parameters # process the body parameter + if user_service_deactivate_user_request is not None: + _body_params = user_service_deactivate_user_request # set the HTTP header `Accept` @@ -1297,6 +1522,19 @@ def __user_service_list_authentication_factors_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1305,7 +1543,7 @@ def __user_service_list_authentication_factors_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/authentication_factors/_search', + resource_path='/zitadel.user.v2.UserService/DeactivateUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1322,44 +1560,49 @@ def __user_service_list_authentication_factors_serialize( @validate_call - def user_service_list_authentication_method_types( - self, - user_id: StrictStr, - domain_query_include_without_domain: Annotated[Optional[StrictBool], Field(description="List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI.")] = None, - domain_query_domain: Annotated[Optional[StrictStr], Field(description="List only auth methods with specific domain.")] = None, - ) -> UserServiceListAuthenticationMethodTypesResponse: - """List all possible authentication methods of a user - - List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. - - :param user_id: (required) - :type user_id: str - :param domain_query_include_without_domain: List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. - :type domain_query_include_without_domain: bool - :param domain_query_domain: List only auth methods with specific domain. - :type domain_query_domain: str + def delete_user( self, user_service_delete_user_request: UserServiceDeleteUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceDeleteUserResponse: + """DeleteUser + + Delete user The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. + + :param user_service_delete_user_request: (required) + :type user_service_delete_user_request: UserServiceDeleteUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_list_authentication_method_types_serialize( - user_id=user_id, - domain_query_include_without_domain=domain_query_include_without_domain, - domain_query_domain=domain_query_domain, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._delete_user_serialize( + user_service_delete_user_request=user_service_delete_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationMethodTypesResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceDeleteUserResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1367,11 +1610,9 @@ def user_service_list_authentication_method_types( response_types_map=_response_types_map, ).data - def __user_service_list_authentication_method_types_serialize( + def _delete_user_serialize( self, - user_id, - domain_query_include_without_domain, - domain_query_domain, + user_service_delete_user_request, _request_auth, _content_type, _headers, @@ -1393,20 +1634,12 @@ def __user_service_list_authentication_method_types_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters - if domain_query_include_without_domain is not None: - - _query_params.append(('domainQuery.includeWithoutDomain', domain_query_include_without_domain)) - - if domain_query_domain is not None: - - _query_params.append(('domainQuery.domain', domain_query_domain)) - # process the header parameters # process the form parameters # process the body parameter + if user_service_delete_user_request is not None: + _body_params = user_service_delete_user_request # set the HTTP header `Accept` @@ -1417,6 +1650,19 @@ def __user_service_list_authentication_method_types_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1424,8 +1670,8 @@ def __user_service_list_authentication_method_types_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/users/{userId}/authentication_methods', + method='POST', + resource_path='/zitadel.user.v2.UserService/DeleteUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1442,40 +1688,49 @@ def __user_service_list_authentication_method_types_serialize( @validate_call - def user_service_list_idp_links( - self, - user_id: StrictStr, - user_service_list_idp_links_request: UserServiceListIDPLinksRequest, - ) -> UserServiceListIDPLinksResponse: - """List links to an identity provider of an user - - List links to an identity provider of an user. - - :param user_id: (required) - :type user_id: str - :param user_service_list_idp_links_request: (required) - :type user_service_list_idp_links_request: UserServiceListIDPLinksRequest + def delete_user_metadata( self, user_service_delete_user_metadata_request: UserServiceDeleteUserMetadataRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceDeleteUserMetadataResponse: + """DeleteUserMetadata + + Delete User Metadata Delete metadata objects from an user with a specific key. Required permission: - `user.write` + + :param user_service_delete_user_metadata_request: (required) + :type user_service_delete_user_metadata_request: UserServiceDeleteUserMetadataRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_list_idp_links_serialize( - user_id=user_id, - user_service_list_idp_links_request=user_service_list_idp_links_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._delete_user_metadata_serialize( + user_service_delete_user_metadata_request=user_service_delete_user_metadata_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListIDPLinksResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceDeleteUserMetadataResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1483,10 +1738,9 @@ def user_service_list_idp_links( response_types_map=_response_types_map, ).data - def __user_service_list_idp_links_serialize( + def _delete_user_metadata_serialize( self, - user_id, - user_service_list_idp_links_request, + user_service_delete_user_metadata_request, _request_auth, _content_type, _headers, @@ -1508,14 +1762,12 @@ def __user_service_list_idp_links_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_list_idp_links_request is not None: - _body_params = user_service_list_idp_links_request + if user_service_delete_user_metadata_request is not None: + _body_params = user_service_delete_user_metadata_request # set the HTTP header `Accept` @@ -1547,7 +1799,7 @@ def __user_service_list_idp_links_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/links/_search', + resource_path='/zitadel.user.v2.UserService/DeleteUserMetadata', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1564,36 +1816,49 @@ def __user_service_list_idp_links_serialize( @validate_call - def user_service_list_passkeys( - self, - user_id: StrictStr, - ) -> UserServiceListPasskeysResponse: - """List passkeys of an user - - List passkeys of an user - - :param user_id: (required) - :type user_id: str + def get_user_by_id( self, user_service_get_user_by_id_request: UserServiceGetUserByIDRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceGetUserByIDResponse: + """GetUserByID + + User by ID Returns the full user object (human or machine) including the profile, email, etc.. + + :param user_service_get_user_by_id_request: (required) + :type user_service_get_user_by_id_request: UserServiceGetUserByIDRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_list_passkeys_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._get_user_by_id_serialize( + user_service_get_user_by_id_request=user_service_get_user_by_id_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListPasskeysResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceGetUserByIDResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1601,9 +1866,9 @@ def user_service_list_passkeys( response_types_map=_response_types_map, ).data - def __user_service_list_passkeys_serialize( + def _get_user_by_id_serialize( self, - user_id, + user_service_get_user_by_id_request, _request_auth, _content_type, _headers, @@ -1625,12 +1890,12 @@ def __user_service_list_passkeys_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_get_user_by_id_request is not None: + _body_params = user_service_get_user_by_id_request # set the HTTP header `Accept` @@ -1641,6 +1906,19 @@ def __user_service_list_passkeys_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1649,7 +1927,7 @@ def __user_service_list_passkeys_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys/_search', + resource_path='/zitadel.user.v2.UserService/GetUserByID', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1666,37 +1944,49 @@ def __user_service_list_passkeys_serialize( @validate_call - def user_service_list_users( - self, - user_service_list_users_request: UserServiceListUsersRequest, - ) -> UserServiceListUsersResponse: - """Search Users - - Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. - - :param user_service_list_users_request: (required) - :type user_service_list_users_request: UserServiceListUsersRequest + def human_mfa_init_skipped( self, user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceHumanMFAInitSkippedResponse: + """HumanMFAInitSkipped + + MFA Init Skipped Update the last time the user has skipped MFA initialization. The server timestamp is used. + + :param user_service_human_mfa_init_skipped_request: (required) + :type user_service_human_mfa_init_skipped_request: UserServiceHumanMFAInitSkippedRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_list_users_serialize( - user_service_list_users_request=user_service_list_users_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._human_mfa_init_skipped_serialize( + user_service_human_mfa_init_skipped_request=user_service_human_mfa_init_skipped_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListUsersResponse", - '400': "UserServiceRpcStatus", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceHumanMFAInitSkippedResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1704,9 +1994,9 @@ def user_service_list_users( response_types_map=_response_types_map, ).data - def __user_service_list_users_serialize( + def _human_mfa_init_skipped_serialize( self, - user_service_list_users_request, + user_service_human_mfa_init_skipped_request, _request_auth, _content_type, _headers, @@ -1732,8 +2022,8 @@ def __user_service_list_users_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_service_list_users_request is not None: - _body_params = user_service_list_users_request + if user_service_human_mfa_init_skipped_request is not None: + _body_params = user_service_human_mfa_init_skipped_request # set the HTTP header `Accept` @@ -1765,7 +2055,7 @@ def __user_service_list_users_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users', + resource_path='/zitadel.user.v2.UserService/HumanMFAInitSkipped', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1782,36 +2072,48 @@ def __user_service_list_users_serialize( @validate_call - def user_service_lock_user( - self, - user_id: StrictStr, - ) -> UserServiceLockUserResponse: - """Lock user - - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. - - :param user_id: (required) - :type user_id: str + def list_authentication_factors( self, user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListAuthenticationFactorsResponse: + """ListAuthenticationFactors + + + :param user_service_list_authentication_factors_request: (required) + :type user_service_list_authentication_factors_request: UserServiceListAuthenticationFactorsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_lock_user_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_authentication_factors_serialize( + user_service_list_authentication_factors_request=user_service_list_authentication_factors_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceLockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListAuthenticationFactorsResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1819,9 +2121,9 @@ def user_service_lock_user( response_types_map=_response_types_map, ).data - def __user_service_lock_user_serialize( + def _list_authentication_factors_serialize( self, - user_id, + user_service_list_authentication_factors_request, _request_auth, _content_type, _headers, @@ -1843,12 +2145,12 @@ def __user_service_lock_user_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_list_authentication_factors_request is not None: + _body_params = user_service_list_authentication_factors_request # set the HTTP header `Accept` @@ -1859,6 +2161,19 @@ def __user_service_lock_user_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1867,7 +2182,7 @@ def __user_service_lock_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/lock', + resource_path='/zitadel.user.v2.UserService/ListAuthenticationFactors', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1884,40 +2199,49 @@ def __user_service_lock_user_serialize( @validate_call - def user_service_password_reset( - self, - user_id: StrictStr, - user_service_password_reset_request: UserServicePasswordResetRequest, - ) -> UserServicePasswordResetResponse: - """Request a code to reset a password - - Request a code to reset a password.. - - :param user_id: (required) - :type user_id: str - :param user_service_password_reset_request: (required) - :type user_service_password_reset_request: UserServicePasswordResetRequest + def list_authentication_method_types( self, user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListAuthenticationMethodTypesResponse: + """ListAuthenticationMethodTypes + + List all possible authentication methods of a user List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. + + :param user_service_list_authentication_method_types_request: (required) + :type user_service_list_authentication_method_types_request: UserServiceListAuthenticationMethodTypesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_password_reset_serialize( - user_id=user_id, - user_service_password_reset_request=user_service_password_reset_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_authentication_method_types_serialize( + user_service_list_authentication_method_types_request=user_service_list_authentication_method_types_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServicePasswordResetResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListAuthenticationMethodTypesResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1925,10 +2249,9 @@ def user_service_password_reset( response_types_map=_response_types_map, ).data - def __user_service_password_reset_serialize( + def _list_authentication_method_types_serialize( self, - user_id, - user_service_password_reset_request, + user_service_list_authentication_method_types_request, _request_auth, _content_type, _headers, @@ -1950,14 +2273,12 @@ def __user_service_password_reset_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_password_reset_request is not None: - _body_params = user_service_password_reset_request + if user_service_list_authentication_method_types_request is not None: + _body_params = user_service_list_authentication_method_types_request # set the HTTP header `Accept` @@ -1989,7 +2310,7 @@ def __user_service_password_reset_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/password_reset', + resource_path='/zitadel.user.v2.UserService/ListAuthenticationMethodTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2006,36 +2327,49 @@ def __user_service_password_reset_serialize( @validate_call - def user_service_reactivate_user( - self, - user_id: StrictStr, - ) -> UserServiceReactivateUserResponse: - """Reactivate user + def list_idp_links( self, user_service_list_idp_links_request: UserServiceListIDPLinksRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListIDPLinksResponse: + """ListIDPLinks - Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. + List links to an identity provider of an user List links to an identity provider of an user. - :param user_id: (required) - :type user_id: str + :param user_service_list_idp_links_request: (required) + :type user_service_list_idp_links_request: UserServiceListIDPLinksRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_reactivate_user_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_idp_links_serialize( + user_service_list_idp_links_request=user_service_list_idp_links_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceReactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListIDPLinksResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2043,9 +2377,9 @@ def user_service_reactivate_user( response_types_map=_response_types_map, ).data - def __user_service_reactivate_user_serialize( + def _list_idp_links_serialize( self, - user_id, + user_service_list_idp_links_request, _request_auth, _content_type, _headers, @@ -2067,12 +2401,12 @@ def __user_service_reactivate_user_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_list_idp_links_request is not None: + _body_params = user_service_list_idp_links_request # set the HTTP header `Accept` @@ -2083,15 +2417,28 @@ def __user_service_reactivate_user_serialize( ] ) - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/reactivate', + resource_path='/zitadel.user.v2.UserService/ListIDPLinks', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2108,40 +2455,49 @@ def __user_service_reactivate_user_serialize( @validate_call - def user_service_register_passkey( - self, - user_id: StrictStr, - user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, - ) -> UserServiceRegisterPasskeyResponse: - """Start the registration of passkey for a user - - Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_passkey_request: (required) - :type user_service_register_passkey_request: UserServiceRegisterPasskeyRequest + def list_keys( self, user_service_list_keys_request: UserServiceListKeysRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListKeysResponse: + """ListKeys + + Search Keys List all matching keys. By default all keys of the instance on which the caller has permission to read the owning users are returned. Make sure to include a limit and sorting for pagination. Required permission: - user.read + + :param user_service_list_keys_request: (required) + :type user_service_list_keys_request: UserServiceListKeysRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_register_passkey_serialize( - user_id=user_id, - user_service_register_passkey_request=user_service_register_passkey_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_keys_serialize( + user_service_list_keys_request=user_service_list_keys_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterPasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListKeysResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2149,10 +2505,9 @@ def user_service_register_passkey( response_types_map=_response_types_map, ).data - def __user_service_register_passkey_serialize( + def _list_keys_serialize( self, - user_id, - user_service_register_passkey_request, + user_service_list_keys_request, _request_auth, _content_type, _headers, @@ -2174,14 +2529,12 @@ def __user_service_register_passkey_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_register_passkey_request is not None: - _body_params = user_service_register_passkey_request + if user_service_list_keys_request is not None: + _body_params = user_service_list_keys_request # set the HTTP header `Accept` @@ -2213,7 +2566,7 @@ def __user_service_register_passkey_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys', + resource_path='/zitadel.user.v2.UserService/ListKeys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2230,36 +2583,49 @@ def __user_service_register_passkey_serialize( @validate_call - def user_service_register_totp( - self, - user_id: StrictStr, - ) -> UserServiceRegisterTOTPResponse: - """Start the registration of a TOTP generator for a user - - Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. - - :param user_id: (required) - :type user_id: str + def list_passkeys( self, user_service_list_passkeys_request: UserServiceListPasskeysRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListPasskeysResponse: + """ListPasskeys + + List passkeys of an user List passkeys of an user + + :param user_service_list_passkeys_request: (required) + :type user_service_list_passkeys_request: UserServiceListPasskeysRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_register_totp_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_passkeys_serialize( + user_service_list_passkeys_request=user_service_list_passkeys_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListPasskeysResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2267,9 +2633,9 @@ def user_service_register_totp( response_types_map=_response_types_map, ).data - def __user_service_register_totp_serialize( + def _list_passkeys_serialize( self, - user_id, + user_service_list_passkeys_request, _request_auth, _content_type, _headers, @@ -2291,12 +2657,12 @@ def __user_service_register_totp_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_list_passkeys_request is not None: + _body_params = user_service_list_passkeys_request # set the HTTP header `Accept` @@ -2307,6 +2673,19 @@ def __user_service_register_totp_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2315,7 +2694,7 @@ def __user_service_register_totp_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/totp', + resource_path='/zitadel.user.v2.UserService/ListPasskeys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2332,40 +2711,49 @@ def __user_service_register_totp_serialize( @validate_call - def user_service_register_u2_f( - self, - user_id: StrictStr, - user_service_register_u2_f_request: UserServiceRegisterU2FRequest, - ) -> UserServiceRegisterU2FResponse: - """Start the registration of a u2f token for a user - - Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_u2_f_request: (required) - :type user_service_register_u2_f_request: UserServiceRegisterU2FRequest + def list_personal_access_tokens( self, user_service_list_personal_access_tokens_request: UserServiceListPersonalAccessTokensRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListPersonalAccessTokensResponse: + """ListPersonalAccessTokens + + Search Personal Access Tokens List all personal access tokens. By default all personal access tokens of the instance on which the caller has permission to read the owning users are returned. Make sure to include a limit and sorting for pagination. Required permission: - user.read + + :param user_service_list_personal_access_tokens_request: (required) + :type user_service_list_personal_access_tokens_request: UserServiceListPersonalAccessTokensRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_register_u2_f_serialize( - user_id=user_id, - user_service_register_u2_f_request=user_service_register_u2_f_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_personal_access_tokens_serialize( + user_service_list_personal_access_tokens_request=user_service_list_personal_access_tokens_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListPersonalAccessTokensResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2373,10 +2761,9 @@ def user_service_register_u2_f( response_types_map=_response_types_map, ).data - def __user_service_register_u2_f_serialize( + def _list_personal_access_tokens_serialize( self, - user_id, - user_service_register_u2_f_request, + user_service_list_personal_access_tokens_request, _request_auth, _content_type, _headers, @@ -2398,14 +2785,12 @@ def __user_service_register_u2_f_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_register_u2_f_request is not None: - _body_params = user_service_register_u2_f_request + if user_service_list_personal_access_tokens_request is not None: + _body_params = user_service_list_personal_access_tokens_request # set the HTTP header `Accept` @@ -2437,7 +2822,7 @@ def __user_service_register_u2_f_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/u2f', + resource_path='/zitadel.user.v2.UserService/ListPersonalAccessTokens', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2454,44 +2839,49 @@ def __user_service_register_u2_f_serialize( @validate_call - def user_service_remove_idp_link( - self, - user_id: StrictStr, - idp_id: StrictStr, - linked_user_id: StrictStr, - ) -> UserServiceRemoveIDPLinkResponse: - """Remove link of an identity provider to an user - - Remove link of an identity provider to an user. - - :param user_id: (required) - :type user_id: str - :param idp_id: (required) - :type idp_id: str - :param linked_user_id: (required) - :type linked_user_id: str + def list_user_metadata( self, user_service_list_user_metadata_request: UserServiceListUserMetadataRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListUserMetadataResponse: + """ListUserMetadata + + List User Metadata List metadata of an user filtered by query. Required permission: - `user.read` + + :param user_service_list_user_metadata_request: (required) + :type user_service_list_user_metadata_request: UserServiceListUserMetadataRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_remove_idp_link_serialize( - user_id=user_id, - idp_id=idp_id, - linked_user_id=linked_user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_user_metadata_serialize( + user_service_list_user_metadata_request=user_service_list_user_metadata_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListUserMetadataResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2499,11 +2889,9 @@ def user_service_remove_idp_link( response_types_map=_response_types_map, ).data - def __user_service_remove_idp_link_serialize( + def _list_user_metadata_serialize( self, - user_id, - idp_id, - linked_user_id, + user_service_list_user_metadata_request, _request_auth, _content_type, _headers, @@ -2525,16 +2913,12 @@ def __user_service_remove_idp_link_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if idp_id is not None: - _path_params['idpId'] = idp_id - if linked_user_id is not None: - _path_params['linkedUserId'] = linked_user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_list_user_metadata_request is not None: + _body_params = user_service_list_user_metadata_request # set the HTTP header `Accept` @@ -2545,6 +2929,19 @@ def __user_service_remove_idp_link_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2552,8 +2949,8 @@ def __user_service_remove_idp_link_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/links/{idpId}/{linkedUserId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/ListUserMetadata', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2570,36 +2967,177 @@ def __user_service_remove_idp_link_serialize( @validate_call - def user_service_remove_otp_email( - self, - user_id: StrictStr, - ) -> UserServiceRemoveOTPEmailResponse: - """Remove One-Time Password (OTP) Email from a user + def list_users( self, user_service_list_users_request: UserServiceListUsersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceListUsersResponse: + """ListUsers - Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. + Search Users Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. - :param user_id: (required) - :type user_id: str + :param user_service_list_users_request: (required) + :type user_service_list_users_request: UserServiceListUsersRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_remove_otp_email_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_users_serialize( + user_service_list_users_request=user_service_list_users_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceListUsersResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _list_users_serialize( + self, + user_service_list_users_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { } + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_list_users_request is not None: + _body_params = user_service_list_users_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/ListUsers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def lock_user( self, user_service_lock_user_request: UserServiceLockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceLockUserResponse: + """LockUser + + Lock user The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. + + :param user_service_lock_user_request: (required) + :type user_service_lock_user_request: UserServiceLockUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._lock_user_serialize( + user_service_lock_user_request=user_service_lock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceLockUserResponse", + } response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2607,9 +3145,9 @@ def user_service_remove_otp_email( response_types_map=_response_types_map, ).data - def __user_service_remove_otp_email_serialize( + def _lock_user_serialize( self, - user_id, + user_service_lock_user_request, _request_auth, _content_type, _headers, @@ -2631,12 +3169,12 @@ def __user_service_remove_otp_email_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_lock_user_request is not None: + _body_params = user_service_lock_user_request # set the HTTP header `Accept` @@ -2647,6 +3185,19 @@ def __user_service_remove_otp_email_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2654,8 +3205,8 @@ def __user_service_remove_otp_email_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/otp_email', + method='POST', + resource_path='/zitadel.user.v2.UserService/LockUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2672,36 +3223,49 @@ def __user_service_remove_otp_email_serialize( @validate_call - def user_service_remove_otpsms( - self, - user_id: StrictStr, - ) -> UserServiceRemoveOTPSMSResponse: - """Remove One-Time Password (OTP) SMS from a user + def password_reset( self, user_service_password_reset_request: UserServicePasswordResetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServicePasswordResetResponse: + """PasswordReset - Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. + Request a code to reset a password Request a code to reset a password.. - :param user_id: (required) - :type user_id: str + :param user_service_password_reset_request: (required) + :type user_service_password_reset_request: UserServicePasswordResetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_remove_otpsms_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._password_reset_serialize( + user_service_password_reset_request=user_service_password_reset_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServicePasswordResetResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2709,9 +3273,9 @@ def user_service_remove_otpsms( response_types_map=_response_types_map, ).data - def __user_service_remove_otpsms_serialize( + def _password_reset_serialize( self, - user_id, + user_service_password_reset_request, _request_auth, _content_type, _headers, @@ -2733,12 +3297,12 @@ def __user_service_remove_otpsms_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_password_reset_request is not None: + _body_params = user_service_password_reset_request # set the HTTP header `Accept` @@ -2748,7 +3312,1556 @@ def __user_service_remove_otpsms_serialize( 'application/json' ] ) - + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/PasswordReset', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def reactivate_user( self, user_service_reactivate_user_request: UserServiceReactivateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceReactivateUserResponse: + """ReactivateUser + + Reactivate user Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. + + :param user_service_reactivate_user_request: (required) + :type user_service_reactivate_user_request: UserServiceReactivateUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._reactivate_user_serialize( + user_service_reactivate_user_request=user_service_reactivate_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceReactivateUserResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _reactivate_user_serialize( + self, + user_service_reactivate_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_reactivate_user_request is not None: + _body_params = user_service_reactivate_user_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/ReactivateUser', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def register_passkey( self, user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRegisterPasskeyResponse: + """RegisterPasskey + + Start the registration of passkey for a user Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. + + :param user_service_register_passkey_request: (required) + :type user_service_register_passkey_request: UserServiceRegisterPasskeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_passkey_serialize( + user_service_register_passkey_request=user_service_register_passkey_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRegisterPasskeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _register_passkey_serialize( + self, + user_service_register_passkey_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_register_passkey_request is not None: + _body_params = user_service_register_passkey_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RegisterPasskey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def register_totp( self, user_service_register_totp_request: UserServiceRegisterTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRegisterTOTPResponse: + """RegisterTOTP + + Start the registration of a TOTP generator for a user Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. + + :param user_service_register_totp_request: (required) + :type user_service_register_totp_request: UserServiceRegisterTOTPRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_totp_serialize( + user_service_register_totp_request=user_service_register_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRegisterTOTPResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _register_totp_serialize( + self, + user_service_register_totp_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_register_totp_request is not None: + _body_params = user_service_register_totp_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RegisterTOTP', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def register_u2_f( self, user_service_register_u2_f_request: UserServiceRegisterU2FRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRegisterU2FResponse: + """RegisterU2F + + Start the registration of a u2f token for a user Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. + + :param user_service_register_u2_f_request: (required) + :type user_service_register_u2_f_request: UserServiceRegisterU2FRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._register_u2_f_serialize( + user_service_register_u2_f_request=user_service_register_u2_f_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRegisterU2FResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _register_u2_f_serialize( + self, + user_service_register_u2_f_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_register_u2_f_request is not None: + _body_params = user_service_register_u2_f_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RegisterU2F', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_idp_link( self, user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveIDPLinkResponse: + """RemoveIDPLink + + Remove link of an identity provider to an user Remove link of an identity provider to an user. + + :param user_service_remove_idp_link_request: (required) + :type user_service_remove_idp_link_request: UserServiceRemoveIDPLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_idp_link_serialize( + user_service_remove_idp_link_request=user_service_remove_idp_link_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemoveIDPLinkResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_idp_link_serialize( + self, + user_service_remove_idp_link_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_idp_link_request is not None: + _body_params = user_service_remove_idp_link_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveIDPLink', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_key( self, user_service_remove_key_request: UserServiceRemoveKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveKeyResponse: + """RemoveKey + + Remove a Key Remove a machine users key by the given key ID and an optionally given user ID. Required permission: - user.write + + :param user_service_remove_key_request: (required) + :type user_service_remove_key_request: UserServiceRemoveKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_key_serialize( + user_service_remove_key_request=user_service_remove_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemoveKeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_key_serialize( + self, + user_service_remove_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_key_request is not None: + _body_params = user_service_remove_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveKey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_otp_email( self, user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveOTPEmailResponse: + """RemoveOTPEmail + + Remove One-Time Password (OTP) Email from a user Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. + + :param user_service_remove_otp_email_request: (required) + :type user_service_remove_otp_email_request: UserServiceRemoveOTPEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_otp_email_serialize( + user_service_remove_otp_email_request=user_service_remove_otp_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemoveOTPEmailResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_otp_email_serialize( + self, + user_service_remove_otp_email_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_otp_email_request is not None: + _body_params = user_service_remove_otp_email_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveOTPEmail', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_otpsms( self, user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveOTPSMSResponse: + """RemoveOTPSMS + + Remove One-Time Password (OTP) SMS from a user Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. + + :param user_service_remove_otpsms_request: (required) + :type user_service_remove_otpsms_request: UserServiceRemoveOTPSMSRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_otpsms_serialize( + user_service_remove_otpsms_request=user_service_remove_otpsms_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemoveOTPSMSResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_otpsms_serialize( + self, + user_service_remove_otpsms_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_otpsms_request is not None: + _body_params = user_service_remove_otpsms_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveOTPSMS', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_passkey( self, user_service_remove_passkey_request: UserServiceRemovePasskeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemovePasskeyResponse: + """RemovePasskey + + Remove passkey from a user Remove passkey from a user. + + :param user_service_remove_passkey_request: (required) + :type user_service_remove_passkey_request: UserServiceRemovePasskeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_passkey_serialize( + user_service_remove_passkey_request=user_service_remove_passkey_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemovePasskeyResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_passkey_serialize( + self, + user_service_remove_passkey_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_passkey_request is not None: + _body_params = user_service_remove_passkey_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RemovePasskey', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_personal_access_token( self, user_service_remove_personal_access_token_request: UserServiceRemovePersonalAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemovePersonalAccessTokenResponse: + """RemovePersonalAccessToken + + Remove a Personal Access Token Removes a machine users personal access token by the given token ID and an optionally given user ID. Required permission: - user.write + + :param user_service_remove_personal_access_token_request: (required) + :type user_service_remove_personal_access_token_request: UserServiceRemovePersonalAccessTokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_personal_access_token_serialize( + user_service_remove_personal_access_token_request=user_service_remove_personal_access_token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemovePersonalAccessTokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_personal_access_token_serialize( + self, + user_service_remove_personal_access_token_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_personal_access_token_request is not None: + _body_params = user_service_remove_personal_access_token_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RemovePersonalAccessToken', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_phone( self, user_service_remove_phone_request: UserServiceRemovePhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemovePhoneResponse: + """RemovePhone + + Delete the user phone Delete the phone number of a user. + + :param user_service_remove_phone_request: (required) + :type user_service_remove_phone_request: UserServiceRemovePhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_phone_serialize( + user_service_remove_phone_request=user_service_remove_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemovePhoneResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_phone_serialize( + self, + user_service_remove_phone_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_phone_request is not None: + _body_params = user_service_remove_phone_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/zitadel.user.v2.UserService/RemovePhone', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def remove_secret( self, user_service_remove_secret_request: UserServiceRemoveSecretRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveSecretResponse: + """RemoveSecret + + Remove a Users Secret Remove the current client ID and client secret from a machine user. Required permission: - user.write + + :param user_service_remove_secret_request: (required) + :type user_service_remove_secret_request: UserServiceRemoveSecretRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_secret_serialize( + user_service_remove_secret_request=user_service_remove_secret_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRemoveSecretResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + def _remove_secret_serialize( + self, + user_service_remove_secret_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_remove_secret_request is not None: + _body_params = user_service_remove_secret_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2756,8 +4869,8 @@ def __user_service_remove_otpsms_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/otp_sms', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveSecret', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2774,40 +4887,49 @@ def __user_service_remove_otpsms_serialize( @validate_call - def user_service_remove_passkey( - self, - user_id: StrictStr, - passkey_id: StrictStr, - ) -> UserServiceRemovePasskeyResponse: - """Remove passkey from a user - - Remove passkey from a user. - - :param user_id: (required) - :type user_id: str - :param passkey_id: (required) - :type passkey_id: str + def remove_totp( self, user_service_remove_totp_request: UserServiceRemoveTOTPRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveTOTPResponse: + """RemoveTOTP + + Remove TOTP generator from a user Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. + + :param user_service_remove_totp_request: (required) + :type user_service_remove_totp_request: UserServiceRemoveTOTPRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_remove_passkey_serialize( - user_id=user_id, - passkey_id=passkey_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._remove_totp_serialize( + user_service_remove_totp_request=user_service_remove_totp_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceRemoveTOTPResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2815,10 +4937,9 @@ def user_service_remove_passkey( response_types_map=_response_types_map, ).data - def __user_service_remove_passkey_serialize( + def _remove_totp_serialize( self, - user_id, - passkey_id, + user_service_remove_totp_request, _request_auth, _content_type, _headers, @@ -2840,14 +4961,12 @@ def __user_service_remove_passkey_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if passkey_id is not None: - _path_params['passkeyId'] = passkey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_remove_totp_request is not None: + _body_params = user_service_remove_totp_request # set the HTTP header `Accept` @@ -2858,6 +4977,19 @@ def __user_service_remove_passkey_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2865,8 +4997,8 @@ def __user_service_remove_passkey_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/passkeys/{passkeyId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveTOTP', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2883,36 +5015,49 @@ def __user_service_remove_passkey_serialize( @validate_call - def user_service_remove_phone( - self, - user_id: StrictStr, - ) -> UserServiceRemovePhoneResponse: - """Delete the user phone - - Delete the phone number of a user. - - :param user_id: (required) - :type user_id: str + def remove_u2_f( self, user_service_remove_u2_f_request: UserServiceRemoveU2FRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRemoveU2FResponse: + """RemoveU2F + + Remove u2f token from a user Remove u2f token from a user. + + :param user_service_remove_u2_f_request: (required) + :type user_service_remove_u2_f_request: UserServiceRemoveU2FRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_remove_phone_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._remove_u2_f_serialize( + user_service_remove_u2_f_request=user_service_remove_u2_f_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceRemoveU2FResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2920,9 +5065,9 @@ def user_service_remove_phone( response_types_map=_response_types_map, ).data - def __user_service_remove_phone_serialize( + def _remove_u2_f_serialize( self, - user_id, + user_service_remove_u2_f_request, _request_auth, _content_type, _headers, @@ -2944,12 +5089,12 @@ def __user_service_remove_phone_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_remove_u2_f_request is not None: + _body_params = user_service_remove_u2_f_request # set the HTTP header `Accept` @@ -2960,6 +5105,19 @@ def __user_service_remove_phone_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2967,8 +5125,8 @@ def __user_service_remove_phone_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/phone', + method='POST', + resource_path='/zitadel.user.v2.UserService/RemoveU2F', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2985,36 +5143,49 @@ def __user_service_remove_phone_serialize( @validate_call - def user_service_remove_totp( - self, - user_id: StrictStr, - ) -> UserServiceRemoveTOTPResponse: - """Remove TOTP generator from a user + def resend_email_code( self, user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceResendEmailCodeResponse: + """ResendEmailCode - Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. + Resend code to verify user email - :param user_id: (required) - :type user_id: str + :param user_service_resend_email_code_request: (required) + :type user_service_resend_email_code_request: UserServiceResendEmailCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_remove_totp_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._resend_email_code_serialize( + user_service_resend_email_code_request=user_service_resend_email_code_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceResendEmailCodeResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3022,9 +5193,9 @@ def user_service_remove_totp( response_types_map=_response_types_map, ).data - def __user_service_remove_totp_serialize( + def _resend_email_code_serialize( self, - user_id, + user_service_resend_email_code_request, _request_auth, _content_type, _headers, @@ -3046,12 +5217,12 @@ def __user_service_remove_totp_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_resend_email_code_request is not None: + _body_params = user_service_resend_email_code_request # set the HTTP header `Accept` @@ -3062,6 +5233,19 @@ def __user_service_remove_totp_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -3069,8 +5253,8 @@ def __user_service_remove_totp_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/totp', + method='POST', + resource_path='/zitadel.user.v2.UserService/ResendEmailCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3087,40 +5271,49 @@ def __user_service_remove_totp_serialize( @validate_call - def user_service_remove_u2_f( - self, - user_id: StrictStr, - u2f_id: StrictStr, - ) -> UserServiceRemoveU2FResponse: - """Remove u2f token from a user - - Remove u2f token from a user - - :param user_id: (required) - :type user_id: str - :param u2f_id: (required) - :type u2f_id: str + def resend_invite_code( self, user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceResendInviteCodeResponse: + """ResendInviteCode + + Resend an invite code for a user Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. + + :param user_service_resend_invite_code_request: (required) + :type user_service_resend_invite_code_request: UserServiceResendInviteCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_remove_u2_f_serialize( - user_id=user_id, - u2f_id=u2f_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._resend_invite_code_serialize( + user_service_resend_invite_code_request=user_service_resend_invite_code_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceResendInviteCodeResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3128,10 +5321,9 @@ def user_service_remove_u2_f( response_types_map=_response_types_map, ).data - def __user_service_remove_u2_f_serialize( + def _resend_invite_code_serialize( self, - user_id, - u2f_id, + user_service_resend_invite_code_request, _request_auth, _content_type, _headers, @@ -3153,14 +5345,12 @@ def __user_service_remove_u2_f_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if u2f_id is not None: - _path_params['u2fId'] = u2f_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_resend_invite_code_request is not None: + _body_params = user_service_resend_invite_code_request # set the HTTP header `Accept` @@ -3171,6 +5361,19 @@ def __user_service_remove_u2_f_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -3178,8 +5381,8 @@ def __user_service_remove_u2_f_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/u2f/{u2fId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/ResendInviteCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3196,40 +5399,49 @@ def __user_service_remove_u2_f_serialize( @validate_call - def user_service_resend_email_code( - self, - user_id: StrictStr, - user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, - ) -> UserServiceResendEmailCodeResponse: - """Resend code to verify user email + def resend_phone_code( self, user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceResendPhoneCodeResponse: + """ResendPhoneCode - Resend code to verify user email. + Resend code to verify user phone - :param user_id: (required) - :type user_id: str - :param user_service_resend_email_code_request: (required) - :type user_service_resend_email_code_request: UserServiceResendEmailCodeRequest + :param user_service_resend_phone_code_request: (required) + :type user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_resend_email_code_serialize( - user_id=user_id, - user_service_resend_email_code_request=user_service_resend_email_code_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._resend_phone_code_serialize( + user_service_resend_phone_code_request=user_service_resend_phone_code_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceResendPhoneCodeResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3237,10 +5449,9 @@ def user_service_resend_email_code( response_types_map=_response_types_map, ).data - def __user_service_resend_email_code_serialize( + def _resend_phone_code_serialize( self, - user_id, - user_service_resend_email_code_request, + user_service_resend_phone_code_request, _request_auth, _content_type, _headers, @@ -3262,14 +5473,12 @@ def __user_service_resend_email_code_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_resend_email_code_request is not None: - _body_params = user_service_resend_email_code_request + if user_service_resend_phone_code_request is not None: + _body_params = user_service_resend_phone_code_request # set the HTTP header `Accept` @@ -3301,7 +5510,7 @@ def __user_service_resend_email_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email/resend', + resource_path='/zitadel.user.v2.UserService/ResendPhoneCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3318,37 +5527,49 @@ def __user_service_resend_email_code_serialize( @validate_call - def user_service_resend_invite_code( - self, - user_id: StrictStr, - ) -> UserServiceResendInviteCodeResponse: - """(Deprecated) Resend an invite code for a user + def retrieve_identity_provider_intent( self, user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceRetrieveIdentityProviderIntentResponse: + """RetrieveIdentityProviderIntent - Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. + Retrieve the information returned by the identity provider Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. - :param user_id: (required) - :type user_id: str + :param user_service_retrieve_identity_provider_intent_request: (required) + :type user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("POST /v2/users/{userId}/invite_code/resend is deprecated.", DeprecationWarning) - _param = self.__user_service_resend_invite_code_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._retrieve_identity_provider_intent_serialize( + user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceRetrieveIdentityProviderIntentResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3356,9 +5577,9 @@ def user_service_resend_invite_code( response_types_map=_response_types_map, ).data - def __user_service_resend_invite_code_serialize( + def _retrieve_identity_provider_intent_serialize( self, - user_id, + user_service_retrieve_identity_provider_intent_request, _request_auth, _content_type, _headers, @@ -3380,12 +5601,12 @@ def __user_service_resend_invite_code_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_retrieve_identity_provider_intent_request is not None: + _body_params = user_service_retrieve_identity_provider_intent_request # set the HTTP header `Accept` @@ -3396,6 +5617,19 @@ def __user_service_resend_invite_code_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -3404,7 +5638,7 @@ def __user_service_resend_invite_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/invite_code/resend', + resource_path='/zitadel.user.v2.UserService/RetrieveIdentityProviderIntent', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3421,40 +5655,49 @@ def __user_service_resend_invite_code_serialize( @validate_call - def user_service_resend_phone_code( - self, - user_id: StrictStr, - user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, - ) -> UserServiceResendPhoneCodeResponse: - """Resend code to verify user phone + def send_email_code( self, user_service_send_email_code_request: UserServiceSendEmailCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSendEmailCodeResponse: + """SendEmailCode - Resend code to verify user phone. + Send code to verify user email - :param user_id: (required) - :type user_id: str - :param user_service_resend_phone_code_request: (required) - :type user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest + :param user_service_send_email_code_request: (required) + :type user_service_send_email_code_request: UserServiceSendEmailCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_resend_phone_code_serialize( - user_id=user_id, - user_service_resend_phone_code_request=user_service_resend_phone_code_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._send_email_code_serialize( + user_service_send_email_code_request=user_service_send_email_code_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendPhoneCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceSendEmailCodeResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3462,10 +5705,9 @@ def user_service_resend_phone_code( response_types_map=_response_types_map, ).data - def __user_service_resend_phone_code_serialize( + def _send_email_code_serialize( self, - user_id, - user_service_resend_phone_code_request, + user_service_send_email_code_request, _request_auth, _content_type, _headers, @@ -3487,14 +5729,12 @@ def __user_service_resend_phone_code_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_resend_phone_code_request is not None: - _body_params = user_service_resend_phone_code_request + if user_service_send_email_code_request is not None: + _body_params = user_service_send_email_code_request # set the HTTP header `Accept` @@ -3526,7 +5766,7 @@ def __user_service_resend_phone_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/phone/resend', + resource_path='/zitadel.user.v2.UserService/SendEmailCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3543,40 +5783,49 @@ def __user_service_resend_phone_code_serialize( @validate_call - def user_service_retrieve_identity_provider_intent( - self, - idp_intent_id: Annotated[StrictStr, Field(description="ID of the idp intent, previously returned on the success response of the IDP callback")], - user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest, - ) -> UserServiceRetrieveIdentityProviderIntentResponse: - """Retrieve the information returned by the identity provider + def set_email( self, user_service_set_email_request: UserServiceSetEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSetEmailResponse: + """SetEmail - Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. + Change the user email Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. - :param idp_intent_id: ID of the idp intent, previously returned on the success response of the IDP callback (required) - :type idp_intent_id: str - :param user_service_retrieve_identity_provider_intent_request: (required) - :type user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest + :param user_service_set_email_request: (required) + :type user_service_set_email_request: UserServiceSetEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_retrieve_identity_provider_intent_serialize( - idp_intent_id=idp_intent_id, - user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._set_email_serialize( + user_service_set_email_request=user_service_set_email_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRetrieveIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceSetEmailResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3584,10 +5833,9 @@ def user_service_retrieve_identity_provider_intent( response_types_map=_response_types_map, ).data - def __user_service_retrieve_identity_provider_intent_serialize( + def _set_email_serialize( self, - idp_intent_id, - user_service_retrieve_identity_provider_intent_request, + user_service_set_email_request, _request_auth, _content_type, _headers, @@ -3609,14 +5857,12 @@ def __user_service_retrieve_identity_provider_intent_serialize( _body_params: Optional[bytes] = None # process the path parameters - if idp_intent_id is not None: - _path_params['idpIntentId'] = idp_intent_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_retrieve_identity_provider_intent_request is not None: - _body_params = user_service_retrieve_identity_provider_intent_request + if user_service_set_email_request is not None: + _body_params = user_service_set_email_request # set the HTTP header `Accept` @@ -3648,7 +5894,7 @@ def __user_service_retrieve_identity_provider_intent_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/idp_intents/{idpIntentId}', + resource_path='/zitadel.user.v2.UserService/SetEmail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3665,40 +5911,49 @@ def __user_service_retrieve_identity_provider_intent_serialize( @validate_call - def user_service_send_email_code( - self, - user_id: StrictStr, - user_service_send_email_code_request: UserServiceSendEmailCodeRequest, - ) -> UserServiceSendEmailCodeResponse: - """Send code to verify user email + def set_password( self, user_service_set_password_request: UserServiceSetPasswordRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSetPasswordResponse: + """SetPassword - Send code to verify user email. + Change password Change the password of a user with either a verification code or the current password.. - :param user_id: (required) - :type user_id: str - :param user_service_send_email_code_request: (required) - :type user_service_send_email_code_request: UserServiceSendEmailCodeRequest + :param user_service_set_password_request: (required) + :type user_service_set_password_request: UserServiceSetPasswordRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_send_email_code_serialize( - user_id=user_id, - user_service_send_email_code_request=user_service_send_email_code_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._set_password_serialize( + user_service_set_password_request=user_service_set_password_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceSetPasswordResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3706,10 +5961,9 @@ def user_service_send_email_code( response_types_map=_response_types_map, ).data - def __user_service_send_email_code_serialize( + def _set_password_serialize( self, - user_id, - user_service_send_email_code_request, + user_service_set_password_request, _request_auth, _content_type, _headers, @@ -3731,14 +5985,12 @@ def __user_service_send_email_code_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_send_email_code_request is not None: - _body_params = user_service_send_email_code_request + if user_service_set_password_request is not None: + _body_params = user_service_set_password_request # set the HTTP header `Accept` @@ -3770,7 +6022,7 @@ def __user_service_send_email_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email/send', + resource_path='/zitadel.user.v2.UserService/SetPassword', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3787,40 +6039,49 @@ def __user_service_send_email_code_serialize( @validate_call - def user_service_set_email( - self, - user_id: StrictStr, - user_service_set_email_request: UserServiceSetEmailRequest, - ) -> UserServiceSetEmailResponse: - """Change the user email + def set_phone( self, user_service_set_phone_request: UserServiceSetPhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSetPhoneResponse: + """SetPhone - Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. + Set the user phone Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. - :param user_id: (required) - :type user_id: str - :param user_service_set_email_request: (required) - :type user_service_set_email_request: UserServiceSetEmailRequest + :param user_service_set_phone_request: (required) + :type user_service_set_phone_request: UserServiceSetPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_set_email_serialize( - user_id=user_id, - user_service_set_email_request=user_service_set_email_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._set_phone_serialize( + user_service_set_phone_request=user_service_set_phone_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceSetPhoneResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3828,10 +6089,9 @@ def user_service_set_email( response_types_map=_response_types_map, ).data - def __user_service_set_email_serialize( + def _set_phone_serialize( self, - user_id, - user_service_set_email_request, + user_service_set_phone_request, _request_auth, _content_type, _headers, @@ -3853,14 +6113,12 @@ def __user_service_set_email_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_set_email_request is not None: - _body_params = user_service_set_email_request + if user_service_set_phone_request is not None: + _body_params = user_service_set_phone_request # set the HTTP header `Accept` @@ -3892,7 +6150,7 @@ def __user_service_set_email_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email', + resource_path='/zitadel.user.v2.UserService/SetPhone', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3909,40 +6167,49 @@ def __user_service_set_email_serialize( @validate_call - def user_service_set_password( - self, - user_id: StrictStr, - user_service_set_password_request: UserServiceSetPasswordRequest, - ) -> UserServiceSetPasswordResponse: - """Change password - - Change the password of a user with either a verification code or the current password.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_password_request: (required) - :type user_service_set_password_request: UserServiceSetPasswordRequest + def set_user_metadata( self, user_service_set_user_metadata_request: UserServiceSetUserMetadataRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceSetUserMetadataResponse: + """SetUserMetadata + + Set User Metadata Sets a list of key value pairs. Existing metadata entries with matching keys are overwritten. Existing metadata entries without matching keys are untouched. To remove metadata entries, use [DeleteUserMetadata](apis/resources/user_service_v2/user-service-delete-user-metadata.api.mdx). For HTTP requests, make sure the bytes array value is base64 encoded. Required permission: - `user.write` + + :param user_service_set_user_metadata_request: (required) + :type user_service_set_user_metadata_request: UserServiceSetUserMetadataRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_set_password_serialize( - user_id=user_id, - user_service_set_password_request=user_service_set_password_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._set_user_metadata_serialize( + user_service_set_user_metadata_request=user_service_set_user_metadata_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPasswordResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceSetUserMetadataResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3950,10 +6217,9 @@ def user_service_set_password( response_types_map=_response_types_map, ).data - def __user_service_set_password_serialize( + def _set_user_metadata_serialize( self, - user_id, - user_service_set_password_request, + user_service_set_user_metadata_request, _request_auth, _content_type, _headers, @@ -3975,14 +6241,12 @@ def __user_service_set_password_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_set_password_request is not None: - _body_params = user_service_set_password_request + if user_service_set_user_metadata_request is not None: + _body_params = user_service_set_user_metadata_request # set the HTTP header `Accept` @@ -4014,7 +6278,7 @@ def __user_service_set_password_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/password', + resource_path='/zitadel.user.v2.UserService/SetUserMetadata', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4031,40 +6295,49 @@ def __user_service_set_password_serialize( @validate_call - def user_service_set_phone( - self, - user_id: StrictStr, - user_service_set_phone_request: UserServiceSetPhoneRequest, - ) -> UserServiceSetPhoneResponse: - """Set the user phone + def start_identity_provider_intent( self, user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceStartIdentityProviderIntentResponse: + """StartIdentityProviderIntent - Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. + Start flow with an identity provider Start a flow with an identity provider, for external login, registration or linking.. - :param user_id: (required) - :type user_id: str - :param user_service_set_phone_request: (required) - :type user_service_set_phone_request: UserServiceSetPhoneRequest + :param user_service_start_identity_provider_intent_request: (required) + :type user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_set_phone_serialize( - user_id=user_id, - user_service_set_phone_request=user_service_set_phone_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._start_identity_provider_intent_serialize( + user_service_start_identity_provider_intent_request=user_service_start_identity_provider_intent_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceStartIdentityProviderIntentResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4072,10 +6345,9 @@ def user_service_set_phone( response_types_map=_response_types_map, ).data - def __user_service_set_phone_serialize( + def _start_identity_provider_intent_serialize( self, - user_id, - user_service_set_phone_request, + user_service_start_identity_provider_intent_request, _request_auth, _content_type, _headers, @@ -4097,14 +6369,12 @@ def __user_service_set_phone_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_set_phone_request is not None: - _body_params = user_service_set_phone_request + if user_service_start_identity_provider_intent_request is not None: + _body_params = user_service_start_identity_provider_intent_request # set the HTTP header `Accept` @@ -4136,7 +6406,7 @@ def __user_service_set_phone_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/phone', + resource_path='/zitadel.user.v2.UserService/StartIdentityProviderIntent', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4153,36 +6423,49 @@ def __user_service_set_phone_serialize( @validate_call - def user_service_start_identity_provider_intent( - self, - user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, - ) -> UserServiceStartIdentityProviderIntentResponse: - """Start flow with an identity provider - - Start a flow with an identity provider, for external login, registration or linking.. - - :param user_service_start_identity_provider_intent_request: (required) - :type user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest + def unlock_user( self, user_service_unlock_user_request: UserServiceUnlockUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceUnlockUserResponse: + """UnlockUser + + Unlock user The state of the user will be changed to 'active'. The user will be able to log in again. The endpoint returns an error if the user is not in the state 'locked'. + + :param user_service_unlock_user_request: (required) + :type user_service_unlock_user_request: UserServiceUnlockUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_start_identity_provider_intent_serialize( - user_service_start_identity_provider_intent_request=user_service_start_identity_provider_intent_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._unlock_user_serialize( + user_service_unlock_user_request=user_service_unlock_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceStartIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceUnlockUserResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4190,9 +6473,9 @@ def user_service_start_identity_provider_intent( response_types_map=_response_types_map, ).data - def __user_service_start_identity_provider_intent_serialize( + def _unlock_user_serialize( self, - user_service_start_identity_provider_intent_request, + user_service_unlock_user_request, _request_auth, _content_type, _headers, @@ -4218,8 +6501,8 @@ def __user_service_start_identity_provider_intent_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_service_start_identity_provider_intent_request is not None: - _body_params = user_service_start_identity_provider_intent_request + if user_service_unlock_user_request is not None: + _body_params = user_service_unlock_user_request # set the HTTP header `Accept` @@ -4251,7 +6534,7 @@ def __user_service_start_identity_provider_intent_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/idp_intents', + resource_path='/zitadel.user.v2.UserService/UnlockUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4268,36 +6551,49 @@ def __user_service_start_identity_provider_intent_serialize( @validate_call - def user_service_unlock_user( - self, - user_id: StrictStr, - ) -> UserServiceUnlockUserResponse: - """Unlock user + def update_human_user( self, user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceUpdateHumanUserResponse: + """UpdateHumanUser - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. + Update Human User Update all information from a user.. - :param user_id: (required) - :type user_id: str + :param user_service_update_human_user_request: (required) + :type user_service_update_human_user_request: UserServiceUpdateHumanUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_unlock_user_serialize( - user_id=user_id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._update_human_user_serialize( + user_service_update_human_user_request=user_service_update_human_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUnlockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceUpdateHumanUserResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4305,9 +6601,9 @@ def user_service_unlock_user( response_types_map=_response_types_map, ).data - def __user_service_unlock_user_serialize( + def _update_human_user_serialize( self, - user_id, + user_service_update_human_user_request, _request_auth, _content_type, _headers, @@ -4329,12 +6625,12 @@ def __user_service_unlock_user_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if user_service_update_human_user_request is not None: + _body_params = user_service_update_human_user_request # set the HTTP header `Accept` @@ -4345,6 +6641,19 @@ def __user_service_unlock_user_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -4353,7 +6662,7 @@ def __user_service_unlock_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/unlock', + resource_path='/zitadel.user.v2.UserService/UpdateHumanUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4370,40 +6679,49 @@ def __user_service_unlock_user_serialize( @validate_call - def user_service_update_human_user( - self, - user_id: StrictStr, - user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, - ) -> UserServiceUpdateHumanUserResponse: - """Update User - - Update all information from a user.. - - :param user_id: (required) - :type user_id: str - :param user_service_update_human_user_request: (required) - :type user_service_update_human_user_request: UserServiceUpdateHumanUserRequest + def update_user( self, user_service_update_user_request: UserServiceUpdateUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceUpdateUserResponse: + """UpdateUser + + Update a User Partially update an existing user. If you change the users email or phone, you can specify how the ownership should be verified. If you change the users password, you can specify if the password should be changed again on the users next login. Required permission: - user.write + + :param user_service_update_user_request: (required) + :type user_service_update_user_request: UserServiceUpdateUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_update_human_user_serialize( - user_id=user_id, - user_service_update_human_user_request=user_service_update_human_user_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._update_user_serialize( + user_service_update_user_request=user_service_update_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUpdateHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", + '200': "UserServiceUpdateUserResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4411,10 +6729,9 @@ def user_service_update_human_user( response_types_map=_response_types_map, ).data - def __user_service_update_human_user_serialize( + def _update_user_serialize( self, - user_id, - user_service_update_human_user_request, + user_service_update_user_request, _request_auth, _content_type, _headers, @@ -4436,14 +6753,12 @@ def __user_service_update_human_user_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_update_human_user_request is not None: - _body_params = user_service_update_human_user_request + if user_service_update_user_request is not None: + _body_params = user_service_update_user_request # set the HTTP header `Accept` @@ -4474,8 +6789,8 @@ def __user_service_update_human_user_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/users/human/{userId}', + method='POST', + resource_path='/zitadel.user.v2.UserService/UpdateUser', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4492,40 +6807,49 @@ def __user_service_update_human_user_serialize( @validate_call - def user_service_verify_email( - self, - user_id: StrictStr, - user_service_verify_email_request: UserServiceVerifyEmailRequest, - ) -> UserServiceVerifyEmailResponse: - """Verify the email + def verify_email( self, user_service_verify_email_request: UserServiceVerifyEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyEmailResponse: + """VerifyEmail - Verify the email with the generated code. + Verify the email Verify the email with the generated code. - :param user_id: (required) - :type user_id: str :param user_service_verify_email_request: (required) :type user_service_verify_email_request: UserServiceVerifyEmailRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_verify_email_serialize( - user_id=user_id, + _param = self._verify_email_serialize( user_service_verify_email_request=user_service_verify_email_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4533,9 +6857,8 @@ def user_service_verify_email( response_types_map=_response_types_map, ).data - def __user_service_verify_email_serialize( + def _verify_email_serialize( self, - user_id, user_service_verify_email_request, _request_auth, _content_type, @@ -4558,8 +6881,6 @@ def __user_service_verify_email_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -4597,7 +6918,7 @@ def __user_service_verify_email_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email/verify', + resource_path='/zitadel.user.v2.UserService/VerifyEmail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4614,40 +6935,49 @@ def __user_service_verify_email_serialize( @validate_call - def user_service_verify_invite_code( - self, - user_id: StrictStr, - user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, - ) -> UserServiceVerifyInviteCodeResponse: - """Verify an invite code for a user + def verify_invite_code( self, user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyInviteCodeResponse: + """VerifyInviteCode - Verify the invite code of a user previously issued. This will set their email to a verified state and allow the user to set up their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + Verify an invite code for a user Verify the invite code of a user previously issued. This will set their email to a verified state and allow the user to set up their first authentication method (password, passkeys, IdP) depending on the organization's available methods. - :param user_id: (required) - :type user_id: str :param user_service_verify_invite_code_request: (required) :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_verify_invite_code_serialize( - user_id=user_id, + _param = self._verify_invite_code_serialize( user_service_verify_invite_code_request=user_service_verify_invite_code_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4655,9 +6985,8 @@ def user_service_verify_invite_code( response_types_map=_response_types_map, ).data - def __user_service_verify_invite_code_serialize( + def _verify_invite_code_serialize( self, - user_id, user_service_verify_invite_code_request, _request_auth, _content_type, @@ -4680,8 +7009,6 @@ def __user_service_verify_invite_code_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -4719,7 +7046,7 @@ def __user_service_verify_invite_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/invite_code/verify', + resource_path='/zitadel.user.v2.UserService/VerifyInviteCode', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4736,44 +7063,49 @@ def __user_service_verify_invite_code_serialize( @validate_call - def user_service_verify_passkey_registration( - self, - user_id: StrictStr, - passkey_id: StrictStr, - user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, - ) -> UserServiceVerifyPasskeyRegistrationResponse: - """Verify a passkey for a user - - Verify the passkey registration with the public key credential.. - - :param user_id: (required) - :type user_id: str - :param passkey_id: (required) - :type passkey_id: str + def verify_passkey_registration( self, user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyPasskeyRegistrationResponse: + """VerifyPasskeyRegistration + + Verify a passkey for a user Verify the passkey registration with the public key credential.. + :param user_service_verify_passkey_registration_request: (required) :type user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_verify_passkey_registration_serialize( - user_id=user_id, - passkey_id=passkey_id, + _param = self._verify_passkey_registration_serialize( user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPasskeyRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4781,10 +7113,8 @@ def user_service_verify_passkey_registration( response_types_map=_response_types_map, ).data - def __user_service_verify_passkey_registration_serialize( + def _verify_passkey_registration_serialize( self, - user_id, - passkey_id, user_service_verify_passkey_registration_request, _request_auth, _content_type, @@ -4807,10 +7137,6 @@ def __user_service_verify_passkey_registration_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if passkey_id is not None: - _path_params['passkeyId'] = passkey_id # process the query parameters # process the header parameters # process the form parameters @@ -4848,7 +7174,7 @@ def __user_service_verify_passkey_registration_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys/{passkeyId}', + resource_path='/zitadel.user.v2.UserService/VerifyPasskeyRegistration', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4865,40 +7191,49 @@ def __user_service_verify_passkey_registration_serialize( @validate_call - def user_service_verify_phone( - self, - user_id: StrictStr, - user_service_verify_phone_request: UserServiceVerifyPhoneRequest, - ) -> UserServiceVerifyPhoneResponse: - """Verify the phone + def verify_phone( self, user_service_verify_phone_request: UserServiceVerifyPhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyPhoneResponse: + """VerifyPhone - Verify the phone with the generated code.. + Verify the phone Verify the phone with the generated code.. - :param user_id: (required) - :type user_id: str :param user_service_verify_phone_request: (required) :type user_service_verify_phone_request: UserServiceVerifyPhoneRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_verify_phone_serialize( - user_id=user_id, + _param = self._verify_phone_serialize( user_service_verify_phone_request=user_service_verify_phone_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4906,9 +7241,8 @@ def user_service_verify_phone( response_types_map=_response_types_map, ).data - def __user_service_verify_phone_serialize( + def _verify_phone_serialize( self, - user_id, user_service_verify_phone_request, _request_auth, _content_type, @@ -4931,8 +7265,6 @@ def __user_service_verify_phone_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -4970,7 +7302,7 @@ def __user_service_verify_phone_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/phone/verify', + resource_path='/zitadel.user.v2.UserService/VerifyPhone', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4987,40 +7319,49 @@ def __user_service_verify_phone_serialize( @validate_call - def user_service_verify_totp_registration( - self, - user_id: StrictStr, - user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, - ) -> UserServiceVerifyTOTPRegistrationResponse: - """Verify a TOTP generator for a user + def verify_totp_registration( self, user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyTOTPRegistrationResponse: + """VerifyTOTPRegistration - Verify the TOTP registration with a generated code.. + Verify a TOTP generator for a user Verify the TOTP registration with a generated code.. - :param user_id: (required) - :type user_id: str :param user_service_verify_totp_registration_request: (required) :type user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_verify_totp_registration_serialize( - user_id=user_id, + _param = self._verify_totp_registration_serialize( user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyTOTPRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5028,9 +7369,8 @@ def user_service_verify_totp_registration( response_types_map=_response_types_map, ).data - def __user_service_verify_totp_registration_serialize( + def _verify_totp_registration_serialize( self, - user_id, user_service_verify_totp_registration_request, _request_auth, _content_type, @@ -5053,8 +7393,6 @@ def __user_service_verify_totp_registration_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters @@ -5092,7 +7430,7 @@ def __user_service_verify_totp_registration_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/totp/verify', + resource_path='/zitadel.user.v2.UserService/VerifyTOTPRegistration', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5109,44 +7447,49 @@ def __user_service_verify_totp_registration_serialize( @validate_call - def user_service_verify_u2_f_registration( - self, - user_id: StrictStr, - u2f_id: StrictStr, - user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest, - ) -> UserServiceVerifyU2FRegistrationResponse: - """Verify a u2f token for a user - - Verify the u2f token registration with the public key credential.. - - :param user_id: (required) - :type user_id: str - :param u2f_id: (required) - :type u2f_id: str + def verify_u2_f_registration( self, user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UserServiceVerifyU2FRegistrationResponse: + """VerifyU2FRegistration + + Verify a u2f token for a user Verify the u2f token registration with the public key credential.. + :param user_service_verify_u2_f_registration_request: (required) :type user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__user_service_verify_u2_f_registration_serialize( - user_id=user_id, - u2f_id=u2f_id, + _param = self._verify_u2_f_registration_serialize( user_service_verify_u2_f_registration_request=user_service_verify_u2_f_registration_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { '200': "UserServiceVerifyU2FRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5154,10 +7497,8 @@ def user_service_verify_u2_f_registration( response_types_map=_response_types_map, ).data - def __user_service_verify_u2_f_registration_serialize( + def _verify_u2_f_registration_serialize( self, - user_id, - u2f_id, user_service_verify_u2_f_registration_request, _request_auth, _content_type, @@ -5180,10 +7521,6 @@ def __user_service_verify_u2_f_registration_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if u2f_id is not None: - _path_params['u2fId'] = u2f_id # process the query parameters # process the header parameters # process the form parameters @@ -5221,7 +7558,7 @@ def __user_service_verify_u2_f_registration_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/u2f/{u2fId}', + resource_path='/zitadel.user.v2.UserService/VerifyU2FRegistration', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/api/web_key_service_api.py b/zitadel_client/api/web_key_service_api.py index ec2372aa..53bb9ba5 100644 --- a/zitadel_client/api/web_key_service_api.py +++ b/zitadel_client/api/web_key_service_api.py @@ -16,12 +16,14 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr -from zitadel_client.models.web_key_service_beta_activate_web_key_response import WebKeyServiceBetaActivateWebKeyResponse -from zitadel_client.models.web_key_service_beta_create_web_key_response import WebKeyServiceBetaCreateWebKeyResponse -from zitadel_client.models.web_key_service_beta_delete_web_key_response import WebKeyServiceBetaDeleteWebKeyResponse -from zitadel_client.models.web_key_service_beta_list_web_keys_response import WebKeyServiceBetaListWebKeysResponse +from typing import Any, Dict +from zitadel_client.models.web_key_service_activate_web_key_request import WebKeyServiceActivateWebKeyRequest +from zitadel_client.models.web_key_service_activate_web_key_response import WebKeyServiceActivateWebKeyResponse from zitadel_client.models.web_key_service_create_web_key_request import WebKeyServiceCreateWebKeyRequest +from zitadel_client.models.web_key_service_create_web_key_response import WebKeyServiceCreateWebKeyResponse +from zitadel_client.models.web_key_service_delete_web_key_request import WebKeyServiceDeleteWebKeyRequest +from zitadel_client.models.web_key_service_delete_web_key_response import WebKeyServiceDeleteWebKeyResponse +from zitadel_client.models.web_key_service_list_web_keys_response import WebKeyServiceListWebKeysResponse from zitadel_client.api_client import ApiClient, RequestSerialized from zitadel_client.api_response import ApiResponse @@ -42,37 +44,49 @@ def __init__(self, api_client=None) -> None: @validate_call - def web_key_service_activate_web_key( - self, - id: StrictStr, - ) -> WebKeyServiceBetaActivateWebKeyResponse: - """Activate Web Key - - Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` - - :param id: (required) - :type id: str + def activate_web_key( self, web_key_service_activate_web_key_request: WebKeyServiceActivateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WebKeyServiceActivateWebKeyResponse: + """ActivateWebKey + + Activate Web Key Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param web_key_service_activate_web_key_request: (required) + :type web_key_service_activate_web_key_request: WebKeyServiceActivateWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__web_key_service_activate_web_key_serialize( - id=id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._activate_web_key_serialize( + web_key_service_activate_web_key_request=web_key_service_activate_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaActivateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "object", + '200': "WebKeyServiceActivateWebKeyResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -80,9 +94,9 @@ def web_key_service_activate_web_key( response_types_map=_response_types_map, ).data - def __web_key_service_activate_web_key_serialize( + def _activate_web_key_serialize( self, - id, + web_key_service_activate_web_key_request, _request_auth, _content_type, _headers, @@ -104,12 +118,12 @@ def __web_key_service_activate_web_key_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if web_key_service_activate_web_key_request is not None: + _body_params = web_key_service_activate_web_key_request # set the HTTP header `Accept` @@ -120,6 +134,19 @@ def __web_key_service_activate_web_key_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -128,7 +155,7 @@ def __web_key_service_activate_web_key_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/web_keys/{id}/activate', + resource_path='/zitadel.webkey.v2.WebKeyService/ActivateWebKey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -145,37 +172,49 @@ def __web_key_service_activate_web_key_serialize( @validate_call - def web_key_service_create_web_key( - self, - web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, - ) -> WebKeyServiceBetaCreateWebKeyResponse: - """Create Web Key + def create_web_key( self, web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WebKeyServiceCreateWebKeyResponse: + """CreateWebKey - Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + Create Web Key Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` :param web_key_service_create_web_key_request: (required) :type web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__web_key_service_create_web_key_serialize( + _param = self._create_web_key_serialize( web_key_service_create_web_key_request=web_key_service_create_web_key_request, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaCreateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "WebKeyServiceCreateWebKeyResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -183,7 +222,7 @@ def web_key_service_create_web_key( response_types_map=_response_types_map, ).data - def __web_key_service_create_web_key_serialize( + def _create_web_key_serialize( self, web_key_service_create_web_key_request, _request_auth, @@ -244,7 +283,7 @@ def __web_key_service_create_web_key_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/web_keys', + resource_path='/zitadel.webkey.v2.WebKeyService/CreateWebKey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -261,37 +300,49 @@ def __web_key_service_create_web_key_serialize( @validate_call - def web_key_service_delete_web_key( - self, - id: StrictStr, - ) -> WebKeyServiceBetaDeleteWebKeyResponse: - """Delete Web Key - - Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` - - :param id: (required) - :type id: str + def delete_web_key( self, web_key_service_delete_web_key_request: WebKeyServiceDeleteWebKeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WebKeyServiceDeleteWebKeyResponse: + """DeleteWebKey + + Delete Web Key Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` + + :param web_key_service_delete_web_key_request: (required) + :type web_key_service_delete_web_key_request: WebKeyServiceDeleteWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__web_key_service_delete_web_key_serialize( - id=id, - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._delete_web_key_serialize( + web_key_service_delete_web_key_request=web_key_service_delete_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaDeleteWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "WebKeyServiceDeleteWebKeyResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -299,9 +350,9 @@ def web_key_service_delete_web_key( response_types_map=_response_types_map, ).data - def __web_key_service_delete_web_key_serialize( + def _delete_web_key_serialize( self, - id, + web_key_service_delete_web_key_request, _request_auth, _content_type, _headers, @@ -323,12 +374,12 @@ def __web_key_service_delete_web_key_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if web_key_service_delete_web_key_request is not None: + _body_params = web_key_service_delete_web_key_request # set the HTTP header `Accept` @@ -339,6 +390,19 @@ def __web_key_service_delete_web_key_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -346,8 +410,8 @@ def __web_key_service_delete_web_key_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2beta/web_keys/{id}', + method='POST', + resource_path='/zitadel.webkey.v2.WebKeyService/DeleteWebKey', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -364,33 +428,51 @@ def __web_key_service_delete_web_key_serialize( @validate_call - def web_key_service_list_web_keys( - self, - ) -> WebKeyServiceBetaListWebKeysResponse: - """List Web Keys - - List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` - + def list_web_keys( self, body: Optional[Dict[str, Any]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WebKeyServiceListWebKeysResponse: + if body is None: + body = {} + """ListWebKeys + + List Web Keys List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - _param = self.__web_key_service_list_web_keys_serialize( - _request_auth=None, - _content_type=None, - _headers=None, - _host_index=0 + _param = self._list_web_keys_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaListWebKeysResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", + '200': "WebKeyServiceListWebKeysResponse", } - response_data = self.api_client.call_api( *_param, - _request_timeout=None + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -398,8 +480,9 @@ def web_key_service_list_web_keys( response_types_map=_response_types_map, ).data - def __web_key_service_list_web_keys_serialize( + def _list_web_keys_serialize( self, + body, _request_auth, _content_type, _headers, @@ -425,6 +508,8 @@ def __web_key_service_list_web_keys_serialize( # process the header parameters # process the form parameters # process the body parameter + if body is not None: + _body_params = body # set the HTTP header `Accept` @@ -435,6 +520,19 @@ def __web_key_service_list_web_keys_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -442,8 +540,8 @@ def __web_key_service_list_web_keys_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/web_keys', + method='POST', + resource_path='/zitadel.webkey.v2.WebKeyService/ListWebKeys', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/zitadel_client/models/__init__.py b/zitadel_client/models/__init__.py index 5c2f3f26..508430b1 100644 --- a/zitadel_client/models/__init__.py +++ b/zitadel_client/models/__init__.py @@ -14,68 +14,642 @@ # import models into model package -from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition -from zitadel_client.models.action_service_beta_create_target_response import ActionServiceBetaCreateTargetResponse -from zitadel_client.models.action_service_beta_delete_target_response import ActionServiceBetaDeleteTargetResponse -from zitadel_client.models.action_service_beta_event_execution import ActionServiceBetaEventExecution -from zitadel_client.models.action_service_beta_execution import ActionServiceBetaExecution -from zitadel_client.models.action_service_beta_function_execution import ActionServiceBetaFunctionExecution -from zitadel_client.models.action_service_beta_get_target_response import ActionServiceBetaGetTargetResponse -from zitadel_client.models.action_service_beta_in_target_ids_filter import ActionServiceBetaInTargetIDsFilter -from zitadel_client.models.action_service_beta_list_execution_functions_response import ActionServiceBetaListExecutionFunctionsResponse -from zitadel_client.models.action_service_beta_list_execution_methods_response import ActionServiceBetaListExecutionMethodsResponse -from zitadel_client.models.action_service_beta_list_execution_services_response import ActionServiceBetaListExecutionServicesResponse -from zitadel_client.models.action_service_beta_list_executions_response import ActionServiceBetaListExecutionsResponse -from zitadel_client.models.action_service_beta_list_targets_response import ActionServiceBetaListTargetsResponse -from zitadel_client.models.action_service_beta_pagination_request import ActionServiceBetaPaginationRequest -from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from zitadel_client.models.action_service_beta_request_execution import ActionServiceBetaRequestExecution -from zitadel_client.models.action_service_beta_response_execution import ActionServiceBetaResponseExecution -from zitadel_client.models.action_service_beta_set_execution_response import ActionServiceBetaSetExecutionResponse -from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget -from zitadel_client.models.action_service_beta_target_field_name import ActionServiceBetaTargetFieldName -from zitadel_client.models.action_service_beta_target_name_filter import ActionServiceBetaTargetNameFilter -from zitadel_client.models.action_service_beta_target_search_filter import ActionServiceBetaTargetSearchFilter -from zitadel_client.models.action_service_beta_text_filter_method import ActionServiceBetaTextFilterMethod -from zitadel_client.models.action_service_beta_update_target_response import ActionServiceBetaUpdateTargetResponse -from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest -from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest -from zitadel_client.models.action_service_protobuf_any import ActionServiceProtobufAny -from zitadel_client.models.action_service_rpc_status import ActionServiceRpcStatus -from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest -from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest +from zitadel_client.models.beta_action_service_any import BetaActionServiceAny +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition +from zitadel_client.models.beta_action_service_connect_error import BetaActionServiceConnectError +from zitadel_client.models.beta_action_service_create_target_request import BetaActionServiceCreateTargetRequest +from zitadel_client.models.beta_action_service_create_target_response import BetaActionServiceCreateTargetResponse +from zitadel_client.models.beta_action_service_delete_target_request import BetaActionServiceDeleteTargetRequest +from zitadel_client.models.beta_action_service_delete_target_response import BetaActionServiceDeleteTargetResponse +from zitadel_client.models.beta_action_service_event_execution import BetaActionServiceEventExecution +from zitadel_client.models.beta_action_service_execution import BetaActionServiceExecution +from zitadel_client.models.beta_action_service_execution_field_name import BetaActionServiceExecutionFieldName +from zitadel_client.models.beta_action_service_execution_search_filter import BetaActionServiceExecutionSearchFilter +from zitadel_client.models.beta_action_service_execution_type import BetaActionServiceExecutionType +from zitadel_client.models.beta_action_service_execution_type_filter import BetaActionServiceExecutionTypeFilter +from zitadel_client.models.beta_action_service_function_execution import BetaActionServiceFunctionExecution +from zitadel_client.models.beta_action_service_get_target_request import BetaActionServiceGetTargetRequest +from zitadel_client.models.beta_action_service_get_target_response import BetaActionServiceGetTargetResponse +from zitadel_client.models.beta_action_service_in_conditions_filter import BetaActionServiceInConditionsFilter +from zitadel_client.models.beta_action_service_in_target_ids_filter import BetaActionServiceInTargetIDsFilter +from zitadel_client.models.beta_action_service_list_execution_functions_response import BetaActionServiceListExecutionFunctionsResponse +from zitadel_client.models.beta_action_service_list_execution_methods_response import BetaActionServiceListExecutionMethodsResponse +from zitadel_client.models.beta_action_service_list_execution_services_response import BetaActionServiceListExecutionServicesResponse +from zitadel_client.models.beta_action_service_list_executions_request import BetaActionServiceListExecutionsRequest +from zitadel_client.models.beta_action_service_list_executions_response import BetaActionServiceListExecutionsResponse +from zitadel_client.models.beta_action_service_list_targets_request import BetaActionServiceListTargetsRequest +from zitadel_client.models.beta_action_service_list_targets_response import BetaActionServiceListTargetsResponse +from zitadel_client.models.beta_action_service_pagination_request import BetaActionServicePaginationRequest +from zitadel_client.models.beta_action_service_pagination_response import BetaActionServicePaginationResponse +from zitadel_client.models.beta_action_service_rest_call import BetaActionServiceRESTCall +from zitadel_client.models.beta_action_service_rest_webhook import BetaActionServiceRESTWebhook +from zitadel_client.models.beta_action_service_request_execution import BetaActionServiceRequestExecution +from zitadel_client.models.beta_action_service_response_execution import BetaActionServiceResponseExecution +from zitadel_client.models.beta_action_service_set_execution_request import BetaActionServiceSetExecutionRequest +from zitadel_client.models.beta_action_service_set_execution_response import BetaActionServiceSetExecutionResponse +from zitadel_client.models.beta_action_service_target import BetaActionServiceTarget +from zitadel_client.models.beta_action_service_target_field_name import BetaActionServiceTargetFieldName +from zitadel_client.models.beta_action_service_target_filter import BetaActionServiceTargetFilter +from zitadel_client.models.beta_action_service_target_name_filter import BetaActionServiceTargetNameFilter +from zitadel_client.models.beta_action_service_target_search_filter import BetaActionServiceTargetSearchFilter +from zitadel_client.models.beta_action_service_text_filter_method import BetaActionServiceTextFilterMethod +from zitadel_client.models.beta_action_service_update_target_request import BetaActionServiceUpdateTargetRequest +from zitadel_client.models.beta_action_service_update_target_response import BetaActionServiceUpdateTargetResponse +from zitadel_client.models.beta_app_service_api_auth_method_type import BetaAppServiceAPIAuthMethodType +from zitadel_client.models.beta_app_service_api_config import BetaAppServiceAPIConfig +from zitadel_client.models.beta_app_service_any import BetaAppServiceAny +from zitadel_client.models.beta_app_service_app_sorting import BetaAppServiceAppSorting +from zitadel_client.models.beta_app_service_app_state import BetaAppServiceAppState +from zitadel_client.models.beta_app_service_application import BetaAppServiceApplication +from zitadel_client.models.beta_app_service_application_key import BetaAppServiceApplicationKey +from zitadel_client.models.beta_app_service_application_keys_sorting import BetaAppServiceApplicationKeysSorting +from zitadel_client.models.beta_app_service_application_name_query import BetaAppServiceApplicationNameQuery +from zitadel_client.models.beta_app_service_application_search_filter import BetaAppServiceApplicationSearchFilter +from zitadel_client.models.beta_app_service_connect_error import BetaAppServiceConnectError +from zitadel_client.models.beta_app_service_create_api_application_request import BetaAppServiceCreateAPIApplicationRequest +from zitadel_client.models.beta_app_service_create_api_application_response import BetaAppServiceCreateAPIApplicationResponse +from zitadel_client.models.beta_app_service_create_application_key_request import BetaAppServiceCreateApplicationKeyRequest +from zitadel_client.models.beta_app_service_create_application_key_response import BetaAppServiceCreateApplicationKeyResponse +from zitadel_client.models.beta_app_service_create_application_request import BetaAppServiceCreateApplicationRequest +from zitadel_client.models.beta_app_service_create_application_response import BetaAppServiceCreateApplicationResponse +from zitadel_client.models.beta_app_service_create_oidc_application_request import BetaAppServiceCreateOIDCApplicationRequest +from zitadel_client.models.beta_app_service_create_oidc_application_response import BetaAppServiceCreateOIDCApplicationResponse +from zitadel_client.models.beta_app_service_create_saml_application_request import BetaAppServiceCreateSAMLApplicationRequest +from zitadel_client.models.beta_app_service_deactivate_application_request import BetaAppServiceDeactivateApplicationRequest +from zitadel_client.models.beta_app_service_deactivate_application_response import BetaAppServiceDeactivateApplicationResponse +from zitadel_client.models.beta_app_service_delete_application_key_request import BetaAppServiceDeleteApplicationKeyRequest +from zitadel_client.models.beta_app_service_delete_application_key_response import BetaAppServiceDeleteApplicationKeyResponse +from zitadel_client.models.beta_app_service_delete_application_request import BetaAppServiceDeleteApplicationRequest +from zitadel_client.models.beta_app_service_delete_application_response import BetaAppServiceDeleteApplicationResponse +from zitadel_client.models.beta_app_service_get_application_key_request import BetaAppServiceGetApplicationKeyRequest +from zitadel_client.models.beta_app_service_get_application_key_response import BetaAppServiceGetApplicationKeyResponse +from zitadel_client.models.beta_app_service_get_application_request import BetaAppServiceGetApplicationRequest +from zitadel_client.models.beta_app_service_get_application_response import BetaAppServiceGetApplicationResponse +from zitadel_client.models.beta_app_service_list_application_keys_request import BetaAppServiceListApplicationKeysRequest +from zitadel_client.models.beta_app_service_list_application_keys_response import BetaAppServiceListApplicationKeysResponse +from zitadel_client.models.beta_app_service_list_applications_request import BetaAppServiceListApplicationsRequest +from zitadel_client.models.beta_app_service_list_applications_response import BetaAppServiceListApplicationsResponse +from zitadel_client.models.beta_app_service_login_v2 import BetaAppServiceLoginV2 +from zitadel_client.models.beta_app_service_login_version import BetaAppServiceLoginVersion +from zitadel_client.models.beta_app_service_oidc_app_type import BetaAppServiceOIDCAppType +from zitadel_client.models.beta_app_service_oidc_auth_method_type import BetaAppServiceOIDCAuthMethodType +from zitadel_client.models.beta_app_service_oidc_config import BetaAppServiceOIDCConfig +from zitadel_client.models.beta_app_service_oidc_grant_type import BetaAppServiceOIDCGrantType +from zitadel_client.models.beta_app_service_oidc_localized_message import BetaAppServiceOIDCLocalizedMessage +from zitadel_client.models.beta_app_service_oidc_response_type import BetaAppServiceOIDCResponseType +from zitadel_client.models.beta_app_service_oidc_token_type import BetaAppServiceOIDCTokenType +from zitadel_client.models.beta_app_service_oidc_version import BetaAppServiceOIDCVersion +from zitadel_client.models.beta_app_service_pagination_request import BetaAppServicePaginationRequest +from zitadel_client.models.beta_app_service_pagination_response import BetaAppServicePaginationResponse +from zitadel_client.models.beta_app_service_reactivate_application_request import BetaAppServiceReactivateApplicationRequest +from zitadel_client.models.beta_app_service_reactivate_application_response import BetaAppServiceReactivateApplicationResponse +from zitadel_client.models.beta_app_service_regenerate_client_secret_request import BetaAppServiceRegenerateClientSecretRequest +from zitadel_client.models.beta_app_service_regenerate_client_secret_response import BetaAppServiceRegenerateClientSecretResponse +from zitadel_client.models.beta_app_service_saml_config import BetaAppServiceSAMLConfig +from zitadel_client.models.beta_app_service_text_filter_method import BetaAppServiceTextFilterMethod +from zitadel_client.models.beta_app_service_update_api_application_configuration_request import BetaAppServiceUpdateAPIApplicationConfigurationRequest +from zitadel_client.models.beta_app_service_update_application_request import BetaAppServiceUpdateApplicationRequest +from zitadel_client.models.beta_app_service_update_application_response import BetaAppServiceUpdateApplicationResponse +from zitadel_client.models.beta_app_service_update_oidc_application_configuration_request import BetaAppServiceUpdateOIDCApplicationConfigurationRequest +from zitadel_client.models.beta_app_service_update_saml_application_configuration_request import BetaAppServiceUpdateSAMLApplicationConfigurationRequest +from zitadel_client.models.beta_authorization_service_activate_authorization_request import BetaAuthorizationServiceActivateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_activate_authorization_response import BetaAuthorizationServiceActivateAuthorizationResponse +from zitadel_client.models.beta_authorization_service_any import BetaAuthorizationServiceAny +from zitadel_client.models.beta_authorization_service_authorization import BetaAuthorizationServiceAuthorization +from zitadel_client.models.beta_authorization_service_authorization_field_name import BetaAuthorizationServiceAuthorizationFieldName +from zitadel_client.models.beta_authorization_service_authorizations_search_filter import BetaAuthorizationServiceAuthorizationsSearchFilter +from zitadel_client.models.beta_authorization_service_connect_error import BetaAuthorizationServiceConnectError +from zitadel_client.models.beta_authorization_service_create_authorization_request import BetaAuthorizationServiceCreateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_create_authorization_response import BetaAuthorizationServiceCreateAuthorizationResponse +from zitadel_client.models.beta_authorization_service_deactivate_authorization_request import BetaAuthorizationServiceDeactivateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_deactivate_authorization_response import BetaAuthorizationServiceDeactivateAuthorizationResponse +from zitadel_client.models.beta_authorization_service_delete_authorization_request import BetaAuthorizationServiceDeleteAuthorizationRequest +from zitadel_client.models.beta_authorization_service_delete_authorization_response import BetaAuthorizationServiceDeleteAuthorizationResponse +from zitadel_client.models.beta_authorization_service_id_filter import BetaAuthorizationServiceIDFilter +from zitadel_client.models.beta_authorization_service_in_ids_filter import BetaAuthorizationServiceInIDsFilter +from zitadel_client.models.beta_authorization_service_list_authorizations_request import BetaAuthorizationServiceListAuthorizationsRequest +from zitadel_client.models.beta_authorization_service_list_authorizations_response import BetaAuthorizationServiceListAuthorizationsResponse +from zitadel_client.models.beta_authorization_service_pagination_request import BetaAuthorizationServicePaginationRequest +from zitadel_client.models.beta_authorization_service_pagination_response import BetaAuthorizationServicePaginationResponse +from zitadel_client.models.beta_authorization_service_project_name_query import BetaAuthorizationServiceProjectNameQuery +from zitadel_client.models.beta_authorization_service_role_key_query import BetaAuthorizationServiceRoleKeyQuery +from zitadel_client.models.beta_authorization_service_state import BetaAuthorizationServiceState +from zitadel_client.models.beta_authorization_service_state_query import BetaAuthorizationServiceStateQuery +from zitadel_client.models.beta_authorization_service_text_filter_method import BetaAuthorizationServiceTextFilterMethod +from zitadel_client.models.beta_authorization_service_update_authorization_request import BetaAuthorizationServiceUpdateAuthorizationRequest +from zitadel_client.models.beta_authorization_service_update_authorization_response import BetaAuthorizationServiceUpdateAuthorizationResponse +from zitadel_client.models.beta_authorization_service_user import BetaAuthorizationServiceUser +from zitadel_client.models.beta_authorization_service_user_display_name_query import BetaAuthorizationServiceUserDisplayNameQuery +from zitadel_client.models.beta_authorization_service_user_preferred_login_name_query import BetaAuthorizationServiceUserPreferredLoginNameQuery +from zitadel_client.models.beta_feature_service_any import BetaFeatureServiceAny +from zitadel_client.models.beta_feature_service_connect_error import BetaFeatureServiceConnectError +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from zitadel_client.models.beta_feature_service_feature_flag import BetaFeatureServiceFeatureFlag +from zitadel_client.models.beta_feature_service_get_instance_features_request import BetaFeatureServiceGetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_get_instance_features_response import BetaFeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_get_organization_features_request import BetaFeatureServiceGetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_get_organization_features_response import BetaFeatureServiceGetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_get_system_features_response import BetaFeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_get_user_features_request import BetaFeatureServiceGetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_get_user_features_response import BetaFeatureServiceGetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from zitadel_client.models.beta_feature_service_improved_performance_feature_flag import BetaFeatureServiceImprovedPerformanceFeatureFlag +from zitadel_client.models.beta_feature_service_reset_instance_features_response import BetaFeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_organization_features_request import BetaFeatureServiceResetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_organization_features_response import BetaFeatureServiceResetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_system_features_response import BetaFeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_reset_user_features_request import BetaFeatureServiceResetUserFeaturesRequest +from zitadel_client.models.beta_feature_service_reset_user_features_response import BetaFeatureServiceResetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_set_instance_features_request import BetaFeatureServiceSetInstanceFeaturesRequest +from zitadel_client.models.beta_feature_service_set_instance_features_response import BetaFeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.beta_feature_service_set_organization_features_request import BetaFeatureServiceSetOrganizationFeaturesRequest +from zitadel_client.models.beta_feature_service_set_organization_features_response import BetaFeatureServiceSetOrganizationFeaturesResponse +from zitadel_client.models.beta_feature_service_set_system_features_request import BetaFeatureServiceSetSystemFeaturesRequest +from zitadel_client.models.beta_feature_service_set_system_features_response import BetaFeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.beta_feature_service_set_user_feature_request import BetaFeatureServiceSetUserFeatureRequest +from zitadel_client.models.beta_feature_service_set_user_features_response import BetaFeatureServiceSetUserFeaturesResponse +from zitadel_client.models.beta_feature_service_source import BetaFeatureServiceSource +from zitadel_client.models.beta_instance_service_add_custom_domain_request import BetaInstanceServiceAddCustomDomainRequest +from zitadel_client.models.beta_instance_service_add_custom_domain_response import BetaInstanceServiceAddCustomDomainResponse +from zitadel_client.models.beta_instance_service_add_trusted_domain_request import BetaInstanceServiceAddTrustedDomainRequest +from zitadel_client.models.beta_instance_service_add_trusted_domain_response import BetaInstanceServiceAddTrustedDomainResponse +from zitadel_client.models.beta_instance_service_any import BetaInstanceServiceAny +from zitadel_client.models.beta_instance_service_connect_error import BetaInstanceServiceConnectError +from zitadel_client.models.beta_instance_service_delete_instance_request import BetaInstanceServiceDeleteInstanceRequest +from zitadel_client.models.beta_instance_service_delete_instance_response import BetaInstanceServiceDeleteInstanceResponse +from zitadel_client.models.beta_instance_service_domain import BetaInstanceServiceDomain +from zitadel_client.models.beta_instance_service_domain_field_name import BetaInstanceServiceDomainFieldName +from zitadel_client.models.beta_instance_service_domain_generated_query import BetaInstanceServiceDomainGeneratedQuery +from zitadel_client.models.beta_instance_service_domain_primary_query import BetaInstanceServiceDomainPrimaryQuery +from zitadel_client.models.beta_instance_service_domain_query import BetaInstanceServiceDomainQuery +from zitadel_client.models.beta_instance_service_domain_search_query import BetaInstanceServiceDomainSearchQuery +from zitadel_client.models.beta_instance_service_domains_query import BetaInstanceServiceDomainsQuery +from zitadel_client.models.beta_instance_service_field_name import BetaInstanceServiceFieldName +from zitadel_client.models.beta_instance_service_get_instance_request import BetaInstanceServiceGetInstanceRequest +from zitadel_client.models.beta_instance_service_get_instance_response import BetaInstanceServiceGetInstanceResponse +from zitadel_client.models.beta_instance_service_ids_query import BetaInstanceServiceIdsQuery +from zitadel_client.models.beta_instance_service_instance import BetaInstanceServiceInstance +from zitadel_client.models.beta_instance_service_list_custom_domains_request import BetaInstanceServiceListCustomDomainsRequest +from zitadel_client.models.beta_instance_service_list_custom_domains_response import BetaInstanceServiceListCustomDomainsResponse +from zitadel_client.models.beta_instance_service_list_instances_request import BetaInstanceServiceListInstancesRequest +from zitadel_client.models.beta_instance_service_list_instances_response import BetaInstanceServiceListInstancesResponse +from zitadel_client.models.beta_instance_service_list_trusted_domains_request import BetaInstanceServiceListTrustedDomainsRequest +from zitadel_client.models.beta_instance_service_list_trusted_domains_response import BetaInstanceServiceListTrustedDomainsResponse +from zitadel_client.models.beta_instance_service_pagination_request import BetaInstanceServicePaginationRequest +from zitadel_client.models.beta_instance_service_pagination_response import BetaInstanceServicePaginationResponse +from zitadel_client.models.beta_instance_service_query import BetaInstanceServiceQuery +from zitadel_client.models.beta_instance_service_remove_custom_domain_request import BetaInstanceServiceRemoveCustomDomainRequest +from zitadel_client.models.beta_instance_service_remove_custom_domain_response import BetaInstanceServiceRemoveCustomDomainResponse +from zitadel_client.models.beta_instance_service_remove_trusted_domain_request import BetaInstanceServiceRemoveTrustedDomainRequest +from zitadel_client.models.beta_instance_service_remove_trusted_domain_response import BetaInstanceServiceRemoveTrustedDomainResponse +from zitadel_client.models.beta_instance_service_state import BetaInstanceServiceState +from zitadel_client.models.beta_instance_service_text_query_method import BetaInstanceServiceTextQueryMethod +from zitadel_client.models.beta_instance_service_trusted_domain import BetaInstanceServiceTrustedDomain +from zitadel_client.models.beta_instance_service_trusted_domain_field_name import BetaInstanceServiceTrustedDomainFieldName +from zitadel_client.models.beta_instance_service_trusted_domain_search_query import BetaInstanceServiceTrustedDomainSearchQuery +from zitadel_client.models.beta_instance_service_update_instance_request import BetaInstanceServiceUpdateInstanceRequest +from zitadel_client.models.beta_instance_service_update_instance_response import BetaInstanceServiceUpdateInstanceResponse +from zitadel_client.models.beta_internal_permission_service_administrator import BetaInternalPermissionServiceAdministrator +from zitadel_client.models.beta_internal_permission_service_administrator_field_name import BetaInternalPermissionServiceAdministratorFieldName +from zitadel_client.models.beta_internal_permission_service_administrator_search_filter import BetaInternalPermissionServiceAdministratorSearchFilter +from zitadel_client.models.beta_internal_permission_service_and_filter import BetaInternalPermissionServiceAndFilter +from zitadel_client.models.beta_internal_permission_service_any import BetaInternalPermissionServiceAny +from zitadel_client.models.beta_internal_permission_service_connect_error import BetaInternalPermissionServiceConnectError +from zitadel_client.models.beta_internal_permission_service_create_administrator_request import BetaInternalPermissionServiceCreateAdministratorRequest +from zitadel_client.models.beta_internal_permission_service_create_administrator_response import BetaInternalPermissionServiceCreateAdministratorResponse +from zitadel_client.models.beta_internal_permission_service_delete_administrator_request import BetaInternalPermissionServiceDeleteAdministratorRequest +from zitadel_client.models.beta_internal_permission_service_delete_administrator_response import BetaInternalPermissionServiceDeleteAdministratorResponse +from zitadel_client.models.beta_internal_permission_service_id_filter import BetaInternalPermissionServiceIDFilter +from zitadel_client.models.beta_internal_permission_service_in_ids_filter import BetaInternalPermissionServiceInIDsFilter +from zitadel_client.models.beta_internal_permission_service_list_administrators_request import BetaInternalPermissionServiceListAdministratorsRequest +from zitadel_client.models.beta_internal_permission_service_list_administrators_response import BetaInternalPermissionServiceListAdministratorsResponse +from zitadel_client.models.beta_internal_permission_service_not_filter import BetaInternalPermissionServiceNotFilter +from zitadel_client.models.beta_internal_permission_service_or_filter import BetaInternalPermissionServiceOrFilter +from zitadel_client.models.beta_internal_permission_service_organization import BetaInternalPermissionServiceOrganization +from zitadel_client.models.beta_internal_permission_service_pagination_request import BetaInternalPermissionServicePaginationRequest +from zitadel_client.models.beta_internal_permission_service_pagination_response import BetaInternalPermissionServicePaginationResponse +from zitadel_client.models.beta_internal_permission_service_project import BetaInternalPermissionServiceProject +from zitadel_client.models.beta_internal_permission_service_project_grant import BetaInternalPermissionServiceProjectGrant +from zitadel_client.models.beta_internal_permission_service_resource_filter import BetaInternalPermissionServiceResourceFilter +from zitadel_client.models.beta_internal_permission_service_resource_type import BetaInternalPermissionServiceResourceType +from zitadel_client.models.beta_internal_permission_service_role_filter import BetaInternalPermissionServiceRoleFilter +from zitadel_client.models.beta_internal_permission_service_text_filter_method import BetaInternalPermissionServiceTextFilterMethod +from zitadel_client.models.beta_internal_permission_service_timestamp_filter import BetaInternalPermissionServiceTimestampFilter +from zitadel_client.models.beta_internal_permission_service_timestamp_filter_method import BetaInternalPermissionServiceTimestampFilterMethod +from zitadel_client.models.beta_internal_permission_service_update_administrator_request import BetaInternalPermissionServiceUpdateAdministratorRequest +from zitadel_client.models.beta_internal_permission_service_update_administrator_response import BetaInternalPermissionServiceUpdateAdministratorResponse +from zitadel_client.models.beta_internal_permission_service_user import BetaInternalPermissionServiceUser +from zitadel_client.models.beta_internal_permission_service_user_display_name_filter import BetaInternalPermissionServiceUserDisplayNameFilter +from zitadel_client.models.beta_internal_permission_service_user_preferred_login_name_filter import BetaInternalPermissionServiceUserPreferredLoginNameFilter +from zitadel_client.models.beta_oidc_service_any import BetaOIDCServiceAny +from zitadel_client.models.beta_oidc_service_auth_request import BetaOIDCServiceAuthRequest +from zitadel_client.models.beta_oidc_service_authorization_error import BetaOIDCServiceAuthorizationError +from zitadel_client.models.beta_oidc_service_connect_error import BetaOIDCServiceConnectError +from zitadel_client.models.beta_oidc_service_create_callback_request import BetaOIDCServiceCreateCallbackRequest +from zitadel_client.models.beta_oidc_service_create_callback_response import BetaOIDCServiceCreateCallbackResponse +from zitadel_client.models.beta_oidc_service_details import BetaOIDCServiceDetails +from zitadel_client.models.beta_oidc_service_error_reason import BetaOIDCServiceErrorReason +from zitadel_client.models.beta_oidc_service_get_auth_request_request import BetaOIDCServiceGetAuthRequestRequest +from zitadel_client.models.beta_oidc_service_get_auth_request_response import BetaOIDCServiceGetAuthRequestResponse +from zitadel_client.models.beta_oidc_service_prompt import BetaOIDCServicePrompt +from zitadel_client.models.beta_oidc_service_session import BetaOIDCServiceSession +from zitadel_client.models.beta_organization_service_activate_organization_request import BetaOrganizationServiceActivateOrganizationRequest +from zitadel_client.models.beta_organization_service_activate_organization_response import BetaOrganizationServiceActivateOrganizationResponse +from zitadel_client.models.beta_organization_service_add_human_user_request import BetaOrganizationServiceAddHumanUserRequest +from zitadel_client.models.beta_organization_service_add_organization_domain_request import BetaOrganizationServiceAddOrganizationDomainRequest +from zitadel_client.models.beta_organization_service_add_organization_domain_response import BetaOrganizationServiceAddOrganizationDomainResponse +from zitadel_client.models.beta_organization_service_admin import BetaOrganizationServiceAdmin +from zitadel_client.models.beta_organization_service_any import BetaOrganizationServiceAny +from zitadel_client.models.beta_organization_service_assigned_admin import BetaOrganizationServiceAssignedAdmin +from zitadel_client.models.beta_organization_service_connect_error import BetaOrganizationServiceConnectError +from zitadel_client.models.beta_organization_service_create_organization_request import BetaOrganizationServiceCreateOrganizationRequest +from zitadel_client.models.beta_organization_service_create_organization_response import BetaOrganizationServiceCreateOrganizationResponse +from zitadel_client.models.beta_organization_service_created_admin import BetaOrganizationServiceCreatedAdmin +from zitadel_client.models.beta_organization_service_deactivate_organization_request import BetaOrganizationServiceDeactivateOrganizationRequest +from zitadel_client.models.beta_organization_service_deactivate_organization_response import BetaOrganizationServiceDeactivateOrganizationResponse +from zitadel_client.models.beta_organization_service_delete_organization_domain_request import BetaOrganizationServiceDeleteOrganizationDomainRequest +from zitadel_client.models.beta_organization_service_delete_organization_domain_response import BetaOrganizationServiceDeleteOrganizationDomainResponse +from zitadel_client.models.beta_organization_service_delete_organization_metadata_request import BetaOrganizationServiceDeleteOrganizationMetadataRequest +from zitadel_client.models.beta_organization_service_delete_organization_metadata_response import BetaOrganizationServiceDeleteOrganizationMetadataResponse +from zitadel_client.models.beta_organization_service_delete_organization_request import BetaOrganizationServiceDeleteOrganizationRequest +from zitadel_client.models.beta_organization_service_delete_organization_response import BetaOrganizationServiceDeleteOrganizationResponse +from zitadel_client.models.beta_organization_service_domain import BetaOrganizationServiceDomain +from zitadel_client.models.beta_organization_service_domain_name_filter import BetaOrganizationServiceDomainNameFilter +from zitadel_client.models.beta_organization_service_domain_search_filter import BetaOrganizationServiceDomainSearchFilter +from zitadel_client.models.beta_organization_service_domain_validation_type import BetaOrganizationServiceDomainValidationType +from zitadel_client.models.beta_organization_service_gender import BetaOrganizationServiceGender +from zitadel_client.models.beta_organization_service_generate_organization_domain_validation_request import BetaOrganizationServiceGenerateOrganizationDomainValidationRequest +from zitadel_client.models.beta_organization_service_generate_organization_domain_validation_response import BetaOrganizationServiceGenerateOrganizationDomainValidationResponse +from zitadel_client.models.beta_organization_service_hashed_password import BetaOrganizationServiceHashedPassword +from zitadel_client.models.beta_organization_service_idp_link import BetaOrganizationServiceIDPLink +from zitadel_client.models.beta_organization_service_list_organization_domains_request import BetaOrganizationServiceListOrganizationDomainsRequest +from zitadel_client.models.beta_organization_service_list_organization_domains_response import BetaOrganizationServiceListOrganizationDomainsResponse +from zitadel_client.models.beta_organization_service_list_organization_metadata_request import BetaOrganizationServiceListOrganizationMetadataRequest +from zitadel_client.models.beta_organization_service_list_organization_metadata_response import BetaOrganizationServiceListOrganizationMetadataResponse +from zitadel_client.models.beta_organization_service_list_organizations_request import BetaOrganizationServiceListOrganizationsRequest +from zitadel_client.models.beta_organization_service_list_organizations_response import BetaOrganizationServiceListOrganizationsResponse +from zitadel_client.models.beta_organization_service_metadata import BetaOrganizationServiceMetadata +from zitadel_client.models.beta_organization_service_metadata_key_query import BetaOrganizationServiceMetadataKeyQuery +from zitadel_client.models.beta_organization_service_metadata_query import BetaOrganizationServiceMetadataQuery +from zitadel_client.models.beta_organization_service_org_domain_filter import BetaOrganizationServiceOrgDomainFilter +from zitadel_client.models.beta_organization_service_org_field_name import BetaOrganizationServiceOrgFieldName +from zitadel_client.models.beta_organization_service_org_id_filter import BetaOrganizationServiceOrgIDFilter +from zitadel_client.models.beta_organization_service_org_name_filter import BetaOrganizationServiceOrgNameFilter +from zitadel_client.models.beta_organization_service_org_state import BetaOrganizationServiceOrgState +from zitadel_client.models.beta_organization_service_org_state_filter import BetaOrganizationServiceOrgStateFilter +from zitadel_client.models.beta_organization_service_organization import BetaOrganizationServiceOrganization +from zitadel_client.models.beta_organization_service_organization_admin import BetaOrganizationServiceOrganizationAdmin +from zitadel_client.models.beta_organization_service_organization_search_filter import BetaOrganizationServiceOrganizationSearchFilter +from zitadel_client.models.beta_organization_service_pagination_request import BetaOrganizationServicePaginationRequest +from zitadel_client.models.beta_organization_service_pagination_response import BetaOrganizationServicePaginationResponse +from zitadel_client.models.beta_organization_service_password import BetaOrganizationServicePassword +from zitadel_client.models.beta_organization_service_send_email_verification_code import BetaOrganizationServiceSendEmailVerificationCode +from zitadel_client.models.beta_organization_service_set_human_email import BetaOrganizationServiceSetHumanEmail +from zitadel_client.models.beta_organization_service_set_human_phone import BetaOrganizationServiceSetHumanPhone +from zitadel_client.models.beta_organization_service_set_human_profile import BetaOrganizationServiceSetHumanProfile +from zitadel_client.models.beta_organization_service_set_metadata_entry import BetaOrganizationServiceSetMetadataEntry +from zitadel_client.models.beta_organization_service_set_organization_metadata_request import BetaOrganizationServiceSetOrganizationMetadataRequest +from zitadel_client.models.beta_organization_service_set_organization_metadata_response import BetaOrganizationServiceSetOrganizationMetadataResponse +from zitadel_client.models.beta_organization_service_text_query_method import BetaOrganizationServiceTextQueryMethod +from zitadel_client.models.beta_organization_service_update_organization_request import BetaOrganizationServiceUpdateOrganizationRequest +from zitadel_client.models.beta_organization_service_update_organization_response import BetaOrganizationServiceUpdateOrganizationResponse +from zitadel_client.models.beta_organization_service_verify_organization_domain_request import BetaOrganizationServiceVerifyOrganizationDomainRequest +from zitadel_client.models.beta_organization_service_verify_organization_domain_response import BetaOrganizationServiceVerifyOrganizationDomainResponse +from zitadel_client.models.beta_project_service_activate_project_grant_request import BetaProjectServiceActivateProjectGrantRequest +from zitadel_client.models.beta_project_service_activate_project_grant_response import BetaProjectServiceActivateProjectGrantResponse +from zitadel_client.models.beta_project_service_activate_project_request import BetaProjectServiceActivateProjectRequest +from zitadel_client.models.beta_project_service_activate_project_response import BetaProjectServiceActivateProjectResponse +from zitadel_client.models.beta_project_service_add_project_role_request import BetaProjectServiceAddProjectRoleRequest +from zitadel_client.models.beta_project_service_add_project_role_response import BetaProjectServiceAddProjectRoleResponse +from zitadel_client.models.beta_project_service_any import BetaProjectServiceAny +from zitadel_client.models.beta_project_service_connect_error import BetaProjectServiceConnectError +from zitadel_client.models.beta_project_service_create_project_grant_request import BetaProjectServiceCreateProjectGrantRequest +from zitadel_client.models.beta_project_service_create_project_grant_response import BetaProjectServiceCreateProjectGrantResponse +from zitadel_client.models.beta_project_service_create_project_request import BetaProjectServiceCreateProjectRequest +from zitadel_client.models.beta_project_service_create_project_response import BetaProjectServiceCreateProjectResponse +from zitadel_client.models.beta_project_service_deactivate_project_grant_request import BetaProjectServiceDeactivateProjectGrantRequest +from zitadel_client.models.beta_project_service_deactivate_project_grant_response import BetaProjectServiceDeactivateProjectGrantResponse +from zitadel_client.models.beta_project_service_deactivate_project_request import BetaProjectServiceDeactivateProjectRequest +from zitadel_client.models.beta_project_service_deactivate_project_response import BetaProjectServiceDeactivateProjectResponse +from zitadel_client.models.beta_project_service_delete_project_grant_request import BetaProjectServiceDeleteProjectGrantRequest +from zitadel_client.models.beta_project_service_delete_project_grant_response import BetaProjectServiceDeleteProjectGrantResponse +from zitadel_client.models.beta_project_service_delete_project_request import BetaProjectServiceDeleteProjectRequest +from zitadel_client.models.beta_project_service_delete_project_response import BetaProjectServiceDeleteProjectResponse +from zitadel_client.models.beta_project_service_get_project_request import BetaProjectServiceGetProjectRequest +from zitadel_client.models.beta_project_service_get_project_response import BetaProjectServiceGetProjectResponse +from zitadel_client.models.beta_project_service_granted_project_state import BetaProjectServiceGrantedProjectState +from zitadel_client.models.beta_project_service_id_filter import BetaProjectServiceIDFilter +from zitadel_client.models.beta_project_service_in_ids_filter import BetaProjectServiceInIDsFilter +from zitadel_client.models.beta_project_service_list_project_grants_request import BetaProjectServiceListProjectGrantsRequest +from zitadel_client.models.beta_project_service_list_project_grants_response import BetaProjectServiceListProjectGrantsResponse +from zitadel_client.models.beta_project_service_list_project_roles_request import BetaProjectServiceListProjectRolesRequest +from zitadel_client.models.beta_project_service_list_project_roles_response import BetaProjectServiceListProjectRolesResponse +from zitadel_client.models.beta_project_service_list_projects_request import BetaProjectServiceListProjectsRequest +from zitadel_client.models.beta_project_service_list_projects_response import BetaProjectServiceListProjectsResponse +from zitadel_client.models.beta_project_service_pagination_request import BetaProjectServicePaginationRequest +from zitadel_client.models.beta_project_service_pagination_response import BetaProjectServicePaginationResponse +from zitadel_client.models.beta_project_service_private_labeling_setting import BetaProjectServicePrivateLabelingSetting +from zitadel_client.models.beta_project_service_project import BetaProjectServiceProject +from zitadel_client.models.beta_project_service_project_field_name import BetaProjectServiceProjectFieldName +from zitadel_client.models.beta_project_service_project_grant import BetaProjectServiceProjectGrant +from zitadel_client.models.beta_project_service_project_grant_field_name import BetaProjectServiceProjectGrantFieldName +from zitadel_client.models.beta_project_service_project_grant_search_filter import BetaProjectServiceProjectGrantSearchFilter +from zitadel_client.models.beta_project_service_project_grant_state import BetaProjectServiceProjectGrantState +from zitadel_client.models.beta_project_service_project_name_filter import BetaProjectServiceProjectNameFilter +from zitadel_client.models.beta_project_service_project_role import BetaProjectServiceProjectRole +from zitadel_client.models.beta_project_service_project_role_display_name_filter import BetaProjectServiceProjectRoleDisplayNameFilter +from zitadel_client.models.beta_project_service_project_role_field_name import BetaProjectServiceProjectRoleFieldName +from zitadel_client.models.beta_project_service_project_role_key_filter import BetaProjectServiceProjectRoleKeyFilter +from zitadel_client.models.beta_project_service_project_role_search_filter import BetaProjectServiceProjectRoleSearchFilter +from zitadel_client.models.beta_project_service_project_search_filter import BetaProjectServiceProjectSearchFilter +from zitadel_client.models.beta_project_service_project_state import BetaProjectServiceProjectState +from zitadel_client.models.beta_project_service_remove_project_role_request import BetaProjectServiceRemoveProjectRoleRequest +from zitadel_client.models.beta_project_service_remove_project_role_response import BetaProjectServiceRemoveProjectRoleResponse +from zitadel_client.models.beta_project_service_text_filter_method import BetaProjectServiceTextFilterMethod +from zitadel_client.models.beta_project_service_update_project_grant_request import BetaProjectServiceUpdateProjectGrantRequest +from zitadel_client.models.beta_project_service_update_project_grant_response import BetaProjectServiceUpdateProjectGrantResponse +from zitadel_client.models.beta_project_service_update_project_request import BetaProjectServiceUpdateProjectRequest +from zitadel_client.models.beta_project_service_update_project_response import BetaProjectServiceUpdateProjectResponse +from zitadel_client.models.beta_project_service_update_project_role_request import BetaProjectServiceUpdateProjectRoleRequest +from zitadel_client.models.beta_project_service_update_project_role_response import BetaProjectServiceUpdateProjectRoleResponse +from zitadel_client.models.beta_session_service_any import BetaSessionServiceAny +from zitadel_client.models.beta_session_service_challenges import BetaSessionServiceChallenges +from zitadel_client.models.beta_session_service_check_idp_intent import BetaSessionServiceCheckIDPIntent +from zitadel_client.models.beta_session_service_check_otp import BetaSessionServiceCheckOTP +from zitadel_client.models.beta_session_service_check_password import BetaSessionServiceCheckPassword +from zitadel_client.models.beta_session_service_check_totp import BetaSessionServiceCheckTOTP +from zitadel_client.models.beta_session_service_check_user import BetaSessionServiceCheckUser +from zitadel_client.models.beta_session_service_check_web_auth_n import BetaSessionServiceCheckWebAuthN +from zitadel_client.models.beta_session_service_checks import BetaSessionServiceChecks +from zitadel_client.models.beta_session_service_connect_error import BetaSessionServiceConnectError +from zitadel_client.models.beta_session_service_create_session_request import BetaSessionServiceCreateSessionRequest +from zitadel_client.models.beta_session_service_create_session_response import BetaSessionServiceCreateSessionResponse +from zitadel_client.models.beta_session_service_creation_date_query import BetaSessionServiceCreationDateQuery +from zitadel_client.models.beta_session_service_delete_session_request import BetaSessionServiceDeleteSessionRequest +from zitadel_client.models.beta_session_service_delete_session_response import BetaSessionServiceDeleteSessionResponse +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails +from zitadel_client.models.beta_session_service_factors import BetaSessionServiceFactors +from zitadel_client.models.beta_session_service_get_session_request import BetaSessionServiceGetSessionRequest +from zitadel_client.models.beta_session_service_get_session_response import BetaSessionServiceGetSessionResponse +from zitadel_client.models.beta_session_service_header_values import BetaSessionServiceHeaderValues +from zitadel_client.models.beta_session_service_ids_query import BetaSessionServiceIDsQuery +from zitadel_client.models.beta_session_service_intent_factor import BetaSessionServiceIntentFactor +from zitadel_client.models.beta_session_service_list_details import BetaSessionServiceListDetails +from zitadel_client.models.beta_session_service_list_query import BetaSessionServiceListQuery +from zitadel_client.models.beta_session_service_list_sessions_request import BetaSessionServiceListSessionsRequest +from zitadel_client.models.beta_session_service_list_sessions_response import BetaSessionServiceListSessionsResponse +from zitadel_client.models.beta_session_service_otp_email import BetaSessionServiceOTPEmail +from zitadel_client.models.beta_session_service_otp_factor import BetaSessionServiceOTPFactor +from zitadel_client.models.beta_session_service_otpsms import BetaSessionServiceOTPSMS +from zitadel_client.models.beta_session_service_password_factor import BetaSessionServicePasswordFactor +from zitadel_client.models.beta_session_service_request_challenges import BetaSessionServiceRequestChallenges +from zitadel_client.models.beta_session_service_search_query import BetaSessionServiceSearchQuery +from zitadel_client.models.beta_session_service_send_code import BetaSessionServiceSendCode +from zitadel_client.models.beta_session_service_session import BetaSessionServiceSession +from zitadel_client.models.beta_session_service_session_field_name import BetaSessionServiceSessionFieldName +from zitadel_client.models.beta_session_service_set_session_request import BetaSessionServiceSetSessionRequest +from zitadel_client.models.beta_session_service_set_session_response import BetaSessionServiceSetSessionResponse +from zitadel_client.models.beta_session_service_totp_factor import BetaSessionServiceTOTPFactor +from zitadel_client.models.beta_session_service_timestamp_query_method import BetaSessionServiceTimestampQueryMethod +from zitadel_client.models.beta_session_service_user_agent import BetaSessionServiceUserAgent +from zitadel_client.models.beta_session_service_user_factor import BetaSessionServiceUserFactor +from zitadel_client.models.beta_session_service_user_id_query import BetaSessionServiceUserIDQuery +from zitadel_client.models.beta_session_service_user_verification_requirement import BetaSessionServiceUserVerificationRequirement +from zitadel_client.models.beta_session_service_web_auth_n import BetaSessionServiceWebAuthN +from zitadel_client.models.beta_session_service_web_auth_n_factor import BetaSessionServiceWebAuthNFactor +from zitadel_client.models.beta_settings_service_any import BetaSettingsServiceAny +from zitadel_client.models.beta_settings_service_branding_settings import BetaSettingsServiceBrandingSettings +from zitadel_client.models.beta_settings_service_connect_error import BetaSettingsServiceConnectError +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_domain_settings import BetaSettingsServiceDomainSettings +from zitadel_client.models.beta_settings_service_embedded_iframe_settings import BetaSettingsServiceEmbeddedIframeSettings +from zitadel_client.models.beta_settings_service_get_active_identity_providers_request import BetaSettingsServiceGetActiveIdentityProvidersRequest +from zitadel_client.models.beta_settings_service_get_active_identity_providers_response import BetaSettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.beta_settings_service_get_branding_settings_request import BetaSettingsServiceGetBrandingSettingsRequest +from zitadel_client.models.beta_settings_service_get_branding_settings_response import BetaSettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.beta_settings_service_get_domain_settings_request import BetaSettingsServiceGetDomainSettingsRequest +from zitadel_client.models.beta_settings_service_get_domain_settings_response import BetaSettingsServiceGetDomainSettingsResponse +from zitadel_client.models.beta_settings_service_get_general_settings_response import BetaSettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_request import BetaSettingsServiceGetLegalAndSupportSettingsRequest +from zitadel_client.models.beta_settings_service_get_legal_and_support_settings_response import BetaSettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.beta_settings_service_get_lockout_settings_request import BetaSettingsServiceGetLockoutSettingsRequest +from zitadel_client.models.beta_settings_service_get_lockout_settings_response import BetaSettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.beta_settings_service_get_login_settings_request import BetaSettingsServiceGetLoginSettingsRequest +from zitadel_client.models.beta_settings_service_get_login_settings_response import BetaSettingsServiceGetLoginSettingsResponse +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_request import BetaSettingsServiceGetPasswordComplexitySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_complexity_settings_response import BetaSettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_request import BetaSettingsServiceGetPasswordExpirySettingsRequest +from zitadel_client.models.beta_settings_service_get_password_expiry_settings_response import BetaSettingsServiceGetPasswordExpirySettingsResponse +from zitadel_client.models.beta_settings_service_get_security_settings_response import BetaSettingsServiceGetSecuritySettingsResponse +from zitadel_client.models.beta_settings_service_identity_provider import BetaSettingsServiceIdentityProvider +from zitadel_client.models.beta_settings_service_identity_provider_type import BetaSettingsServiceIdentityProviderType +from zitadel_client.models.beta_settings_service_legal_and_support_settings import BetaSettingsServiceLegalAndSupportSettings +from zitadel_client.models.beta_settings_service_list_details import BetaSettingsServiceListDetails +from zitadel_client.models.beta_settings_service_lockout_settings import BetaSettingsServiceLockoutSettings +from zitadel_client.models.beta_settings_service_login_settings import BetaSettingsServiceLoginSettings +from zitadel_client.models.beta_settings_service_multi_factor_type import BetaSettingsServiceMultiFactorType +from zitadel_client.models.beta_settings_service_passkeys_type import BetaSettingsServicePasskeysType +from zitadel_client.models.beta_settings_service_password_complexity_settings import BetaSettingsServicePasswordComplexitySettings +from zitadel_client.models.beta_settings_service_password_expiry_settings import BetaSettingsServicePasswordExpirySettings +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from zitadel_client.models.beta_settings_service_second_factor_type import BetaSettingsServiceSecondFactorType +from zitadel_client.models.beta_settings_service_security_settings import BetaSettingsServiceSecuritySettings +from zitadel_client.models.beta_settings_service_set_security_settings_request import BetaSettingsServiceSetSecuritySettingsRequest +from zitadel_client.models.beta_settings_service_set_security_settings_response import BetaSettingsServiceSetSecuritySettingsResponse +from zitadel_client.models.beta_settings_service_theme import BetaSettingsServiceTheme +from zitadel_client.models.beta_settings_service_theme_mode import BetaSettingsServiceThemeMode +from zitadel_client.models.beta_telemetry_service_any import BetaTelemetryServiceAny +from zitadel_client.models.beta_telemetry_service_connect_error import BetaTelemetryServiceConnectError +from zitadel_client.models.beta_telemetry_service_count_parent_type import BetaTelemetryServiceCountParentType +from zitadel_client.models.beta_telemetry_service_instance_information import BetaTelemetryServiceInstanceInformation +from zitadel_client.models.beta_telemetry_service_report_base_information_request import BetaTelemetryServiceReportBaseInformationRequest +from zitadel_client.models.beta_telemetry_service_report_base_information_response import BetaTelemetryServiceReportBaseInformationResponse +from zitadel_client.models.beta_telemetry_service_report_resource_counts_request import BetaTelemetryServiceReportResourceCountsRequest +from zitadel_client.models.beta_telemetry_service_report_resource_counts_response import BetaTelemetryServiceReportResourceCountsResponse +from zitadel_client.models.beta_telemetry_service_resource_count import BetaTelemetryServiceResourceCount +from zitadel_client.models.beta_user_service_access_token_type import BetaUserServiceAccessTokenType +from zitadel_client.models.beta_user_service_add_human_user_request import BetaUserServiceAddHumanUserRequest +from zitadel_client.models.beta_user_service_add_human_user_response import BetaUserServiceAddHumanUserResponse +from zitadel_client.models.beta_user_service_add_idp_link_request import BetaUserServiceAddIDPLinkRequest +from zitadel_client.models.beta_user_service_add_idp_link_response import BetaUserServiceAddIDPLinkResponse +from zitadel_client.models.beta_user_service_add_otp_email_request import BetaUserServiceAddOTPEmailRequest +from zitadel_client.models.beta_user_service_add_otp_email_response import BetaUserServiceAddOTPEmailResponse +from zitadel_client.models.beta_user_service_add_otpsms_request import BetaUserServiceAddOTPSMSRequest +from zitadel_client.models.beta_user_service_add_otpsms_response import BetaUserServiceAddOTPSMSResponse +from zitadel_client.models.beta_user_service_and_query import BetaUserServiceAndQuery +from zitadel_client.models.beta_user_service_any import BetaUserServiceAny +from zitadel_client.models.beta_user_service_authentication_method_type import BetaUserServiceAuthenticationMethodType +from zitadel_client.models.beta_user_service_connect_error import BetaUserServiceConnectError +from zitadel_client.models.beta_user_service_create_passkey_registration_link_request import BetaUserServiceCreatePasskeyRegistrationLinkRequest +from zitadel_client.models.beta_user_service_create_passkey_registration_link_response import BetaUserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.beta_user_service_deactivate_user_request import BetaUserServiceDeactivateUserRequest +from zitadel_client.models.beta_user_service_deactivate_user_response import BetaUserServiceDeactivateUserResponse +from zitadel_client.models.beta_user_service_delete_user_request import BetaUserServiceDeleteUserRequest +from zitadel_client.models.beta_user_service_delete_user_response import BetaUserServiceDeleteUserResponse +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_display_name_query import BetaUserServiceDisplayNameQuery +from zitadel_client.models.beta_user_service_email_query import BetaUserServiceEmailQuery +from zitadel_client.models.beta_user_service_first_name_query import BetaUserServiceFirstNameQuery +from zitadel_client.models.beta_user_service_form_data import BetaUserServiceFormData +from zitadel_client.models.beta_user_service_gender import BetaUserServiceGender +from zitadel_client.models.beta_user_service_get_user_by_id_request import BetaUserServiceGetUserByIDRequest +from zitadel_client.models.beta_user_service_get_user_by_id_response import BetaUserServiceGetUserByIDResponse +from zitadel_client.models.beta_user_service_hashed_password import BetaUserServiceHashedPassword +from zitadel_client.models.beta_user_service_human_email import BetaUserServiceHumanEmail +from zitadel_client.models.beta_user_service_human_phone import BetaUserServiceHumanPhone +from zitadel_client.models.beta_user_service_human_profile import BetaUserServiceHumanProfile +from zitadel_client.models.beta_user_service_human_user import BetaUserServiceHumanUser +from zitadel_client.models.beta_user_service_idp_information import BetaUserServiceIDPInformation +from zitadel_client.models.beta_user_service_idp_intent import BetaUserServiceIDPIntent +from zitadel_client.models.beta_user_service_idpldap_access_information import BetaUserServiceIDPLDAPAccessInformation +from zitadel_client.models.beta_user_service_idp_link import BetaUserServiceIDPLink +from zitadel_client.models.beta_user_service_idpo_auth_access_information import BetaUserServiceIDPOAuthAccessInformation +from zitadel_client.models.beta_user_service_idpsaml_access_information import BetaUserServiceIDPSAMLAccessInformation +from zitadel_client.models.beta_user_service_in_user_emails_query import BetaUserServiceInUserEmailsQuery +from zitadel_client.models.beta_user_service_in_user_id_query import BetaUserServiceInUserIDQuery +from zitadel_client.models.beta_user_service_ldap_credentials import BetaUserServiceLDAPCredentials +from zitadel_client.models.beta_user_service_last_name_query import BetaUserServiceLastNameQuery +from zitadel_client.models.beta_user_service_list_authentication_method_types_request import BetaUserServiceListAuthenticationMethodTypesRequest +from zitadel_client.models.beta_user_service_list_authentication_method_types_response import BetaUserServiceListAuthenticationMethodTypesResponse +from zitadel_client.models.beta_user_service_list_details import BetaUserServiceListDetails +from zitadel_client.models.beta_user_service_list_query import BetaUserServiceListQuery +from zitadel_client.models.beta_user_service_list_users_request import BetaUserServiceListUsersRequest +from zitadel_client.models.beta_user_service_list_users_response import BetaUserServiceListUsersResponse +from zitadel_client.models.beta_user_service_lock_user_request import BetaUserServiceLockUserRequest +from zitadel_client.models.beta_user_service_lock_user_response import BetaUserServiceLockUserResponse +from zitadel_client.models.beta_user_service_login_name_query import BetaUserServiceLoginNameQuery +from zitadel_client.models.beta_user_service_machine_user import BetaUserServiceMachineUser +from zitadel_client.models.beta_user_service_nick_name_query import BetaUserServiceNickNameQuery +from zitadel_client.models.beta_user_service_not_query import BetaUserServiceNotQuery +from zitadel_client.models.beta_user_service_notification_type import BetaUserServiceNotificationType +from zitadel_client.models.beta_user_service_or_query import BetaUserServiceOrQuery +from zitadel_client.models.beta_user_service_organization import BetaUserServiceOrganization +from zitadel_client.models.beta_user_service_organization_id_query import BetaUserServiceOrganizationIdQuery +from zitadel_client.models.beta_user_service_passkey_authenticator import BetaUserServicePasskeyAuthenticator +from zitadel_client.models.beta_user_service_passkey_registration_code import BetaUserServicePasskeyRegistrationCode +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from zitadel_client.models.beta_user_service_password_reset_request import BetaUserServicePasswordResetRequest +from zitadel_client.models.beta_user_service_password_reset_response import BetaUserServicePasswordResetResponse +from zitadel_client.models.beta_user_service_phone_query import BetaUserServicePhoneQuery +from zitadel_client.models.beta_user_service_reactivate_user_request import BetaUserServiceReactivateUserRequest +from zitadel_client.models.beta_user_service_reactivate_user_response import BetaUserServiceReactivateUserResponse +from zitadel_client.models.beta_user_service_redirect_urls import BetaUserServiceRedirectURLs +from zitadel_client.models.beta_user_service_register_passkey_request import BetaUserServiceRegisterPasskeyRequest +from zitadel_client.models.beta_user_service_register_passkey_response import BetaUserServiceRegisterPasskeyResponse +from zitadel_client.models.beta_user_service_register_totp_request import BetaUserServiceRegisterTOTPRequest +from zitadel_client.models.beta_user_service_register_totp_response import BetaUserServiceRegisterTOTPResponse +from zitadel_client.models.beta_user_service_register_u2_f_request import BetaUserServiceRegisterU2FRequest +from zitadel_client.models.beta_user_service_register_u2_f_response import BetaUserServiceRegisterU2FResponse +from zitadel_client.models.beta_user_service_remove_otp_email_request import BetaUserServiceRemoveOTPEmailRequest +from zitadel_client.models.beta_user_service_remove_otp_email_response import BetaUserServiceRemoveOTPEmailResponse +from zitadel_client.models.beta_user_service_remove_otpsms_request import BetaUserServiceRemoveOTPSMSRequest +from zitadel_client.models.beta_user_service_remove_otpsms_response import BetaUserServiceRemoveOTPSMSResponse +from zitadel_client.models.beta_user_service_remove_phone_request import BetaUserServiceRemovePhoneRequest +from zitadel_client.models.beta_user_service_remove_phone_response import BetaUserServiceRemovePhoneResponse +from zitadel_client.models.beta_user_service_remove_totp_request import BetaUserServiceRemoveTOTPRequest +from zitadel_client.models.beta_user_service_remove_totp_response import BetaUserServiceRemoveTOTPResponse +from zitadel_client.models.beta_user_service_resend_email_code_request import BetaUserServiceResendEmailCodeRequest +from zitadel_client.models.beta_user_service_resend_email_code_response import BetaUserServiceResendEmailCodeResponse +from zitadel_client.models.beta_user_service_resend_phone_code_request import BetaUserServiceResendPhoneCodeRequest +from zitadel_client.models.beta_user_service_resend_phone_code_response import BetaUserServiceResendPhoneCodeResponse +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_request import BetaUserServiceRetrieveIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_retrieve_identity_provider_intent_response import BetaUserServiceRetrieveIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +from zitadel_client.models.beta_user_service_send_email_verification_code import BetaUserServiceSendEmailVerificationCode +from zitadel_client.models.beta_user_service_send_passkey_registration_link import BetaUserServiceSendPasskeyRegistrationLink +from zitadel_client.models.beta_user_service_send_password_reset_link import BetaUserServiceSendPasswordResetLink +from zitadel_client.models.beta_user_service_set_email_request import BetaUserServiceSetEmailRequest +from zitadel_client.models.beta_user_service_set_email_response import BetaUserServiceSetEmailResponse +from zitadel_client.models.beta_user_service_set_human_email import BetaUserServiceSetHumanEmail +from zitadel_client.models.beta_user_service_set_human_phone import BetaUserServiceSetHumanPhone +from zitadel_client.models.beta_user_service_set_human_profile import BetaUserServiceSetHumanProfile +from zitadel_client.models.beta_user_service_set_metadata_entry import BetaUserServiceSetMetadataEntry +from zitadel_client.models.beta_user_service_set_password import BetaUserServiceSetPassword +from zitadel_client.models.beta_user_service_set_password_request import BetaUserServiceSetPasswordRequest +from zitadel_client.models.beta_user_service_set_password_response import BetaUserServiceSetPasswordResponse +from zitadel_client.models.beta_user_service_set_phone_request import BetaUserServiceSetPhoneRequest +from zitadel_client.models.beta_user_service_set_phone_response import BetaUserServiceSetPhoneResponse +from zitadel_client.models.beta_user_service_start_identity_provider_intent_request import BetaUserServiceStartIdentityProviderIntentRequest +from zitadel_client.models.beta_user_service_start_identity_provider_intent_response import BetaUserServiceStartIdentityProviderIntentResponse +from zitadel_client.models.beta_user_service_state_query import BetaUserServiceStateQuery +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from zitadel_client.models.beta_user_service_type import BetaUserServiceType +from zitadel_client.models.beta_user_service_type_query import BetaUserServiceTypeQuery +from zitadel_client.models.beta_user_service_unlock_user_request import BetaUserServiceUnlockUserRequest +from zitadel_client.models.beta_user_service_unlock_user_response import BetaUserServiceUnlockUserResponse +from zitadel_client.models.beta_user_service_update_human_user_request import BetaUserServiceUpdateHumanUserRequest +from zitadel_client.models.beta_user_service_update_human_user_response import BetaUserServiceUpdateHumanUserResponse +from zitadel_client.models.beta_user_service_user import BetaUserServiceUser +from zitadel_client.models.beta_user_service_user_field_name import BetaUserServiceUserFieldName +from zitadel_client.models.beta_user_service_user_name_query import BetaUserServiceUserNameQuery +from zitadel_client.models.beta_user_service_user_state import BetaUserServiceUserState +from zitadel_client.models.beta_user_service_verify_email_request import BetaUserServiceVerifyEmailRequest +from zitadel_client.models.beta_user_service_verify_email_response import BetaUserServiceVerifyEmailResponse +from zitadel_client.models.beta_user_service_verify_passkey_registration_request import BetaUserServiceVerifyPasskeyRegistrationRequest +from zitadel_client.models.beta_user_service_verify_passkey_registration_response import BetaUserServiceVerifyPasskeyRegistrationResponse +from zitadel_client.models.beta_user_service_verify_phone_request import BetaUserServiceVerifyPhoneRequest +from zitadel_client.models.beta_user_service_verify_phone_response import BetaUserServiceVerifyPhoneResponse +from zitadel_client.models.beta_user_service_verify_totp_registration_request import BetaUserServiceVerifyTOTPRegistrationRequest +from zitadel_client.models.beta_user_service_verify_totp_registration_response import BetaUserServiceVerifyTOTPRegistrationResponse +from zitadel_client.models.beta_user_service_verify_u2_f_registration_request import BetaUserServiceVerifyU2FRegistrationRequest +from zitadel_client.models.beta_user_service_verify_u2_f_registration_response import BetaUserServiceVerifyU2FRegistrationResponse +from zitadel_client.models.beta_web_key_service_activate_web_key_request import BetaWebKeyServiceActivateWebKeyRequest +from zitadel_client.models.beta_web_key_service_activate_web_key_response import BetaWebKeyServiceActivateWebKeyResponse +from zitadel_client.models.beta_web_key_service_any import BetaWebKeyServiceAny +from zitadel_client.models.beta_web_key_service_connect_error import BetaWebKeyServiceConnectError +from zitadel_client.models.beta_web_key_service_create_web_key_request import BetaWebKeyServiceCreateWebKeyRequest +from zitadel_client.models.beta_web_key_service_create_web_key_response import BetaWebKeyServiceCreateWebKeyResponse +from zitadel_client.models.beta_web_key_service_delete_web_key_request import BetaWebKeyServiceDeleteWebKeyRequest +from zitadel_client.models.beta_web_key_service_delete_web_key_response import BetaWebKeyServiceDeleteWebKeyResponse +from zitadel_client.models.beta_web_key_service_ecdsa import BetaWebKeyServiceECDSA +from zitadel_client.models.beta_web_key_service_ecdsa_curve import BetaWebKeyServiceECDSACurve +from zitadel_client.models.beta_web_key_service_list_web_keys_response import BetaWebKeyServiceListWebKeysResponse +from zitadel_client.models.beta_web_key_service_rsa import BetaWebKeyServiceRSA +from zitadel_client.models.beta_web_key_service_rsa_bits import BetaWebKeyServiceRSABits +from zitadel_client.models.beta_web_key_service_rsa_hasher import BetaWebKeyServiceRSAHasher +from zitadel_client.models.beta_web_key_service_state import BetaWebKeyServiceState +from zitadel_client.models.beta_web_key_service_web_key import BetaWebKeyServiceWebKey +from zitadel_client.models.feature_service_any import FeatureServiceAny +from zitadel_client.models.feature_service_connect_error import FeatureServiceConnectError from zitadel_client.models.feature_service_details import FeatureServiceDetails from zitadel_client.models.feature_service_feature_flag import FeatureServiceFeatureFlag +from zitadel_client.models.feature_service_get_instance_features_request import FeatureServiceGetInstanceFeaturesRequest from zitadel_client.models.feature_service_get_instance_features_response import FeatureServiceGetInstanceFeaturesResponse +from zitadel_client.models.feature_service_get_organization_features_request import FeatureServiceGetOrganizationFeaturesRequest from zitadel_client.models.feature_service_get_organization_features_response import FeatureServiceGetOrganizationFeaturesResponse from zitadel_client.models.feature_service_get_system_features_response import FeatureServiceGetSystemFeaturesResponse +from zitadel_client.models.feature_service_get_user_features_request import FeatureServiceGetUserFeaturesRequest from zitadel_client.models.feature_service_get_user_features_response import FeatureServiceGetUserFeaturesResponse from zitadel_client.models.feature_service_improved_performance import FeatureServiceImprovedPerformance from zitadel_client.models.feature_service_improved_performance_feature_flag import FeatureServiceImprovedPerformanceFeatureFlag from zitadel_client.models.feature_service_login_v2 import FeatureServiceLoginV2 from zitadel_client.models.feature_service_login_v2_feature_flag import FeatureServiceLoginV2FeatureFlag -from zitadel_client.models.feature_service_protobuf_any import FeatureServiceProtobufAny from zitadel_client.models.feature_service_reset_instance_features_response import FeatureServiceResetInstanceFeaturesResponse +from zitadel_client.models.feature_service_reset_organization_features_request import FeatureServiceResetOrganizationFeaturesRequest from zitadel_client.models.feature_service_reset_organization_features_response import FeatureServiceResetOrganizationFeaturesResponse from zitadel_client.models.feature_service_reset_system_features_response import FeatureServiceResetSystemFeaturesResponse +from zitadel_client.models.feature_service_reset_user_features_request import FeatureServiceResetUserFeaturesRequest from zitadel_client.models.feature_service_reset_user_features_response import FeatureServiceResetUserFeaturesResponse -from zitadel_client.models.feature_service_rpc_status import FeatureServiceRpcStatus from zitadel_client.models.feature_service_set_instance_features_request import FeatureServiceSetInstanceFeaturesRequest from zitadel_client.models.feature_service_set_instance_features_response import FeatureServiceSetInstanceFeaturesResponse +from zitadel_client.models.feature_service_set_organization_features_request import FeatureServiceSetOrganizationFeaturesRequest from zitadel_client.models.feature_service_set_organization_features_response import FeatureServiceSetOrganizationFeaturesResponse from zitadel_client.models.feature_service_set_system_features_request import FeatureServiceSetSystemFeaturesRequest from zitadel_client.models.feature_service_set_system_features_response import FeatureServiceSetSystemFeaturesResponse +from zitadel_client.models.feature_service_set_user_feature_request import FeatureServiceSetUserFeatureRequest from zitadel_client.models.feature_service_set_user_features_response import FeatureServiceSetUserFeaturesResponse from zitadel_client.models.feature_service_source import FeatureServiceSource +from zitadel_client.models.identity_provider_service_any import IdentityProviderServiceAny from zitadel_client.models.identity_provider_service_apple_config import IdentityProviderServiceAppleConfig from zitadel_client.models.identity_provider_service_auto_linking_option import IdentityProviderServiceAutoLinkingOption from zitadel_client.models.identity_provider_service_azure_ad_config import IdentityProviderServiceAzureADConfig from zitadel_client.models.identity_provider_service_azure_ad_tenant import IdentityProviderServiceAzureADTenant from zitadel_client.models.identity_provider_service_azure_ad_tenant_type import IdentityProviderServiceAzureADTenantType +from zitadel_client.models.identity_provider_service_connect_error import IdentityProviderServiceConnectError from zitadel_client.models.identity_provider_service_details import IdentityProviderServiceDetails from zitadel_client.models.identity_provider_service_generic_oidc_config import IdentityProviderServiceGenericOIDCConfig +from zitadel_client.models.identity_provider_service_get_idpby_id_request import IdentityProviderServiceGetIDPByIDRequest from zitadel_client.models.identity_provider_service_get_idpby_id_response import IdentityProviderServiceGetIDPByIDResponse from zitadel_client.models.identity_provider_service_git_hub_config import IdentityProviderServiceGitHubConfig from zitadel_client.models.identity_provider_service_git_hub_enterprise_server_config import IdentityProviderServiceGitHubEnterpriseServerConfig @@ -91,30 +665,32 @@ from zitadel_client.models.identity_provider_service_ldap_config import IdentityProviderServiceLDAPConfig from zitadel_client.models.identity_provider_service_o_auth_config import IdentityProviderServiceOAuthConfig from zitadel_client.models.identity_provider_service_options import IdentityProviderServiceOptions -from zitadel_client.models.identity_provider_service_protobuf_any import IdentityProviderServiceProtobufAny -from zitadel_client.models.identity_provider_service_rpc_status import IdentityProviderServiceRpcStatus from zitadel_client.models.identity_provider_service_saml_binding import IdentityProviderServiceSAMLBinding from zitadel_client.models.identity_provider_service_saml_config import IdentityProviderServiceSAMLConfig from zitadel_client.models.identity_provider_service_saml_name_id_format import IdentityProviderServiceSAMLNameIDFormat +from zitadel_client.models.oidc_service_any import OIDCServiceAny from zitadel_client.models.oidc_service_auth_request import OIDCServiceAuthRequest from zitadel_client.models.oidc_service_authorization_error import OIDCServiceAuthorizationError from zitadel_client.models.oidc_service_authorize_or_deny_device_authorization_request import OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest +from zitadel_client.models.oidc_service_connect_error import OIDCServiceConnectError from zitadel_client.models.oidc_service_create_callback_request import OIDCServiceCreateCallbackRequest from zitadel_client.models.oidc_service_create_callback_response import OIDCServiceCreateCallbackResponse from zitadel_client.models.oidc_service_details import OIDCServiceDetails from zitadel_client.models.oidc_service_device_authorization_request import OIDCServiceDeviceAuthorizationRequest from zitadel_client.models.oidc_service_error_reason import OIDCServiceErrorReason +from zitadel_client.models.oidc_service_get_auth_request_request import OIDCServiceGetAuthRequestRequest from zitadel_client.models.oidc_service_get_auth_request_response import OIDCServiceGetAuthRequestResponse +from zitadel_client.models.oidc_service_get_device_authorization_request_request import OIDCServiceGetDeviceAuthorizationRequestRequest from zitadel_client.models.oidc_service_get_device_authorization_request_response import OIDCServiceGetDeviceAuthorizationRequestResponse from zitadel_client.models.oidc_service_prompt import OIDCServicePrompt -from zitadel_client.models.oidc_service_protobuf_any import OIDCServiceProtobufAny -from zitadel_client.models.oidc_service_rpc_status import OIDCServiceRpcStatus from zitadel_client.models.oidc_service_session import OIDCServiceSession from zitadel_client.models.organization_service_add_human_user_request import OrganizationServiceAddHumanUserRequest from zitadel_client.models.organization_service_add_organization_request import OrganizationServiceAddOrganizationRequest -from zitadel_client.models.organization_service_add_organization_request_admin import OrganizationServiceAddOrganizationRequestAdmin from zitadel_client.models.organization_service_add_organization_response import OrganizationServiceAddOrganizationResponse -from zitadel_client.models.organization_service_add_organization_response_created_admin import OrganizationServiceAddOrganizationResponseCreatedAdmin +from zitadel_client.models.organization_service_admin import OrganizationServiceAdmin +from zitadel_client.models.organization_service_any import OrganizationServiceAny +from zitadel_client.models.organization_service_connect_error import OrganizationServiceConnectError +from zitadel_client.models.organization_service_created_admin import OrganizationServiceCreatedAdmin from zitadel_client.models.organization_service_details import OrganizationServiceDetails from zitadel_client.models.organization_service_gender import OrganizationServiceGender from zitadel_client.models.organization_service_hashed_password import OrganizationServiceHashedPassword @@ -123,6 +699,7 @@ from zitadel_client.models.organization_service_list_organizations_request import OrganizationServiceListOrganizationsRequest from zitadel_client.models.organization_service_list_organizations_response import OrganizationServiceListOrganizationsResponse from zitadel_client.models.organization_service_list_query import OrganizationServiceListQuery +from zitadel_client.models.organization_service_organization import OrganizationServiceOrganization from zitadel_client.models.organization_service_organization_domain_query import OrganizationServiceOrganizationDomainQuery from zitadel_client.models.organization_service_organization_field_name import OrganizationServiceOrganizationFieldName from zitadel_client.models.organization_service_organization_id_query import OrganizationServiceOrganizationIDQuery @@ -130,8 +707,6 @@ from zitadel_client.models.organization_service_organization_state import OrganizationServiceOrganizationState from zitadel_client.models.organization_service_organization_state_query import OrganizationServiceOrganizationStateQuery from zitadel_client.models.organization_service_password import OrganizationServicePassword -from zitadel_client.models.organization_service_protobuf_any import OrganizationServiceProtobufAny -from zitadel_client.models.organization_service_rpc_status import OrganizationServiceRpcStatus from zitadel_client.models.organization_service_search_query import OrganizationServiceSearchQuery from zitadel_client.models.organization_service_send_email_verification_code import OrganizationServiceSendEmailVerificationCode from zitadel_client.models.organization_service_set_human_email import OrganizationServiceSetHumanEmail @@ -139,19 +714,20 @@ from zitadel_client.models.organization_service_set_human_profile import OrganizationServiceSetHumanProfile from zitadel_client.models.organization_service_set_metadata_entry import OrganizationServiceSetMetadataEntry from zitadel_client.models.organization_service_text_query_method import OrganizationServiceTextQueryMethod +from zitadel_client.models.saml_service_any import SAMLServiceAny from zitadel_client.models.saml_service_authorization_error import SAMLServiceAuthorizationError +from zitadel_client.models.saml_service_connect_error import SAMLServiceConnectError from zitadel_client.models.saml_service_create_response_request import SAMLServiceCreateResponseRequest from zitadel_client.models.saml_service_create_response_response import SAMLServiceCreateResponseResponse from zitadel_client.models.saml_service_details import SAMLServiceDetails from zitadel_client.models.saml_service_error_reason import SAMLServiceErrorReason +from zitadel_client.models.saml_service_get_saml_request_request import SAMLServiceGetSAMLRequestRequest from zitadel_client.models.saml_service_get_saml_request_response import SAMLServiceGetSAMLRequestResponse from zitadel_client.models.saml_service_post_response import SAMLServicePostResponse -from zitadel_client.models.saml_service_protobuf_any import SAMLServiceProtobufAny -from zitadel_client.models.saml_service_rpc_status import SAMLServiceRpcStatus from zitadel_client.models.saml_service_saml_request import SAMLServiceSAMLRequest from zitadel_client.models.saml_service_session import SAMLServiceSession +from zitadel_client.models.session_service_any import SessionServiceAny from zitadel_client.models.session_service_challenges import SessionServiceChallenges -from zitadel_client.models.session_service_challenges_web_auth_n import SessionServiceChallengesWebAuthN from zitadel_client.models.session_service_check_idp_intent import SessionServiceCheckIDPIntent from zitadel_client.models.session_service_check_otp import SessionServiceCheckOTP from zitadel_client.models.session_service_check_password import SessionServiceCheckPassword @@ -159,6 +735,7 @@ from zitadel_client.models.session_service_check_user import SessionServiceCheckUser from zitadel_client.models.session_service_check_web_auth_n import SessionServiceCheckWebAuthN from zitadel_client.models.session_service_checks import SessionServiceChecks +from zitadel_client.models.session_service_connect_error import SessionServiceConnectError from zitadel_client.models.session_service_create_session_request import SessionServiceCreateSessionRequest from zitadel_client.models.session_service_create_session_response import SessionServiceCreateSessionResponse from zitadel_client.models.session_service_creation_date_query import SessionServiceCreationDateQuery @@ -167,23 +744,22 @@ from zitadel_client.models.session_service_delete_session_response import SessionServiceDeleteSessionResponse from zitadel_client.models.session_service_details import SessionServiceDetails from zitadel_client.models.session_service_factors import SessionServiceFactors +from zitadel_client.models.session_service_get_session_request import SessionServiceGetSessionRequest from zitadel_client.models.session_service_get_session_response import SessionServiceGetSessionResponse +from zitadel_client.models.session_service_header_values import SessionServiceHeaderValues from zitadel_client.models.session_service_ids_query import SessionServiceIDsQuery from zitadel_client.models.session_service_intent_factor import SessionServiceIntentFactor from zitadel_client.models.session_service_list_details import SessionServiceListDetails from zitadel_client.models.session_service_list_query import SessionServiceListQuery from zitadel_client.models.session_service_list_sessions_request import SessionServiceListSessionsRequest from zitadel_client.models.session_service_list_sessions_response import SessionServiceListSessionsResponse -from zitadel_client.models.session_service_otp_email_send_code import SessionServiceOTPEmailSendCode +from zitadel_client.models.session_service_otp_email import SessionServiceOTPEmail from zitadel_client.models.session_service_otp_factor import SessionServiceOTPFactor +from zitadel_client.models.session_service_otpsms import SessionServiceOTPSMS from zitadel_client.models.session_service_password_factor import SessionServicePasswordFactor -from zitadel_client.models.session_service_protobuf_any import SessionServiceProtobufAny from zitadel_client.models.session_service_request_challenges import SessionServiceRequestChallenges -from zitadel_client.models.session_service_request_challenges_otp_email import SessionServiceRequestChallengesOTPEmail -from zitadel_client.models.session_service_request_challenges_otpsms import SessionServiceRequestChallengesOTPSMS -from zitadel_client.models.session_service_request_challenges_web_auth_n import SessionServiceRequestChallengesWebAuthN -from zitadel_client.models.session_service_rpc_status import SessionServiceRpcStatus from zitadel_client.models.session_service_search_query import SessionServiceSearchQuery +from zitadel_client.models.session_service_send_code import SessionServiceSendCode from zitadel_client.models.session_service_session import SessionServiceSession from zitadel_client.models.session_service_session_field_name import SessionServiceSessionFieldName from zitadel_client.models.session_service_set_session_request import SessionServiceSetSessionRequest @@ -191,25 +767,37 @@ from zitadel_client.models.session_service_totp_factor import SessionServiceTOTPFactor from zitadel_client.models.session_service_timestamp_query_method import SessionServiceTimestampQueryMethod from zitadel_client.models.session_service_user_agent import SessionServiceUserAgent -from zitadel_client.models.session_service_user_agent_header_values import SessionServiceUserAgentHeaderValues from zitadel_client.models.session_service_user_agent_query import SessionServiceUserAgentQuery from zitadel_client.models.session_service_user_factor import SessionServiceUserFactor from zitadel_client.models.session_service_user_id_query import SessionServiceUserIDQuery from zitadel_client.models.session_service_user_verification_requirement import SessionServiceUserVerificationRequirement +from zitadel_client.models.session_service_web_auth_n import SessionServiceWebAuthN from zitadel_client.models.session_service_web_auth_n_factor import SessionServiceWebAuthNFactor +from zitadel_client.models.settings_service_any import SettingsServiceAny from zitadel_client.models.settings_service_auto_linking_option import SettingsServiceAutoLinkingOption from zitadel_client.models.settings_service_branding_settings import SettingsServiceBrandingSettings +from zitadel_client.models.settings_service_connect_error import SettingsServiceConnectError from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_domain_settings import SettingsServiceDomainSettings from zitadel_client.models.settings_service_embedded_iframe_settings import SettingsServiceEmbeddedIframeSettings +from zitadel_client.models.settings_service_get_active_identity_providers_request import SettingsServiceGetActiveIdentityProvidersRequest from zitadel_client.models.settings_service_get_active_identity_providers_response import SettingsServiceGetActiveIdentityProvidersResponse +from zitadel_client.models.settings_service_get_branding_settings_request import SettingsServiceGetBrandingSettingsRequest from zitadel_client.models.settings_service_get_branding_settings_response import SettingsServiceGetBrandingSettingsResponse +from zitadel_client.models.settings_service_get_domain_settings_request import SettingsServiceGetDomainSettingsRequest from zitadel_client.models.settings_service_get_domain_settings_response import SettingsServiceGetDomainSettingsResponse from zitadel_client.models.settings_service_get_general_settings_response import SettingsServiceGetGeneralSettingsResponse +from zitadel_client.models.settings_service_get_hosted_login_translation_request import SettingsServiceGetHostedLoginTranslationRequest +from zitadel_client.models.settings_service_get_hosted_login_translation_response import SettingsServiceGetHostedLoginTranslationResponse +from zitadel_client.models.settings_service_get_legal_and_support_settings_request import SettingsServiceGetLegalAndSupportSettingsRequest from zitadel_client.models.settings_service_get_legal_and_support_settings_response import SettingsServiceGetLegalAndSupportSettingsResponse +from zitadel_client.models.settings_service_get_lockout_settings_request import SettingsServiceGetLockoutSettingsRequest from zitadel_client.models.settings_service_get_lockout_settings_response import SettingsServiceGetLockoutSettingsResponse +from zitadel_client.models.settings_service_get_login_settings_request import SettingsServiceGetLoginSettingsRequest from zitadel_client.models.settings_service_get_login_settings_response import SettingsServiceGetLoginSettingsResponse +from zitadel_client.models.settings_service_get_password_complexity_settings_request import SettingsServiceGetPasswordComplexitySettingsRequest from zitadel_client.models.settings_service_get_password_complexity_settings_response import SettingsServiceGetPasswordComplexitySettingsResponse +from zitadel_client.models.settings_service_get_password_expiry_settings_request import SettingsServiceGetPasswordExpirySettingsRequest from zitadel_client.models.settings_service_get_password_expiry_settings_response import SettingsServiceGetPasswordExpirySettingsResponse from zitadel_client.models.settings_service_get_security_settings_response import SettingsServiceGetSecuritySettingsResponse from zitadel_client.models.settings_service_identity_provider import SettingsServiceIdentityProvider @@ -223,11 +811,12 @@ from zitadel_client.models.settings_service_passkeys_type import SettingsServicePasskeysType from zitadel_client.models.settings_service_password_complexity_settings import SettingsServicePasswordComplexitySettings from zitadel_client.models.settings_service_password_expiry_settings import SettingsServicePasswordExpirySettings -from zitadel_client.models.settings_service_protobuf_any import SettingsServiceProtobufAny +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType -from zitadel_client.models.settings_service_rpc_status import SettingsServiceRpcStatus from zitadel_client.models.settings_service_second_factor_type import SettingsServiceSecondFactorType from zitadel_client.models.settings_service_security_settings import SettingsServiceSecuritySettings +from zitadel_client.models.settings_service_set_hosted_login_translation_request import SettingsServiceSetHostedLoginTranslationRequest +from zitadel_client.models.settings_service_set_hosted_login_translation_response import SettingsServiceSetHostedLoginTranslationResponse from zitadel_client.models.settings_service_set_security_settings_request import SettingsServiceSetSecuritySettingsRequest from zitadel_client.models.settings_service_set_security_settings_response import SettingsServiceSetSecuritySettingsResponse from zitadel_client.models.settings_service_theme import SettingsServiceTheme @@ -237,31 +826,54 @@ from zitadel_client.models.user_service_add_human_user_response import UserServiceAddHumanUserResponse from zitadel_client.models.user_service_add_idp_link_request import UserServiceAddIDPLinkRequest from zitadel_client.models.user_service_add_idp_link_response import UserServiceAddIDPLinkResponse +from zitadel_client.models.user_service_add_key_request import UserServiceAddKeyRequest +from zitadel_client.models.user_service_add_key_response import UserServiceAddKeyResponse +from zitadel_client.models.user_service_add_otp_email_request import UserServiceAddOTPEmailRequest from zitadel_client.models.user_service_add_otp_email_response import UserServiceAddOTPEmailResponse +from zitadel_client.models.user_service_add_otpsms_request import UserServiceAddOTPSMSRequest from zitadel_client.models.user_service_add_otpsms_response import UserServiceAddOTPSMSResponse +from zitadel_client.models.user_service_add_personal_access_token_request import UserServiceAddPersonalAccessTokenRequest +from zitadel_client.models.user_service_add_personal_access_token_response import UserServiceAddPersonalAccessTokenResponse +from zitadel_client.models.user_service_add_secret_request import UserServiceAddSecretRequest +from zitadel_client.models.user_service_add_secret_response import UserServiceAddSecretResponse from zitadel_client.models.user_service_and_query import UserServiceAndQuery +from zitadel_client.models.user_service_any import UserServiceAny from zitadel_client.models.user_service_auth_factor import UserServiceAuthFactor from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState from zitadel_client.models.user_service_auth_factor_u2_f import UserServiceAuthFactorU2F +from zitadel_client.models.user_service_auth_factors import UserServiceAuthFactors from zitadel_client.models.user_service_authentication_method_type import UserServiceAuthenticationMethodType +from zitadel_client.models.user_service_connect_error import UserServiceConnectError from zitadel_client.models.user_service_create_invite_code_request import UserServiceCreateInviteCodeRequest from zitadel_client.models.user_service_create_invite_code_response import UserServiceCreateInviteCodeResponse from zitadel_client.models.user_service_create_passkey_registration_link_request import UserServiceCreatePasskeyRegistrationLinkRequest from zitadel_client.models.user_service_create_passkey_registration_link_response import UserServiceCreatePasskeyRegistrationLinkResponse +from zitadel_client.models.user_service_create_user_request import UserServiceCreateUserRequest +from zitadel_client.models.user_service_create_user_response import UserServiceCreateUserResponse +from zitadel_client.models.user_service_deactivate_user_request import UserServiceDeactivateUserRequest from zitadel_client.models.user_service_deactivate_user_response import UserServiceDeactivateUserResponse +from zitadel_client.models.user_service_delete_user_metadata_request import UserServiceDeleteUserMetadataRequest +from zitadel_client.models.user_service_delete_user_metadata_response import UserServiceDeleteUserMetadataResponse +from zitadel_client.models.user_service_delete_user_request import UserServiceDeleteUserRequest from zitadel_client.models.user_service_delete_user_response import UserServiceDeleteUserResponse from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_display_name_query import UserServiceDisplayNameQuery +from zitadel_client.models.user_service_domain_query import UserServiceDomainQuery from zitadel_client.models.user_service_email_query import UserServiceEmailQuery from zitadel_client.models.user_service_first_name_query import UserServiceFirstNameQuery +from zitadel_client.models.user_service_form_data import UserServiceFormData from zitadel_client.models.user_service_gender import UserServiceGender +from zitadel_client.models.user_service_get_user_by_id_request import UserServiceGetUserByIDRequest from zitadel_client.models.user_service_get_user_by_id_response import UserServiceGetUserByIDResponse from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword +from zitadel_client.models.user_service_human import UserServiceHuman from zitadel_client.models.user_service_human_email import UserServiceHumanEmail +from zitadel_client.models.user_service_human_mfa_init_skipped_request import UserServiceHumanMFAInitSkippedRequest from zitadel_client.models.user_service_human_mfa_init_skipped_response import UserServiceHumanMFAInitSkippedResponse from zitadel_client.models.user_service_human_phone import UserServiceHumanPhone from zitadel_client.models.user_service_human_profile import UserServiceHumanProfile from zitadel_client.models.user_service_human_user import UserServiceHumanUser +from zitadel_client.models.user_service_id_filter import UserServiceIDFilter from zitadel_client.models.user_service_idp_information import UserServiceIDPInformation from zitadel_client.models.user_service_idp_intent import UserServiceIDPIntent from zitadel_client.models.user_service_idpldap_access_information import UserServiceIDPLDAPAccessInformation @@ -270,56 +882,93 @@ from zitadel_client.models.user_service_idpsaml_access_information import UserServiceIDPSAMLAccessInformation from zitadel_client.models.user_service_in_user_emails_query import UserServiceInUserEmailsQuery from zitadel_client.models.user_service_in_user_id_query import UserServiceInUserIDQuery +from zitadel_client.models.user_service_key import UserServiceKey +from zitadel_client.models.user_service_key_field_name import UserServiceKeyFieldName +from zitadel_client.models.user_service_keys_search_filter import UserServiceKeysSearchFilter from zitadel_client.models.user_service_ldap_credentials import UserServiceLDAPCredentials from zitadel_client.models.user_service_last_name_query import UserServiceLastNameQuery +from zitadel_client.models.user_service_list_authentication_factors_request import UserServiceListAuthenticationFactorsRequest from zitadel_client.models.user_service_list_authentication_factors_response import UserServiceListAuthenticationFactorsResponse +from zitadel_client.models.user_service_list_authentication_method_types_request import UserServiceListAuthenticationMethodTypesRequest from zitadel_client.models.user_service_list_authentication_method_types_response import UserServiceListAuthenticationMethodTypesResponse from zitadel_client.models.user_service_list_details import UserServiceListDetails from zitadel_client.models.user_service_list_idp_links_request import UserServiceListIDPLinksRequest from zitadel_client.models.user_service_list_idp_links_response import UserServiceListIDPLinksResponse +from zitadel_client.models.user_service_list_keys_request import UserServiceListKeysRequest +from zitadel_client.models.user_service_list_keys_response import UserServiceListKeysResponse +from zitadel_client.models.user_service_list_passkeys_request import UserServiceListPasskeysRequest from zitadel_client.models.user_service_list_passkeys_response import UserServiceListPasskeysResponse +from zitadel_client.models.user_service_list_personal_access_tokens_request import UserServiceListPersonalAccessTokensRequest +from zitadel_client.models.user_service_list_personal_access_tokens_response import UserServiceListPersonalAccessTokensResponse from zitadel_client.models.user_service_list_query import UserServiceListQuery +from zitadel_client.models.user_service_list_user_metadata_request import UserServiceListUserMetadataRequest +from zitadel_client.models.user_service_list_user_metadata_response import UserServiceListUserMetadataResponse from zitadel_client.models.user_service_list_users_request import UserServiceListUsersRequest from zitadel_client.models.user_service_list_users_response import UserServiceListUsersResponse +from zitadel_client.models.user_service_lock_user_request import UserServiceLockUserRequest from zitadel_client.models.user_service_lock_user_response import UserServiceLockUserResponse from zitadel_client.models.user_service_login_name_query import UserServiceLoginNameQuery +from zitadel_client.models.user_service_machine import UserServiceMachine from zitadel_client.models.user_service_machine_user import UserServiceMachineUser +from zitadel_client.models.user_service_metadata import UserServiceMetadata +from zitadel_client.models.user_service_metadata_key_filter import UserServiceMetadataKeyFilter +from zitadel_client.models.user_service_metadata_search_filter import UserServiceMetadataSearchFilter from zitadel_client.models.user_service_nick_name_query import UserServiceNickNameQuery from zitadel_client.models.user_service_not_query import UserServiceNotQuery from zitadel_client.models.user_service_notification_type import UserServiceNotificationType from zitadel_client.models.user_service_or_query import UserServiceOrQuery from zitadel_client.models.user_service_organization import UserServiceOrganization from zitadel_client.models.user_service_organization_id_query import UserServiceOrganizationIdQuery +from zitadel_client.models.user_service_pagination_request import UserServicePaginationRequest +from zitadel_client.models.user_service_pagination_response import UserServicePaginationResponse from zitadel_client.models.user_service_passkey import UserServicePasskey from zitadel_client.models.user_service_passkey_authenticator import UserServicePasskeyAuthenticator from zitadel_client.models.user_service_passkey_registration_code import UserServicePasskeyRegistrationCode from zitadel_client.models.user_service_password import UserServicePassword from zitadel_client.models.user_service_password_reset_request import UserServicePasswordResetRequest from zitadel_client.models.user_service_password_reset_response import UserServicePasswordResetResponse +from zitadel_client.models.user_service_personal_access_token import UserServicePersonalAccessToken +from zitadel_client.models.user_service_personal_access_token_field_name import UserServicePersonalAccessTokenFieldName +from zitadel_client.models.user_service_personal_access_tokens_search_filter import UserServicePersonalAccessTokensSearchFilter from zitadel_client.models.user_service_phone_query import UserServicePhoneQuery -from zitadel_client.models.user_service_protobuf_any import UserServiceProtobufAny +from zitadel_client.models.user_service_profile import UserServiceProfile +from zitadel_client.models.user_service_reactivate_user_request import UserServiceReactivateUserRequest from zitadel_client.models.user_service_reactivate_user_response import UserServiceReactivateUserResponse from zitadel_client.models.user_service_redirect_urls import UserServiceRedirectURLs from zitadel_client.models.user_service_register_passkey_request import UserServiceRegisterPasskeyRequest from zitadel_client.models.user_service_register_passkey_response import UserServiceRegisterPasskeyResponse +from zitadel_client.models.user_service_register_totp_request import UserServiceRegisterTOTPRequest from zitadel_client.models.user_service_register_totp_response import UserServiceRegisterTOTPResponse from zitadel_client.models.user_service_register_u2_f_request import UserServiceRegisterU2FRequest from zitadel_client.models.user_service_register_u2_f_response import UserServiceRegisterU2FResponse +from zitadel_client.models.user_service_remove_idp_link_request import UserServiceRemoveIDPLinkRequest from zitadel_client.models.user_service_remove_idp_link_response import UserServiceRemoveIDPLinkResponse +from zitadel_client.models.user_service_remove_key_request import UserServiceRemoveKeyRequest +from zitadel_client.models.user_service_remove_key_response import UserServiceRemoveKeyResponse +from zitadel_client.models.user_service_remove_otp_email_request import UserServiceRemoveOTPEmailRequest from zitadel_client.models.user_service_remove_otp_email_response import UserServiceRemoveOTPEmailResponse +from zitadel_client.models.user_service_remove_otpsms_request import UserServiceRemoveOTPSMSRequest from zitadel_client.models.user_service_remove_otpsms_response import UserServiceRemoveOTPSMSResponse +from zitadel_client.models.user_service_remove_passkey_request import UserServiceRemovePasskeyRequest from zitadel_client.models.user_service_remove_passkey_response import UserServiceRemovePasskeyResponse +from zitadel_client.models.user_service_remove_personal_access_token_request import UserServiceRemovePersonalAccessTokenRequest +from zitadel_client.models.user_service_remove_personal_access_token_response import UserServiceRemovePersonalAccessTokenResponse +from zitadel_client.models.user_service_remove_phone_request import UserServiceRemovePhoneRequest from zitadel_client.models.user_service_remove_phone_response import UserServiceRemovePhoneResponse +from zitadel_client.models.user_service_remove_secret_request import UserServiceRemoveSecretRequest +from zitadel_client.models.user_service_remove_secret_response import UserServiceRemoveSecretResponse +from zitadel_client.models.user_service_remove_totp_request import UserServiceRemoveTOTPRequest from zitadel_client.models.user_service_remove_totp_response import UserServiceRemoveTOTPResponse +from zitadel_client.models.user_service_remove_u2_f_request import UserServiceRemoveU2FRequest from zitadel_client.models.user_service_remove_u2_f_response import UserServiceRemoveU2FResponse from zitadel_client.models.user_service_resend_email_code_request import UserServiceResendEmailCodeRequest from zitadel_client.models.user_service_resend_email_code_response import UserServiceResendEmailCodeResponse +from zitadel_client.models.user_service_resend_invite_code_request import UserServiceResendInviteCodeRequest from zitadel_client.models.user_service_resend_invite_code_response import UserServiceResendInviteCodeResponse from zitadel_client.models.user_service_resend_phone_code_request import UserServiceResendPhoneCodeRequest from zitadel_client.models.user_service_resend_phone_code_response import UserServiceResendPhoneCodeResponse from zitadel_client.models.user_service_retrieve_identity_provider_intent_request import UserServiceRetrieveIdentityProviderIntentRequest from zitadel_client.models.user_service_retrieve_identity_provider_intent_response import UserServiceRetrieveIdentityProviderIntentResponse -from zitadel_client.models.user_service_rpc_status import UserServiceRpcStatus from zitadel_client.models.user_service_search_query import UserServiceSearchQuery from zitadel_client.models.user_service_send_email_code_request import UserServiceSendEmailCodeRequest from zitadel_client.models.user_service_send_email_code_response import UserServiceSendEmailCodeResponse @@ -338,15 +987,23 @@ from zitadel_client.models.user_service_set_password_response import UserServiceSetPasswordResponse from zitadel_client.models.user_service_set_phone_request import UserServiceSetPhoneRequest from zitadel_client.models.user_service_set_phone_response import UserServiceSetPhoneResponse +from zitadel_client.models.user_service_set_user_metadata_request import UserServiceSetUserMetadataRequest +from zitadel_client.models.user_service_set_user_metadata_response import UserServiceSetUserMetadataResponse from zitadel_client.models.user_service_start_identity_provider_intent_request import UserServiceStartIdentityProviderIntentRequest from zitadel_client.models.user_service_start_identity_provider_intent_response import UserServiceStartIdentityProviderIntentResponse from zitadel_client.models.user_service_state_query import UserServiceStateQuery +from zitadel_client.models.user_service_text_filter_method import UserServiceTextFilterMethod from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod +from zitadel_client.models.user_service_timestamp_filter import UserServiceTimestampFilter +from zitadel_client.models.user_service_timestamp_filter_method import UserServiceTimestampFilterMethod from zitadel_client.models.user_service_type import UserServiceType from zitadel_client.models.user_service_type_query import UserServiceTypeQuery +from zitadel_client.models.user_service_unlock_user_request import UserServiceUnlockUserRequest from zitadel_client.models.user_service_unlock_user_response import UserServiceUnlockUserResponse from zitadel_client.models.user_service_update_human_user_request import UserServiceUpdateHumanUserRequest from zitadel_client.models.user_service_update_human_user_response import UserServiceUpdateHumanUserResponse +from zitadel_client.models.user_service_update_user_request import UserServiceUpdateUserRequest +from zitadel_client.models.user_service_update_user_response import UserServiceUpdateUserResponse from zitadel_client.models.user_service_user import UserServiceUser from zitadel_client.models.user_service_user_field_name import UserServiceUserFieldName from zitadel_client.models.user_service_user_name_query import UserServiceUserNameQuery @@ -363,19 +1020,19 @@ from zitadel_client.models.user_service_verify_totp_registration_response import UserServiceVerifyTOTPRegistrationResponse from zitadel_client.models.user_service_verify_u2_f_registration_request import UserServiceVerifyU2FRegistrationRequest from zitadel_client.models.user_service_verify_u2_f_registration_response import UserServiceVerifyU2FRegistrationResponse -from zitadel_client.models.web_key_service_beta_activate_web_key_response import WebKeyServiceBetaActivateWebKeyResponse -from zitadel_client.models.web_key_service_beta_create_web_key_response import WebKeyServiceBetaCreateWebKeyResponse -from zitadel_client.models.web_key_service_beta_delete_web_key_response import WebKeyServiceBetaDeleteWebKeyResponse -from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA -from zitadel_client.models.web_key_service_beta_ecdsa_curve import WebKeyServiceBetaECDSACurve -from zitadel_client.models.web_key_service_beta_list_web_keys_response import WebKeyServiceBetaListWebKeysResponse -from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA -from zitadel_client.models.web_key_service_beta_rsa_bits import WebKeyServiceBetaRSABits -from zitadel_client.models.web_key_service_beta_rsa_hasher import WebKeyServiceBetaRSAHasher -from zitadel_client.models.web_key_service_beta_state import WebKeyServiceBetaState -from zitadel_client.models.web_key_service_beta_web_key import WebKeyServiceBetaWebKey +from zitadel_client.models.web_key_service_activate_web_key_request import WebKeyServiceActivateWebKeyRequest +from zitadel_client.models.web_key_service_activate_web_key_response import WebKeyServiceActivateWebKeyResponse +from zitadel_client.models.web_key_service_any import WebKeyServiceAny +from zitadel_client.models.web_key_service_connect_error import WebKeyServiceConnectError from zitadel_client.models.web_key_service_create_web_key_request import WebKeyServiceCreateWebKeyRequest -from zitadel_client.models.web_key_service_protobuf_any import WebKeyServiceProtobufAny -from zitadel_client.models.web_key_service_rpc_status import WebKeyServiceRpcStatus -from zitadel_client.models.zitadelobjectv2_organization import Zitadelobjectv2Organization -from zitadel_client.models.zitadelorgv2_organization import Zitadelorgv2Organization +from zitadel_client.models.web_key_service_create_web_key_response import WebKeyServiceCreateWebKeyResponse +from zitadel_client.models.web_key_service_delete_web_key_request import WebKeyServiceDeleteWebKeyRequest +from zitadel_client.models.web_key_service_delete_web_key_response import WebKeyServiceDeleteWebKeyResponse +from zitadel_client.models.web_key_service_ecdsa import WebKeyServiceECDSA +from zitadel_client.models.web_key_service_ecdsa_curve import WebKeyServiceECDSACurve +from zitadel_client.models.web_key_service_list_web_keys_response import WebKeyServiceListWebKeysResponse +from zitadel_client.models.web_key_service_rsa import WebKeyServiceRSA +from zitadel_client.models.web_key_service_rsa_bits import WebKeyServiceRSABits +from zitadel_client.models.web_key_service_rsa_hasher import WebKeyServiceRSAHasher +from zitadel_client.models.web_key_service_state import WebKeyServiceState +from zitadel_client.models.web_key_service_web_key import WebKeyServiceWebKey diff --git a/zitadel_client/models/action_service_beta_target.py b/zitadel_client/models/action_service_beta_target.py deleted file mode 100644 index 9c22e516..00000000 --- a/zitadel_client/models/action_service_beta_target.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceBetaTarget(BaseModel): - """ - ActionServiceBetaTarget - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the target.") - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the target creation.", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the target (e.g. creation, activation, deactivation).", alias="changeDate") - name: Optional[StrictStr] = None - rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") - rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") - rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") - timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, the the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") - endpoint: Optional[StrictStr] = None - signing_key: Optional[StrictStr] = Field(default=None, alias="signingKey") - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaTarget from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaTarget from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint"), - "signingKey": obj.get("signingKey") - }) - return _obj - - diff --git a/zitadel_client/models/action_service_create_target_request.py b/zitadel_client/models/action_service_create_target_request.py deleted file mode 100644 index 8264c755..00000000 --- a/zitadel_client/models/action_service_create_target_request.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceCreateTargetRequest(BaseModel): - """ - ActionServiceCreateTargetRequest - """ # noqa: E501 - name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") - rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") - rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") - timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") - endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceCreateTargetRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceCreateTargetRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint") - }) - return _obj - - diff --git a/zitadel_client/models/action_service_update_target_request.py b/zitadel_client/models/action_service_update_target_request.py deleted file mode 100644 index 774add03..00000000 --- a/zitadel_client/models/action_service_update_target_request.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall -from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook -from typing import Optional, Set -from typing_extensions import Self - -class ActionServiceUpdateTargetRequest(BaseModel): - """ - ActionServiceUpdateTargetRequest - """ # noqa: E501 - name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") - rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") - rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") - timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") - endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None - expiration_signing_key: Optional[StrictStr] = Field(default=None, description="Regenerate the key used for signing and checking the payload sent to the target. Set the graceful period for the existing key. During that time, the previous signing key and the new one will be used to sign the request to allow you a smooth transition onf your API. Note that we currently only allow an immediate rotation (\"0s\") and will support longer expirations in the future.", alias="expirationSigningKey") - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceUpdateTargetRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceUpdateTargetRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint"), - "expirationSigningKey": obj.get("expirationSigningKey") - }) - return _obj - - diff --git a/zitadel_client/models/beta_action_service_any.py b/zitadel_client/models/beta_action_service_any.py new file mode 100644 index 00000000..c0e3c9ac --- /dev/null +++ b/zitadel_client/models/beta_action_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/action_service_beta_condition.py b/zitadel_client/models/beta_action_service_condition.py similarity index 55% rename from zitadel_client/models/action_service_beta_condition.py rename to zitadel_client/models/beta_action_service_condition.py index d8fc622f..24cb005c 100644 --- a/zitadel_client/models/action_service_beta_condition.py +++ b/zitadel_client/models/beta_action_service_condition.py @@ -18,22 +18,23 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_event_execution import ActionServiceBetaEventExecution -from zitadel_client.models.action_service_beta_function_execution import ActionServiceBetaFunctionExecution -from zitadel_client.models.action_service_beta_request_execution import ActionServiceBetaRequestExecution -from zitadel_client.models.action_service_beta_response_execution import ActionServiceBetaResponseExecution +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_event_execution import BetaActionServiceEventExecution +from zitadel_client.models.beta_action_service_function_execution import BetaActionServiceFunctionExecution +from zitadel_client.models.beta_action_service_request_execution import BetaActionServiceRequestExecution +from zitadel_client.models.beta_action_service_response_execution import BetaActionServiceResponseExecution from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaCondition(BaseModel): +class BetaActionServiceCondition(BaseModel): """ - ActionServiceBetaCondition + BetaActionServiceCondition """ # noqa: E501 - request: Optional[ActionServiceBetaRequestExecution] = None - response: Optional[ActionServiceBetaResponseExecution] = None - function: Optional[ActionServiceBetaFunctionExecution] = None - event: Optional[ActionServiceBetaEventExecution] = None + event: Optional[BetaActionServiceEventExecution] = None + function: Optional[BetaActionServiceFunctionExecution] = None + request: Optional[BetaActionServiceRequestExecution] = None + response: Optional[BetaActionServiceResponseExecution] = None + __properties: ClassVar[List[str]] = ["event", "function", "request", "response"] model_config = ConfigDict( populate_by_name=True, @@ -53,7 +54,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaCondition from a JSON string""" + """Create an instance of BetaActionServiceCondition from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,11 +75,23 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of event + if self.event: + _dict['event'] = self.event.to_dict() + # override the default output from pydantic by calling `to_dict()` of function + if self.function: + _dict['function'] = self.function.to_dict() + # override the default output from pydantic by calling `to_dict()` of request + if self.request: + _dict['request'] = self.request.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaCondition from a dict""" + """Create an instance of BetaActionServiceCondition from a dict""" if obj is None: return None @@ -86,10 +99,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "request": ActionServiceBetaRequestExecution.from_dict(obj["request"]) if obj.get("request") is not None else None, - "response": ActionServiceBetaResponseExecution.from_dict(obj["response"]) if obj.get("response") is not None else None, - "function": ActionServiceBetaFunctionExecution.from_dict(obj["function"]) if obj.get("function") is not None else None, - "event": ActionServiceBetaEventExecution.from_dict(obj["event"]) if obj.get("event") is not None else None + "event": BetaActionServiceEventExecution.from_dict(obj["event"]) if obj.get("event") is not None else None, + "function": BetaActionServiceFunctionExecution.from_dict(obj["function"]) if obj.get("function") is not None else None, + "request": BetaActionServiceRequestExecution.from_dict(obj["request"]) if obj.get("request") is not None else None, + "response": BetaActionServiceResponseExecution.from_dict(obj["response"]) if obj.get("response") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_action_service_connect_error.py b/zitadel_client/models/beta_action_service_connect_error.py new file mode 100644 index 00000000..022432a7 --- /dev/null +++ b/zitadel_client/models/beta_action_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_action_service_any import BetaActionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaActionServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaActionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_action_service_create_target_request.py b/zitadel_client/models/beta_action_service_create_target_request.py new file mode 100644 index 00000000..52648d43 --- /dev/null +++ b/zitadel_client/models/beta_action_service_create_target_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_rest_call import BetaActionServiceRESTCall +from zitadel_client.models.beta_action_service_rest_webhook import BetaActionServiceRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceCreateTargetRequest(BaseModel): + """ + BetaActionServiceCreateTargetRequest + """ # noqa: E501 + name: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + endpoint: Optional[StrictStr] = None + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + rest_call: Optional[BetaActionServiceRESTCall] = Field(default=None, alias="restCall") + rest_webhook: Optional[BetaActionServiceRESTWebhook] = Field(default=None, alias="restWebhook") + __properties: ClassVar[List[str]] = ["name", "timeout", "endpoint", "restAsync", "restCall", "restWebhook"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceCreateTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rest_call + if self.rest_call: + _dict['restCall'] = self.rest_call.to_dict() + # override the default output from pydantic by calling `to_dict()` of rest_webhook + if self.rest_webhook: + _dict['restWebhook'] = self.rest_webhook.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceCreateTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "restAsync": obj.get("restAsync"), + "restCall": BetaActionServiceRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restWebhook": BetaActionServiceRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_create_target_response.py b/zitadel_client/models/beta_action_service_create_target_response.py new file mode 100644 index 00000000..6ea97bfe --- /dev/null +++ b/zitadel_client/models/beta_action_service_create_target_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceCreateTargetResponse(BaseModel): + """ + BetaActionServiceCreateTargetResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created target.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + __properties: ClassVar[List[str]] = ["id", "creationDate", "signingKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceCreateTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceCreateTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "signingKey": obj.get("signingKey") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_delete_target_request.py b/zitadel_client/models/beta_action_service_delete_target_request.py new file mode 100644 index 00000000..af39f741 --- /dev/null +++ b/zitadel_client/models/beta_action_service_delete_target_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceDeleteTargetRequest(BaseModel): + """ + BetaActionServiceDeleteTargetRequest + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_delete_target_response.py b/zitadel_client/models/beta_action_service_delete_target_response.py new file mode 100644 index 00000000..23740da1 --- /dev/null +++ b/zitadel_client/models/beta_action_service_delete_target_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceDeleteTargetResponse(BaseModel): + """ + BetaActionServiceDeleteTargetResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceDeleteTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_event_execution.py b/zitadel_client/models/beta_action_service_event_execution.py similarity index 75% rename from zitadel_client/models/action_service_beta_event_execution.py rename to zitadel_client/models/beta_action_service_event_execution.py index 5bf99774..779631ec 100644 --- a/zitadel_client/models/action_service_beta_event_execution.py +++ b/zitadel_client/models/beta_action_service_event_execution.py @@ -17,19 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaEventExecution(BaseModel): +class BetaActionServiceEventExecution(BaseModel): """ - ActionServiceBetaEventExecution + BetaActionServiceEventExecution """ # noqa: E501 - event: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event name as condition.") - group: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event group as condition, all events under this group.") all: Optional[StrictBool] = Field(default=None, description="all events as condition.") + event: Optional[StrictStr] = Field(default=None, description="Event name as condition.") + group: Optional[StrictStr] = Field(default=None, description="Event group as condition, all events under this group.") + __properties: ClassVar[List[str]] = ["all", "event", "group"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaEventExecution from a JSON string""" + """Create an instance of BetaActionServiceEventExecution from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaEventExecution from a dict""" + """Create an instance of BetaActionServiceEventExecution from a dict""" if obj is None: return None @@ -82,9 +82,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "all": obj.get("all"), "event": obj.get("event"), - "group": obj.get("group"), - "all": obj.get("all") + "group": obj.get("group") }) return _obj diff --git a/zitadel_client/models/beta_action_service_execution.py b/zitadel_client/models/beta_action_service_execution.py new file mode 100644 index 00000000..55f7d8cf --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceExecution(BaseModel): + """ + BetaActionServiceExecution + """ # noqa: E501 + condition: Optional[BetaActionServiceCondition] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + __properties: ClassVar[List[str]] = ["condition", "creationDate", "changeDate", "targets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceExecution from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of condition + if self.condition: + _dict['condition'] = self.condition.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "condition": BetaActionServiceCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "targets": obj.get("targets") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_execution_field_name.py b/zitadel_client/models/beta_action_service_execution_field_name.py new file mode 100644 index 00000000..af2d7b0b --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution_field_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaActionServiceExecutionFieldName(str, Enum): + """ + BetaActionServiceExecutionFieldName + """ + + """ + allowed enum values + """ + EXECUTION_FIELD_NAME_UNSPECIFIED = 'EXECUTION_FIELD_NAME_UNSPECIFIED' + EXECUTION_FIELD_NAME_ID = 'EXECUTION_FIELD_NAME_ID' + EXECUTION_FIELD_NAME_CREATED_DATE = 'EXECUTION_FIELD_NAME_CREATED_DATE' + EXECUTION_FIELD_NAME_CHANGED_DATE = 'EXECUTION_FIELD_NAME_CHANGED_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaActionServiceExecutionFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_action_service_execution_search_filter.py b/zitadel_client/models/beta_action_service_execution_search_filter.py new file mode 100644 index 00000000..50753a23 --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution_search_filter.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_execution_type_filter import BetaActionServiceExecutionTypeFilter +from zitadel_client.models.beta_action_service_in_conditions_filter import BetaActionServiceInConditionsFilter +from zitadel_client.models.beta_action_service_target_filter import BetaActionServiceTargetFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceExecutionSearchFilter(BaseModel): + """ + BetaActionServiceExecutionSearchFilter + """ # noqa: E501 + execution_type_filter: Optional[BetaActionServiceExecutionTypeFilter] = Field(default=None, alias="executionTypeFilter") + in_conditions_filter: Optional[BetaActionServiceInConditionsFilter] = Field(default=None, alias="inConditionsFilter") + target_filter: Optional[BetaActionServiceTargetFilter] = Field(default=None, alias="targetFilter") + __properties: ClassVar[List[str]] = ["executionTypeFilter", "inConditionsFilter", "targetFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceExecutionSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of execution_type_filter + if self.execution_type_filter: + _dict['executionTypeFilter'] = self.execution_type_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of in_conditions_filter + if self.in_conditions_filter: + _dict['inConditionsFilter'] = self.in_conditions_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of target_filter + if self.target_filter: + _dict['targetFilter'] = self.target_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceExecutionSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "executionTypeFilter": BetaActionServiceExecutionTypeFilter.from_dict(obj["executionTypeFilter"]) if obj.get("executionTypeFilter") is not None else None, + "inConditionsFilter": BetaActionServiceInConditionsFilter.from_dict(obj["inConditionsFilter"]) if obj.get("inConditionsFilter") is not None else None, + "targetFilter": BetaActionServiceTargetFilter.from_dict(obj["targetFilter"]) if obj.get("targetFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_execution_type.py b/zitadel_client/models/beta_action_service_execution_type.py new file mode 100644 index 00000000..f37c02fe --- /dev/null +++ b/zitadel_client/models/beta_action_service_execution_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaActionServiceExecutionType(str, Enum): + """ + BetaActionServiceExecutionType + """ + + """ + allowed enum values + """ + EXECUTION_TYPE_UNSPECIFIED = 'EXECUTION_TYPE_UNSPECIFIED' + EXECUTION_TYPE_REQUEST = 'EXECUTION_TYPE_REQUEST' + EXECUTION_TYPE_RESPONSE = 'EXECUTION_TYPE_RESPONSE' + EXECUTION_TYPE_EVENT = 'EXECUTION_TYPE_EVENT' + EXECUTION_TYPE_FUNCTION = 'EXECUTION_TYPE_FUNCTION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaActionServiceExecutionType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_beta_set_execution_response.py b/zitadel_client/models/beta_action_service_execution_type_filter.py similarity index 77% rename from zitadel_client/models/action_service_beta_set_execution_response.py rename to zitadel_client/models/beta_action_service_execution_type_filter.py index 31850e3e..913d30f5 100644 --- a/zitadel_client/models/action_service_beta_set_execution_response.py +++ b/zitadel_client/models/beta_action_service_execution_type_filter.py @@ -17,17 +17,18 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_execution_type import BetaActionServiceExecutionType from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaSetExecutionResponse(BaseModel): +class BetaActionServiceExecutionTypeFilter(BaseModel): """ - ActionServiceBetaSetExecutionResponse + BetaActionServiceExecutionTypeFilter """ # noqa: E501 - set_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution set.", alias="setDate") + execution_type: Optional[BetaActionServiceExecutionType] = Field(default=None, alias="executionType") + __properties: ClassVar[List[str]] = ["executionType"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaSetExecutionResponse from a JSON string""" + """Create an instance of BetaActionServiceExecutionTypeFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaSetExecutionResponse from a dict""" + """Create an instance of BetaActionServiceExecutionTypeFilter from a dict""" if obj is None: return None @@ -80,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "setDate": obj.get("setDate") + "executionType": obj.get("executionType") }) return _obj diff --git a/zitadel_client/models/action_service_beta_function_execution.py b/zitadel_client/models/beta_action_service_function_execution.py similarity index 88% rename from zitadel_client/models/action_service_beta_function_execution.py rename to zitadel_client/models/beta_action_service_function_execution.py index 4e10174c..f615a480 100644 --- a/zitadel_client/models/action_service_beta_function_execution.py +++ b/zitadel_client/models/beta_action_service_function_execution.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaFunctionExecution(BaseModel): +class BetaActionServiceFunctionExecution(BaseModel): """ - ActionServiceBetaFunctionExecution + Executed on the specified function """ # noqa: E501 name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaFunctionExecution from a JSON string""" + """Create an instance of BetaActionServiceFunctionExecution from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaFunctionExecution from a dict""" + """Create an instance of BetaActionServiceFunctionExecution from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_action_service_get_target_request.py b/zitadel_client/models/beta_action_service_get_target_request.py new file mode 100644 index 00000000..e3c7dda2 --- /dev/null +++ b/zitadel_client/models/beta_action_service_get_target_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceGetTargetRequest(BaseModel): + """ + BetaActionServiceGetTargetRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceGetTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceGetTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_get_target_response.py b/zitadel_client/models/beta_action_service_get_target_response.py similarity index 82% rename from zitadel_client/models/action_service_beta_get_target_response.py rename to zitadel_client/models/beta_action_service_get_target_response.py index 5c23917a..58a5b8dd 100644 --- a/zitadel_client/models/action_service_beta_get_target_response.py +++ b/zitadel_client/models/beta_action_service_get_target_response.py @@ -18,16 +18,17 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_target import BetaActionServiceTarget from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaGetTargetResponse(BaseModel): +class BetaActionServiceGetTargetResponse(BaseModel): """ - ActionServiceBetaGetTargetResponse + BetaActionServiceGetTargetResponse """ # noqa: E501 - target: Optional[ActionServiceBetaTarget] = None + target: Optional[BetaActionServiceTarget] = None + __properties: ClassVar[List[str]] = ["target"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaGetTargetResponse from a JSON string""" + """Create an instance of BetaActionServiceGetTargetResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaGetTargetResponse from a dict""" + """Create an instance of BetaActionServiceGetTargetResponse from a dict""" if obj is None: return None @@ -83,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "target": ActionServiceBetaTarget.from_dict(obj["target"]) if obj.get("target") is not None else None + "target": BetaActionServiceTarget.from_dict(obj["target"]) if obj.get("target") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_beta_target_search_filter.py b/zitadel_client/models/beta_action_service_in_conditions_filter.py similarity index 70% rename from zitadel_client/models/action_service_beta_target_search_filter.py rename to zitadel_client/models/beta_action_service_in_conditions_filter.py index 19fc84c4..9d793331 100644 --- a/zitadel_client/models/action_service_beta_target_search_filter.py +++ b/zitadel_client/models/beta_action_service_in_conditions_filter.py @@ -19,17 +19,16 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_in_target_ids_filter import ActionServiceBetaInTargetIDsFilter -from zitadel_client.models.action_service_beta_target_name_filter import ActionServiceBetaTargetNameFilter +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaTargetSearchFilter(BaseModel): +class BetaActionServiceInConditionsFilter(BaseModel): """ - ActionServiceBetaTargetSearchFilter + BetaActionServiceInConditionsFilter """ # noqa: E501 - target_name_filter: Optional[ActionServiceBetaTargetNameFilter] = Field(default=None, alias="targetNameFilter") - in_target_ids_filter: Optional[ActionServiceBetaInTargetIDsFilter] = Field(default=None, alias="inTargetIdsFilter") + conditions: Optional[List[BetaActionServiceCondition]] = Field(default=None, description="Defines the conditions to query for.") + __properties: ClassVar[List[str]] = ["conditions"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetSearchFilter from a JSON string""" + """Create an instance of BetaActionServiceInConditionsFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +69,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in conditions (list) + _items = [] + if self.conditions: + for _item_conditions in self.conditions: + if _item_conditions: + _items.append(_item_conditions.to_dict()) + _dict['conditions'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetSearchFilter from a dict""" + """Create an instance of BetaActionServiceInConditionsFilter from a dict""" if obj is None: return None @@ -82,8 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "targetNameFilter": ActionServiceBetaTargetNameFilter.from_dict(obj["targetNameFilter"]) if obj.get("targetNameFilter") is not None else None, - "inTargetIdsFilter": ActionServiceBetaInTargetIDsFilter.from_dict(obj["inTargetIdsFilter"]) if obj.get("inTargetIdsFilter") is not None else None + "conditions": [BetaActionServiceCondition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_beta_in_target_ids_filter.py b/zitadel_client/models/beta_action_service_in_target_ids_filter.py similarity index 87% rename from zitadel_client/models/action_service_beta_in_target_ids_filter.py rename to zitadel_client/models/beta_action_service_in_target_ids_filter.py index d26f8389..6c3e55d1 100644 --- a/zitadel_client/models/action_service_beta_in_target_ids_filter.py +++ b/zitadel_client/models/beta_action_service_in_target_ids_filter.py @@ -22,11 +22,12 @@ from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaInTargetIDsFilter(BaseModel): +class BetaActionServiceInTargetIDsFilter(BaseModel): """ - ActionServiceBetaInTargetIDsFilter + BetaActionServiceInTargetIDsFilter """ # noqa: E501 - target_ids: Optional[List[StrictStr]] = Field(default=None, description="the ids of the targets to include", alias="targetIds") + target_ids: Optional[List[StrictStr]] = Field(default=None, description="Defines the ids to query for.", alias="targetIds") + __properties: ClassVar[List[str]] = ["targetIds"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaInTargetIDsFilter from a JSON string""" + """Create an instance of BetaActionServiceInTargetIDsFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaInTargetIDsFilter from a dict""" + """Create an instance of BetaActionServiceInTargetIDsFilter from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_beta_list_execution_functions_response.py b/zitadel_client/models/beta_action_service_list_execution_functions_response.py similarity index 83% rename from zitadel_client/models/action_service_beta_list_execution_functions_response.py rename to zitadel_client/models/beta_action_service_list_execution_functions_response.py index eff2f1d5..e5d09479 100644 --- a/zitadel_client/models/action_service_beta_list_execution_functions_response.py +++ b/zitadel_client/models/beta_action_service_list_execution_functions_response.py @@ -17,16 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionFunctionsResponse(BaseModel): +class BetaActionServiceListExecutionFunctionsResponse(BaseModel): """ - ActionServiceBetaListExecutionFunctionsResponse + BetaActionServiceListExecutionFunctionsResponse """ # noqa: E501 - functions: Optional[List[StrictStr]] = None + functions: Optional[List[StrictStr]] = Field(default=None, description="All available methods") + __properties: ClassVar[List[str]] = ["functions"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionFunctionsResponse from a JSON string""" + """Create an instance of BetaActionServiceListExecutionFunctionsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionFunctionsResponse from a dict""" + """Create an instance of BetaActionServiceListExecutionFunctionsResponse from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_action_service_list_execution_methods_response.py b/zitadel_client/models/beta_action_service_list_execution_methods_response.py new file mode 100644 index 00000000..26f97944 --- /dev/null +++ b/zitadel_client/models/beta_action_service_list_execution_methods_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceListExecutionMethodsResponse(BaseModel): + """ + BetaActionServiceListExecutionMethodsResponse + """ # noqa: E501 + methods: Optional[List[StrictStr]] = Field(default=None, description="All available methods") + __properties: ClassVar[List[str]] = ["methods"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionMethodsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionMethodsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "methods": obj.get("methods") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_list_execution_services_response.py b/zitadel_client/models/beta_action_service_list_execution_services_response.py new file mode 100644 index 00000000..2a44a298 --- /dev/null +++ b/zitadel_client/models/beta_action_service_list_execution_services_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceListExecutionServicesResponse(BaseModel): + """ + BetaActionServiceListExecutionServicesResponse + """ # noqa: E501 + services: Optional[List[StrictStr]] = Field(default=None, description="All available methods") + __properties: ClassVar[List[str]] = ["services"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionServicesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionServicesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "services": obj.get("services") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_list_executions_request.py b/zitadel_client/models/beta_action_service_list_executions_request.py new file mode 100644 index 00000000..782c48de --- /dev/null +++ b/zitadel_client/models/beta_action_service_list_executions_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_action_service_execution_field_name import BetaActionServiceExecutionFieldName +from zitadel_client.models.beta_action_service_execution_search_filter import BetaActionServiceExecutionSearchFilter +from zitadel_client.models.beta_action_service_pagination_request import BetaActionServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceListExecutionsRequest(BaseModel): + """ + BetaActionServiceListExecutionsRequest + """ # noqa: E501 + pagination: Optional[BetaActionServicePaginationRequest] = None + sorting_column: Optional[BetaActionServiceExecutionFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaActionServiceExecutionSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceListExecutionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaActionServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaActionServiceExecutionSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_executions_response.py b/zitadel_client/models/beta_action_service_list_executions_response.py similarity index 80% rename from zitadel_client/models/action_service_beta_list_executions_response.py rename to zitadel_client/models/beta_action_service_list_executions_response.py index e401be66..d1715b5d 100644 --- a/zitadel_client/models/action_service_beta_list_executions_response.py +++ b/zitadel_client/models/beta_action_service_list_executions_response.py @@ -19,17 +19,18 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_execution import ActionServiceBetaExecution -from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse +from zitadel_client.models.beta_action_service_execution import BetaActionServiceExecution +from zitadel_client.models.beta_action_service_pagination_response import BetaActionServicePaginationResponse from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionsResponse(BaseModel): +class BetaActionServiceListExecutionsResponse(BaseModel): """ - ActionServiceBetaListExecutionsResponse + BetaActionServiceListExecutionsResponse """ # noqa: E501 - pagination: Optional[ActionServiceBetaPaginationResponse] = None - result: Optional[List[ActionServiceBetaExecution]] = None + pagination: Optional[BetaActionServicePaginationResponse] = None + result: Optional[List[BetaActionServiceExecution]] = None + __properties: ClassVar[List[str]] = ["pagination", "result"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionsResponse from a JSON string""" + """Create an instance of BetaActionServiceListExecutionsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionsResponse from a dict""" + """Create an instance of BetaActionServiceListExecutionsResponse from a dict""" if obj is None: return None @@ -92,8 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "result": [ActionServiceBetaExecution.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + "pagination": BetaActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [BetaActionServiceExecution.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_list_targets_request.py b/zitadel_client/models/beta_action_service_list_targets_request.py similarity index 72% rename from zitadel_client/models/action_service_list_targets_request.py rename to zitadel_client/models/beta_action_service_list_targets_request.py index 8edc97d0..64340af6 100644 --- a/zitadel_client/models/action_service_list_targets_request.py +++ b/zitadel_client/models/beta_action_service_list_targets_request.py @@ -19,19 +19,20 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_pagination_request import ActionServiceBetaPaginationRequest -from zitadel_client.models.action_service_beta_target_field_name import ActionServiceBetaTargetFieldName -from zitadel_client.models.action_service_beta_target_search_filter import ActionServiceBetaTargetSearchFilter +from zitadel_client.models.beta_action_service_pagination_request import BetaActionServicePaginationRequest +from zitadel_client.models.beta_action_service_target_field_name import BetaActionServiceTargetFieldName +from zitadel_client.models.beta_action_service_target_search_filter import BetaActionServiceTargetSearchFilter from typing import Optional, Set from typing_extensions import Self -class ActionServiceListTargetsRequest(BaseModel): +class BetaActionServiceListTargetsRequest(BaseModel): """ - ActionServiceListTargetsRequest + BetaActionServiceListTargetsRequest """ # noqa: E501 - pagination: Optional[ActionServiceBetaPaginationRequest] = None - sorting_column: Optional[ActionServiceBetaTargetFieldName] = Field(default=ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - filters: Optional[List[ActionServiceBetaTargetSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + pagination: Optional[BetaActionServicePaginationRequest] = None + sorting_column: Optional[BetaActionServiceTargetFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaActionServiceTargetSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceListTargetsRequest from a JSON string""" + """Create an instance of BetaActionServiceListTargetsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceListTargetsRequest from a dict""" + """Create an instance of BetaActionServiceListTargetsRequest from a dict""" if obj is None: return None @@ -94,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "pagination": ActionServiceBetaPaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, - "filters": [ActionServiceBetaTargetSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + "pagination": BetaActionServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaActionServiceTargetSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_beta_list_targets_response.py b/zitadel_client/models/beta_action_service_list_targets_response.py similarity index 80% rename from zitadel_client/models/action_service_beta_list_targets_response.py rename to zitadel_client/models/beta_action_service_list_targets_response.py index ea3a6666..da3e0cf1 100644 --- a/zitadel_client/models/action_service_beta_list_targets_response.py +++ b/zitadel_client/models/beta_action_service_list_targets_response.py @@ -19,17 +19,18 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse -from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget +from zitadel_client.models.beta_action_service_pagination_response import BetaActionServicePaginationResponse +from zitadel_client.models.beta_action_service_target import BetaActionServiceTarget from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListTargetsResponse(BaseModel): +class BetaActionServiceListTargetsResponse(BaseModel): """ - ActionServiceBetaListTargetsResponse + BetaActionServiceListTargetsResponse """ # noqa: E501 - pagination: Optional[ActionServiceBetaPaginationResponse] = None - result: Optional[List[ActionServiceBetaTarget]] = None + pagination: Optional[BetaActionServicePaginationResponse] = None + result: Optional[List[BetaActionServiceTarget]] = None + __properties: ClassVar[List[str]] = ["pagination", "result"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListTargetsResponse from a JSON string""" + """Create an instance of BetaActionServiceListTargetsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListTargetsResponse from a dict""" + """Create an instance of BetaActionServiceListTargetsResponse from a dict""" if obj is None: return None @@ -92,8 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "result": [ActionServiceBetaTarget.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + "pagination": BetaActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [BetaActionServiceTarget.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/action_service_beta_pagination_request.py b/zitadel_client/models/beta_action_service_pagination_request.py similarity index 73% rename from zitadel_client/models/action_service_beta_pagination_request.py rename to zitadel_client/models/beta_action_service_pagination_request.py index 203eda76..45c4ef7a 100644 --- a/zitadel_client/models/action_service_beta_pagination_request.py +++ b/zitadel_client/models/beta_action_service_pagination_request.py @@ -17,18 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaPaginationRequest(BaseModel): +class BetaActionServicePaginationRequest(BaseModel): """ - ActionServiceBetaPaginationRequest + BetaActionServicePaginationRequest """ # noqa: E501 - offset: Optional[StrictStr] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") - limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") - asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationRequest from a JSON string""" + """Create an instance of BetaActionServicePaginationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,11 +70,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationRequest from a dict""" + """Create an instance of BetaActionServicePaginationRequest from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_action_service_pagination_response.py b/zitadel_client/models/beta_action_service_pagination_response.py new file mode 100644 index 00000000..b7545a37 --- /dev/null +++ b/zitadel_client/models/beta_action_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServicePaginationResponse(BaseModel): + """ + BetaActionServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_request_execution.py b/zitadel_client/models/beta_action_service_request_execution.py similarity index 76% rename from zitadel_client/models/action_service_beta_request_execution.py rename to zitadel_client/models/beta_action_service_request_execution.py index b4f9848a..154f0b47 100644 --- a/zitadel_client/models/action_service_beta_request_execution.py +++ b/zitadel_client/models/beta_action_service_request_execution.py @@ -17,19 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaRequestExecution(BaseModel): +class BetaActionServiceRequestExecution(BaseModel): """ - ActionServiceBetaRequestExecution + BetaActionServiceRequestExecution """ # noqa: E501 - method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") - service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + method: Optional[StrictStr] = Field(default=None, description="GRPC-method as condition.") + service: Optional[StrictStr] = Field(default=None, description="GRPC-service as condition.") + __properties: ClassVar[List[str]] = ["all", "method", "service"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaRequestExecution from a JSON string""" + """Create an instance of BetaActionServiceRequestExecution from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaRequestExecution from a dict""" + """Create an instance of BetaActionServiceRequestExecution from a dict""" if obj is None: return None @@ -82,9 +82,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "all": obj.get("all"), "method": obj.get("method"), - "service": obj.get("service"), - "all": obj.get("all") + "service": obj.get("service") }) return _obj diff --git a/zitadel_client/models/action_service_beta_response_execution.py b/zitadel_client/models/beta_action_service_response_execution.py similarity index 76% rename from zitadel_client/models/action_service_beta_response_execution.py rename to zitadel_client/models/beta_action_service_response_execution.py index 761ee4bd..14bc30a5 100644 --- a/zitadel_client/models/action_service_beta_response_execution.py +++ b/zitadel_client/models/beta_action_service_response_execution.py @@ -17,19 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaResponseExecution(BaseModel): +class BetaActionServiceResponseExecution(BaseModel): """ - ActionServiceBetaResponseExecution + BetaActionServiceResponseExecution """ # noqa: E501 - method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") - service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + method: Optional[StrictStr] = Field(default=None, description="GRPC-method as condition.") + service: Optional[StrictStr] = Field(default=None, description="GRPC-service as condition.") + __properties: ClassVar[List[str]] = ["all", "method", "service"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaResponseExecution from a JSON string""" + """Create an instance of BetaActionServiceResponseExecution from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaResponseExecution from a dict""" + """Create an instance of BetaActionServiceResponseExecution from a dict""" if obj is None: return None @@ -82,9 +82,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "all": obj.get("all"), "method": obj.get("method"), - "service": obj.get("service"), - "all": obj.get("all") + "service": obj.get("service") }) return _obj diff --git a/zitadel_client/models/action_service_beta_rest_call.py b/zitadel_client/models/beta_action_service_rest_call.py similarity index 89% rename from zitadel_client/models/action_service_beta_rest_call.py rename to zitadel_client/models/beta_action_service_rest_call.py index d1aa3e9a..43400c33 100644 --- a/zitadel_client/models/action_service_beta_rest_call.py +++ b/zitadel_client/models/beta_action_service_rest_call.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaRESTCall(BaseModel): +class BetaActionServiceRESTCall(BaseModel): """ - ActionServiceBetaRESTCall + BetaActionServiceRESTCall """ # noqa: E501 interrupt_on_error: Optional[StrictBool] = Field(default=None, description="Define if any error stops the whole execution. By default the process continues as normal.", alias="interruptOnError") + __properties: ClassVar[List[str]] = ["interruptOnError"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTCall from a JSON string""" + """Create an instance of BetaActionServiceRESTCall from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTCall from a dict""" + """Create an instance of BetaActionServiceRESTCall from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_beta_rest_webhook.py b/zitadel_client/models/beta_action_service_rest_webhook.py similarity index 88% rename from zitadel_client/models/action_service_beta_rest_webhook.py rename to zitadel_client/models/beta_action_service_rest_webhook.py index fd90bf0e..e26c2d93 100644 --- a/zitadel_client/models/action_service_beta_rest_webhook.py +++ b/zitadel_client/models/beta_action_service_rest_webhook.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaRESTWebhook(BaseModel): +class BetaActionServiceRESTWebhook(BaseModel): """ - ActionServiceBetaRESTWebhook + BetaActionServiceRESTWebhook """ # noqa: E501 interrupt_on_error: Optional[StrictBool] = Field(default=None, description="Define if any error stops the whole execution. By default the process continues as normal.", alias="interruptOnError") + __properties: ClassVar[List[str]] = ["interruptOnError"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTWebhook from a JSON string""" + """Create an instance of BetaActionServiceRESTWebhook from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaRESTWebhook from a dict""" + """Create an instance of BetaActionServiceRESTWebhook from a dict""" if obj is None: return None diff --git a/zitadel_client/models/action_service_set_execution_request.py b/zitadel_client/models/beta_action_service_set_execution_request.py similarity index 83% rename from zitadel_client/models/action_service_set_execution_request.py rename to zitadel_client/models/beta_action_service_set_execution_request.py index 58b67bcf..8e57e25d 100644 --- a/zitadel_client/models/action_service_set_execution_request.py +++ b/zitadel_client/models/beta_action_service_set_execution_request.py @@ -19,16 +19,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition from typing import Optional, Set from typing_extensions import Self -class ActionServiceSetExecutionRequest(BaseModel): +class BetaActionServiceSetExecutionRequest(BaseModel): """ - ActionServiceSetExecutionRequest + BetaActionServiceSetExecutionRequest """ # noqa: E501 - condition: Optional[ActionServiceBetaCondition] = None + condition: Optional[BetaActionServiceCondition] = None targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + __properties: ClassVar[List[str]] = ["condition", "targets"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceSetExecutionRequest from a JSON string""" + """Create an instance of BetaActionServiceSetExecutionRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceSetExecutionRequest from a dict""" + """Create an instance of BetaActionServiceSetExecutionRequest from a dict""" if obj is None: return None @@ -84,7 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "condition": ActionServiceBetaCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "condition": BetaActionServiceCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, "targets": obj.get("targets") }) return _obj diff --git a/zitadel_client/models/beta_action_service_set_execution_response.py b/zitadel_client/models/beta_action_service_set_execution_response.py new file mode 100644 index 00000000..726f06fe --- /dev/null +++ b/zitadel_client/models/beta_action_service_set_execution_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceSetExecutionResponse(BaseModel): + """ + BetaActionServiceSetExecutionResponse + """ # noqa: E501 + set_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="setDate") + __properties: ClassVar[List[str]] = ["setDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceSetExecutionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceSetExecutionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "setDate": obj.get("setDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_target.py b/zitadel_client/models/beta_action_service_target.py new file mode 100644 index 00000000..8309b2cc --- /dev/null +++ b/zitadel_client/models/beta_action_service_target.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_rest_call import BetaActionServiceRESTCall +from zitadel_client.models.beta_action_service_rest_webhook import BetaActionServiceRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceTarget(BaseModel): + """ + BetaActionServiceTarget + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the target.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + name: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + endpoint: Optional[StrictStr] = None + signing_key: Optional[StrictStr] = Field(default=None, alias="signingKey") + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + rest_call: Optional[BetaActionServiceRESTCall] = Field(default=None, alias="restCall") + rest_webhook: Optional[BetaActionServiceRESTWebhook] = Field(default=None, alias="restWebhook") + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "name", "timeout", "endpoint", "signingKey", "restAsync", "restCall", "restWebhook"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceTarget from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rest_call + if self.rest_call: + _dict['restCall'] = self.rest_call.to_dict() + # override the default output from pydantic by calling `to_dict()` of rest_webhook + if self.rest_webhook: + _dict['restWebhook'] = self.rest_webhook.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceTarget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "name": obj.get("name"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "signingKey": obj.get("signingKey"), + "restAsync": obj.get("restAsync"), + "restCall": BetaActionServiceRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restWebhook": BetaActionServiceRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_target_field_name.py b/zitadel_client/models/beta_action_service_target_field_name.py similarity index 89% rename from zitadel_client/models/action_service_beta_target_field_name.py rename to zitadel_client/models/beta_action_service_target_field_name.py index 3027395e..a432350d 100644 --- a/zitadel_client/models/action_service_beta_target_field_name.py +++ b/zitadel_client/models/beta_action_service_target_field_name.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class ActionServiceBetaTargetFieldName(str, Enum): +class BetaActionServiceTargetFieldName(str, Enum): """ - ActionServiceBetaTargetFieldName + BetaActionServiceTargetFieldName """ """ @@ -38,7 +38,7 @@ class ActionServiceBetaTargetFieldName(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of ActionServiceBetaTargetFieldName from a JSON string""" + """Create an instance of BetaActionServiceTargetFieldName from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/beta_action_service_target_filter.py b/zitadel_client/models/beta_action_service_target_filter.py new file mode 100644 index 00000000..0072c5e8 --- /dev/null +++ b/zitadel_client/models/beta_action_service_target_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceTargetFilter(BaseModel): + """ + BetaActionServiceTargetFilter + """ # noqa: E501 + target_id: Optional[StrictStr] = Field(default=None, description="Defines the id to query for.", alias="targetId") + __properties: ClassVar[List[str]] = ["targetId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetId": obj.get("targetId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_target_name_filter.py b/zitadel_client/models/beta_action_service_target_name_filter.py new file mode 100644 index 00000000..353ddc5a --- /dev/null +++ b/zitadel_client/models/beta_action_service_target_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_text_filter_method import BetaActionServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceTargetNameFilter(BaseModel): + """ + BetaActionServiceTargetNameFilter + """ # noqa: E501 + target_name: Optional[StrictStr] = Field(default=None, description="Defines the name of the target to query for.", alias="targetName") + method: Optional[BetaActionServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["targetName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetName": obj.get("targetName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_target_search_filter.py b/zitadel_client/models/beta_action_service_target_search_filter.py new file mode 100644 index 00000000..5c2fff1b --- /dev/null +++ b/zitadel_client/models/beta_action_service_target_search_filter.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_in_target_ids_filter import BetaActionServiceInTargetIDsFilter +from zitadel_client.models.beta_action_service_target_name_filter import BetaActionServiceTargetNameFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceTargetSearchFilter(BaseModel): + """ + BetaActionServiceTargetSearchFilter + """ # noqa: E501 + in_target_ids_filter: Optional[BetaActionServiceInTargetIDsFilter] = Field(default=None, alias="inTargetIdsFilter") + target_name_filter: Optional[BetaActionServiceTargetNameFilter] = Field(default=None, alias="targetNameFilter") + __properties: ClassVar[List[str]] = ["inTargetIdsFilter", "targetNameFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_target_ids_filter + if self.in_target_ids_filter: + _dict['inTargetIdsFilter'] = self.in_target_ids_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of target_name_filter + if self.target_name_filter: + _dict['targetNameFilter'] = self.target_name_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceTargetSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inTargetIdsFilter": BetaActionServiceInTargetIDsFilter.from_dict(obj["inTargetIdsFilter"]) if obj.get("inTargetIdsFilter") is not None else None, + "targetNameFilter": BetaActionServiceTargetNameFilter.from_dict(obj["targetNameFilter"]) if obj.get("targetNameFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_text_filter_method.py b/zitadel_client/models/beta_action_service_text_filter_method.py similarity index 89% rename from zitadel_client/models/action_service_beta_text_filter_method.py rename to zitadel_client/models/beta_action_service_text_filter_method.py index 4663edd3..c450a2e4 100644 --- a/zitadel_client/models/action_service_beta_text_filter_method.py +++ b/zitadel_client/models/beta_action_service_text_filter_method.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class ActionServiceBetaTextFilterMethod(str, Enum): +class BetaActionServiceTextFilterMethod(str, Enum): """ - ActionServiceBetaTextFilterMethod + BetaActionServiceTextFilterMethod """ """ @@ -37,7 +37,7 @@ class ActionServiceBetaTextFilterMethod(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of ActionServiceBetaTextFilterMethod from a JSON string""" + """Create an instance of BetaActionServiceTextFilterMethod from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/beta_action_service_update_target_request.py b/zitadel_client/models/beta_action_service_update_target_request.py new file mode 100644 index 00000000..1505496d --- /dev/null +++ b/zitadel_client/models/beta_action_service_update_target_request.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_action_service_rest_call import BetaActionServiceRESTCall +from zitadel_client.models.beta_action_service_rest_webhook import BetaActionServiceRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceUpdateTargetRequest(BaseModel): + """ + BetaActionServiceUpdateTargetRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + endpoint: Optional[StrictStr] = None + expiration_signing_key: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="expirationSigningKey") + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + rest_call: Optional[BetaActionServiceRESTCall] = Field(default=None, alias="restCall") + rest_webhook: Optional[BetaActionServiceRESTWebhook] = Field(default=None, alias="restWebhook") + __properties: ClassVar[List[str]] = ["id", "name", "timeout", "endpoint", "expirationSigningKey", "restAsync", "restCall", "restWebhook"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceUpdateTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of rest_call + if self.rest_call: + _dict['restCall'] = self.rest_call.to_dict() + # override the default output from pydantic by calling `to_dict()` of rest_webhook + if self.rest_webhook: + _dict['restWebhook'] = self.rest_webhook.to_dict() + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if endpoint (nullable) is None + # and model_fields_set contains the field + if self.endpoint is None and "endpoint" in self.model_fields_set: + _dict['endpoint'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceUpdateTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "expirationSigningKey": obj.get("expirationSigningKey"), + "restAsync": obj.get("restAsync"), + "restCall": BetaActionServiceRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restWebhook": BetaActionServiceRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_action_service_update_target_response.py b/zitadel_client/models/beta_action_service_update_target_response.py new file mode 100644 index 00000000..cad9ad1b --- /dev/null +++ b/zitadel_client/models/beta_action_service_update_target_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaActionServiceUpdateTargetResponse(BaseModel): + """ + BetaActionServiceUpdateTargetResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + __properties: ClassVar[List[str]] = ["changeDate", "signingKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaActionServiceUpdateTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if signing_key (nullable) is None + # and model_fields_set contains the field + if self.signing_key is None and "signing_key" in self.model_fields_set: + _dict['signingKey'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaActionServiceUpdateTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate"), + "signingKey": obj.get("signingKey") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_any.py b/zitadel_client/models/beta_app_service_any.py new file mode 100644 index 00000000..62bc7149 --- /dev/null +++ b/zitadel_client/models/beta_app_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_app_service_api_auth_method_type.py b/zitadel_client/models/beta_app_service_api_auth_method_type.py new file mode 100644 index 00000000..626d49c1 --- /dev/null +++ b/zitadel_client/models/beta_app_service_api_auth_method_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceAPIAuthMethodType(str, Enum): + """ + BetaAppServiceAPIAuthMethodType + """ + + """ + allowed enum values + """ + API_AUTH_METHOD_TYPE_BASIC = 'API_AUTH_METHOD_TYPE_BASIC' + API_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT = 'API_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceAPIAuthMethodType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_api_config.py b/zitadel_client/models/beta_app_service_api_config.py new file mode 100644 index 00000000..3ba5ac77 --- /dev/null +++ b/zitadel_client/models/beta_app_service_api_config.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_api_auth_method_type import BetaAppServiceAPIAuthMethodType +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceAPIConfig(BaseModel): + """ + BetaAppServiceAPIConfig + """ # noqa: E501 + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + auth_method_type: Optional[BetaAppServiceAPIAuthMethodType] = Field(default=None, alias="authMethodType") + __properties: ClassVar[List[str]] = ["clientId", "authMethodType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceAPIConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceAPIConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientId": obj.get("clientId"), + "authMethodType": obj.get("authMethodType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_app_sorting.py b/zitadel_client/models/beta_app_service_app_sorting.py new file mode 100644 index 00000000..71ae158c --- /dev/null +++ b/zitadel_client/models/beta_app_service_app_sorting.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceAppSorting(str, Enum): + """ + BetaAppServiceAppSorting + """ + + """ + allowed enum values + """ + APP_SORT_BY_ID = 'APP_SORT_BY_ID' + APP_SORT_BY_NAME = 'APP_SORT_BY_NAME' + APP_SORT_BY_STATE = 'APP_SORT_BY_STATE' + APP_SORT_BY_CREATION_DATE = 'APP_SORT_BY_CREATION_DATE' + APP_SORT_BY_CHANGE_DATE = 'APP_SORT_BY_CHANGE_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceAppSorting from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_app_state.py b/zitadel_client/models/beta_app_service_app_state.py new file mode 100644 index 00000000..9b51a9dd --- /dev/null +++ b/zitadel_client/models/beta_app_service_app_state.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceAppState(str, Enum): + """ + BetaAppServiceAppState + """ + + """ + allowed enum values + """ + APP_STATE_UNSPECIFIED = 'APP_STATE_UNSPECIFIED' + APP_STATE_ACTIVE = 'APP_STATE_ACTIVE' + APP_STATE_INACTIVE = 'APP_STATE_INACTIVE' + APP_STATE_REMOVED = 'APP_STATE_REMOVED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceAppState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_application.py b/zitadel_client/models/beta_app_service_application.py new file mode 100644 index 00000000..5e9b44fc --- /dev/null +++ b/zitadel_client/models/beta_app_service_application.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_api_config import BetaAppServiceAPIConfig +from zitadel_client.models.beta_app_service_app_state import BetaAppServiceAppState +from zitadel_client.models.beta_app_service_oidc_config import BetaAppServiceOIDCConfig +from zitadel_client.models.beta_app_service_saml_config import BetaAppServiceSAMLConfig +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceApplication(BaseModel): + """ + BetaAppServiceApplication + """ # noqa: E501 + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + state: Optional[BetaAppServiceAppState] = None + name: Optional[StrictStr] = None + api_config: Optional[BetaAppServiceAPIConfig] = Field(default=None, alias="apiConfig") + oidc_config: Optional[BetaAppServiceOIDCConfig] = Field(default=None, alias="oidcConfig") + saml_config: Optional[BetaAppServiceSAMLConfig] = Field(default=None, alias="samlConfig") + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "state", "name", "apiConfig", "oidcConfig", "samlConfig"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceApplication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of api_config + if self.api_config: + _dict['apiConfig'] = self.api_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_config + if self.oidc_config: + _dict['oidcConfig'] = self.oidc_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of saml_config + if self.saml_config: + _dict['samlConfig'] = self.saml_config.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceApplication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "state": obj.get("state"), + "name": obj.get("name"), + "apiConfig": BetaAppServiceAPIConfig.from_dict(obj["apiConfig"]) if obj.get("apiConfig") is not None else None, + "oidcConfig": BetaAppServiceOIDCConfig.from_dict(obj["oidcConfig"]) if obj.get("oidcConfig") is not None else None, + "samlConfig": BetaAppServiceSAMLConfig.from_dict(obj["samlConfig"]) if obj.get("samlConfig") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_application_key.py b/zitadel_client/models/beta_app_service_application_key.py new file mode 100644 index 00000000..7ff89b73 --- /dev/null +++ b/zitadel_client/models/beta_app_service_application_key.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceApplicationKey(BaseModel): + """ + BetaAppServiceApplicationKey + """ # noqa: E501 + id: Optional[StrictStr] = None + application_id: Optional[StrictStr] = Field(default=None, alias="applicationId") + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["id", "applicationId", "projectId", "creationDate", "organizationId", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceApplicationKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceApplicationKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "applicationId": obj.get("applicationId"), + "projectId": obj.get("projectId"), + "creationDate": obj.get("creationDate"), + "organizationId": obj.get("organizationId"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_application_keys_sorting.py b/zitadel_client/models/beta_app_service_application_keys_sorting.py new file mode 100644 index 00000000..ba3cf6e1 --- /dev/null +++ b/zitadel_client/models/beta_app_service_application_keys_sorting.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceApplicationKeysSorting(str, Enum): + """ + BetaAppServiceApplicationKeysSorting + """ + + """ + allowed enum values + """ + APPLICATION_KEYS_SORT_BY_ID = 'APPLICATION_KEYS_SORT_BY_ID' + APPLICATION_KEYS_SORT_BY_PROJECT_ID = 'APPLICATION_KEYS_SORT_BY_PROJECT_ID' + APPLICATION_KEYS_SORT_BY_APPLICATION_ID = 'APPLICATION_KEYS_SORT_BY_APPLICATION_ID' + APPLICATION_KEYS_SORT_BY_CREATION_DATE = 'APPLICATION_KEYS_SORT_BY_CREATION_DATE' + APPLICATION_KEYS_SORT_BY_ORGANIZATION_ID = 'APPLICATION_KEYS_SORT_BY_ORGANIZATION_ID' + APPLICATION_KEYS_SORT_BY_EXPIRATION = 'APPLICATION_KEYS_SORT_BY_EXPIRATION' + APPLICATION_KEYS_SORT_BY_TYPE = 'APPLICATION_KEYS_SORT_BY_TYPE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceApplicationKeysSorting from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_application_name_query.py b/zitadel_client/models/beta_app_service_application_name_query.py new file mode 100644 index 00000000..2b7fffda --- /dev/null +++ b/zitadel_client/models/beta_app_service_application_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_text_filter_method import BetaAppServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceApplicationNameQuery(BaseModel): + """ + BetaAppServiceApplicationNameQuery + """ # noqa: E501 + name: Optional[StrictStr] = None + method: Optional[BetaAppServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["name", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceApplicationNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceApplicationNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_application_search_filter.py b/zitadel_client/models/beta_app_service_application_search_filter.py new file mode 100644 index 00000000..5d29c499 --- /dev/null +++ b/zitadel_client/models/beta_app_service_application_search_filter.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_app_state import BetaAppServiceAppState +from zitadel_client.models.beta_app_service_application_name_query import BetaAppServiceApplicationNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceApplicationSearchFilter(BaseModel): + """ + BetaAppServiceApplicationSearchFilter + """ # noqa: E501 + api_app_only: Optional[StrictBool] = Field(default=None, alias="apiAppOnly") + name_filter: Optional[BetaAppServiceApplicationNameQuery] = Field(default=None, alias="nameFilter") + oidc_app_only: Optional[StrictBool] = Field(default=None, alias="oidcAppOnly") + saml_app_only: Optional[StrictBool] = Field(default=None, alias="samlAppOnly") + state_filter: Optional[BetaAppServiceAppState] = Field(default=None, alias="stateFilter") + __properties: ClassVar[List[str]] = ["apiAppOnly", "nameFilter", "oidcAppOnly", "samlAppOnly", "stateFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceApplicationSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of name_filter + if self.name_filter: + _dict['nameFilter'] = self.name_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceApplicationSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiAppOnly": obj.get("apiAppOnly"), + "nameFilter": BetaAppServiceApplicationNameQuery.from_dict(obj["nameFilter"]) if obj.get("nameFilter") is not None else None, + "oidcAppOnly": obj.get("oidcAppOnly"), + "samlAppOnly": obj.get("samlAppOnly"), + "stateFilter": obj.get("stateFilter") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_connect_error.py b/zitadel_client/models/beta_app_service_connect_error.py new file mode 100644 index 00000000..5a98d4a8 --- /dev/null +++ b/zitadel_client/models/beta_app_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_any import BetaAppServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaAppServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaAppServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_activate_web_key_response.py b/zitadel_client/models/beta_app_service_create_api_application_request.py similarity index 77% rename from zitadel_client/models/web_key_service_beta_activate_web_key_response.py rename to zitadel_client/models/beta_app_service_create_api_application_request.py index 5ebc1a51..a4571277 100644 --- a/zitadel_client/models/web_key_service_beta_activate_web_key_response.py +++ b/zitadel_client/models/beta_app_service_create_api_application_request.py @@ -17,17 +17,18 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_api_auth_method_type import BetaAppServiceAPIAuthMethodType from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaActivateWebKeyResponse(BaseModel): +class BetaAppServiceCreateAPIApplicationRequest(BaseModel): """ - WebKeyServiceBetaActivateWebKeyResponse + BetaAppServiceCreateAPIApplicationRequest """ # noqa: E501 - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the activation of the key.", alias="changeDate") + auth_method_type: Optional[BetaAppServiceAPIAuthMethodType] = Field(default=None, alias="authMethodType") + __properties: ClassVar[List[str]] = ["authMethodType"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaActivateWebKeyResponse from a JSON string""" + """Create an instance of BetaAppServiceCreateAPIApplicationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaActivateWebKeyResponse from a dict""" + """Create an instance of BetaAppServiceCreateAPIApplicationRequest from a dict""" if obj is None: return None @@ -80,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "changeDate": obj.get("changeDate") + "authMethodType": obj.get("authMethodType") }) return _obj diff --git a/zitadel_client/models/beta_app_service_create_api_application_response.py b/zitadel_client/models/beta_app_service_create_api_application_response.py new file mode 100644 index 00000000..51288dd7 --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_api_application_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateAPIApplicationResponse(BaseModel): + """ + BetaAppServiceCreateAPIApplicationResponse + """ # noqa: E501 + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + client_secret: Optional[StrictStr] = Field(default=None, alias="clientSecret") + __properties: ClassVar[List[str]] = ["clientId", "clientSecret"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateAPIApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateAPIApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_create_application_key_request.py b/zitadel_client/models/beta_app_service_create_application_key_request.py new file mode 100644 index 00000000..af6a4b4d --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_application_key_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateApplicationKeyRequest(BaseModel): + """ + BetaAppServiceCreateApplicationKeyRequest + """ # noqa: E501 + app_id: Optional[StrictStr] = Field(default=None, alias="appId") + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["appId", "projectId", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appId": obj.get("appId"), + "projectId": obj.get("projectId"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_create_application_key_response.py b/zitadel_client/models/beta_app_service_create_application_key_response.py new file mode 100644 index 00000000..40d7be42 --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_application_key_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateApplicationKeyResponse(BaseModel): + """ + BetaAppServiceCreateApplicationKeyResponse + """ # noqa: E501 + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + key_details: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, alias="keyDetails") + __properties: ClassVar[List[str]] = ["id", "creationDate", "keyDetails"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "keyDetails": obj.get("keyDetails") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_create_application_request.py b/zitadel_client/models/beta_app_service_create_application_request.py new file mode 100644 index 00000000..63410f1a --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_application_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_create_api_application_request import BetaAppServiceCreateAPIApplicationRequest +from zitadel_client.models.beta_app_service_create_oidc_application_request import BetaAppServiceCreateOIDCApplicationRequest +from zitadel_client.models.beta_app_service_create_saml_application_request import BetaAppServiceCreateSAMLApplicationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateApplicationRequest(BaseModel): + """ + BetaAppServiceCreateApplicationRequest + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + id: Optional[StrictStr] = None + name: StrictStr + api_request: Optional[BetaAppServiceCreateAPIApplicationRequest] = Field(default=None, alias="apiRequest") + oidc_request: Optional[BetaAppServiceCreateOIDCApplicationRequest] = Field(default=None, alias="oidcRequest") + saml_request: Optional[BetaAppServiceCreateSAMLApplicationRequest] = Field(default=None, alias="samlRequest") + __properties: ClassVar[List[str]] = ["projectId", "id", "name", "apiRequest", "oidcRequest", "samlRequest"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of api_request + if self.api_request: + _dict['apiRequest'] = self.api_request.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_request + if self.oidc_request: + _dict['oidcRequest'] = self.oidc_request.to_dict() + # override the default output from pydantic by calling `to_dict()` of saml_request + if self.saml_request: + _dict['samlRequest'] = self.saml_request.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "id": obj.get("id"), + "name": obj.get("name"), + "apiRequest": BetaAppServiceCreateAPIApplicationRequest.from_dict(obj["apiRequest"]) if obj.get("apiRequest") is not None else None, + "oidcRequest": BetaAppServiceCreateOIDCApplicationRequest.from_dict(obj["oidcRequest"]) if obj.get("oidcRequest") is not None else None, + "samlRequest": BetaAppServiceCreateSAMLApplicationRequest.from_dict(obj["samlRequest"]) if obj.get("samlRequest") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_create_application_response.py b/zitadel_client/models/beta_app_service_create_application_response.py new file mode 100644 index 00000000..a0386adc --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_application_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_create_api_application_response import BetaAppServiceCreateAPIApplicationResponse +from zitadel_client.models.beta_app_service_create_oidc_application_response import BetaAppServiceCreateOIDCApplicationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateApplicationResponse(BaseModel): + """ + BetaAppServiceCreateApplicationResponse + """ # noqa: E501 + app_id: Optional[StrictStr] = Field(default=None, alias="appId") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + api_response: Optional[BetaAppServiceCreateAPIApplicationResponse] = Field(default=None, alias="apiResponse") + oidc_response: Optional[BetaAppServiceCreateOIDCApplicationResponse] = Field(default=None, alias="oidcResponse") + saml_response: Optional[Dict[str, Any]] = Field(default=None, alias="samlResponse") + __properties: ClassVar[List[str]] = ["appId", "creationDate", "apiResponse", "oidcResponse", "samlResponse"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of api_response + if self.api_response: + _dict['apiResponse'] = self.api_response.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_response + if self.oidc_response: + _dict['oidcResponse'] = self.oidc_response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appId": obj.get("appId"), + "creationDate": obj.get("creationDate"), + "apiResponse": BetaAppServiceCreateAPIApplicationResponse.from_dict(obj["apiResponse"]) if obj.get("apiResponse") is not None else None, + "oidcResponse": BetaAppServiceCreateOIDCApplicationResponse.from_dict(obj["oidcResponse"]) if obj.get("oidcResponse") is not None else None, + "samlResponse": obj.get("samlResponse") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_create_oidc_application_request.py b/zitadel_client/models/beta_app_service_create_oidc_application_request.py new file mode 100644 index 00000000..a28d10d7 --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_oidc_application_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_login_version import BetaAppServiceLoginVersion +from zitadel_client.models.beta_app_service_oidc_app_type import BetaAppServiceOIDCAppType +from zitadel_client.models.beta_app_service_oidc_auth_method_type import BetaAppServiceOIDCAuthMethodType +from zitadel_client.models.beta_app_service_oidc_grant_type import BetaAppServiceOIDCGrantType +from zitadel_client.models.beta_app_service_oidc_response_type import BetaAppServiceOIDCResponseType +from zitadel_client.models.beta_app_service_oidc_token_type import BetaAppServiceOIDCTokenType +from zitadel_client.models.beta_app_service_oidc_version import BetaAppServiceOIDCVersion +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateOIDCApplicationRequest(BaseModel): + """ + BetaAppServiceCreateOIDCApplicationRequest + """ # noqa: E501 + redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="Callback URI of the authorization request where the code or tokens will be sent to", alias="redirectUris") + response_types: Optional[List[BetaAppServiceOIDCResponseType]] = Field(default=None, alias="responseTypes") + grant_types: Optional[List[BetaAppServiceOIDCGrantType]] = Field(default=None, alias="grantTypes") + app_type: Optional[BetaAppServiceOIDCAppType] = Field(default=None, alias="appType") + auth_method_type: Optional[BetaAppServiceOIDCAuthMethodType] = Field(default=None, alias="authMethodType") + post_logout_redirect_uris: Optional[List[StrictStr]] = Field(default=None, description="ZITADEL will redirect to this link after a successful logout", alias="postLogoutRedirectUris") + version: Optional[BetaAppServiceOIDCVersion] = None + dev_mode: Optional[StrictBool] = Field(default=None, alias="devMode") + access_token_type: Optional[BetaAppServiceOIDCTokenType] = Field(default=None, alias="accessTokenType") + access_token_role_assertion: Optional[StrictBool] = Field(default=None, alias="accessTokenRoleAssertion") + id_token_role_assertion: Optional[StrictBool] = Field(default=None, alias="idTokenRoleAssertion") + id_token_userinfo_assertion: Optional[StrictBool] = Field(default=None, alias="idTokenUserinfoAssertion") + clock_skew: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="clockSkew") + additional_origins: Optional[List[StrictStr]] = Field(default=None, alias="additionalOrigins") + skip_native_app_success_page: Optional[StrictBool] = Field(default=None, alias="skipNativeAppSuccessPage") + back_channel_logout_uri: Optional[StrictStr] = Field(default=None, alias="backChannelLogoutUri") + login_version: Optional[BetaAppServiceLoginVersion] = Field(default=None, alias="loginVersion") + __properties: ClassVar[List[str]] = ["redirectUris", "responseTypes", "grantTypes", "appType", "authMethodType", "postLogoutRedirectUris", "version", "devMode", "accessTokenType", "accessTokenRoleAssertion", "idTokenRoleAssertion", "idTokenUserinfoAssertion", "clockSkew", "additionalOrigins", "skipNativeAppSuccessPage", "backChannelLogoutUri", "loginVersion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateOIDCApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of login_version + if self.login_version: + _dict['loginVersion'] = self.login_version.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateOIDCApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "redirectUris": obj.get("redirectUris"), + "responseTypes": obj.get("responseTypes"), + "grantTypes": obj.get("grantTypes"), + "appType": obj.get("appType"), + "authMethodType": obj.get("authMethodType"), + "postLogoutRedirectUris": obj.get("postLogoutRedirectUris"), + "version": obj.get("version"), + "devMode": obj.get("devMode"), + "accessTokenType": obj.get("accessTokenType"), + "accessTokenRoleAssertion": obj.get("accessTokenRoleAssertion"), + "idTokenRoleAssertion": obj.get("idTokenRoleAssertion"), + "idTokenUserinfoAssertion": obj.get("idTokenUserinfoAssertion"), + "clockSkew": obj.get("clockSkew"), + "additionalOrigins": obj.get("additionalOrigins"), + "skipNativeAppSuccessPage": obj.get("skipNativeAppSuccessPage"), + "backChannelLogoutUri": obj.get("backChannelLogoutUri"), + "loginVersion": BetaAppServiceLoginVersion.from_dict(obj["loginVersion"]) if obj.get("loginVersion") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_create_oidc_application_response.py b/zitadel_client/models/beta_app_service_create_oidc_application_response.py new file mode 100644 index 00000000..14eb3fff --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_oidc_application_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_oidc_localized_message import BetaAppServiceOIDCLocalizedMessage +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateOIDCApplicationResponse(BaseModel): + """ + BetaAppServiceCreateOIDCApplicationResponse + """ # noqa: E501 + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + client_secret: Optional[StrictStr] = Field(default=None, alias="clientSecret") + none_compliant: Optional[StrictBool] = Field(default=None, alias="noneCompliant") + compliance_problems: Optional[List[BetaAppServiceOIDCLocalizedMessage]] = Field(default=None, alias="complianceProblems") + __properties: ClassVar[List[str]] = ["clientId", "clientSecret", "noneCompliant", "complianceProblems"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateOIDCApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in compliance_problems (list) + _items = [] + if self.compliance_problems: + for _item_compliance_problems in self.compliance_problems: + if _item_compliance_problems: + _items.append(_item_compliance_problems.to_dict()) + _dict['complianceProblems'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateOIDCApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "noneCompliant": obj.get("noneCompliant"), + "complianceProblems": [BetaAppServiceOIDCLocalizedMessage.from_dict(_item) for _item in obj["complianceProblems"]] if obj.get("complianceProblems") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_create_saml_application_request.py b/zitadel_client/models/beta_app_service_create_saml_application_request.py new file mode 100644 index 00000000..d5ce77cf --- /dev/null +++ b/zitadel_client/models/beta_app_service_create_saml_application_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_app_service_login_version import BetaAppServiceLoginVersion +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceCreateSAMLApplicationRequest(BaseModel): + """ + BetaAppServiceCreateSAMLApplicationRequest + """ # noqa: E501 + login_version: Optional[BetaAppServiceLoginVersion] = Field(default=None, alias="loginVersion") + metadata_url: Optional[StrictStr] = Field(default=None, alias="metadataUrl") + metadata_xml: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, alias="metadataXml") + __properties: ClassVar[List[str]] = ["loginVersion", "metadataUrl", "metadataXml"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateSAMLApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of login_version + if self.login_version: + _dict['loginVersion'] = self.login_version.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceCreateSAMLApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginVersion": BetaAppServiceLoginVersion.from_dict(obj["loginVersion"]) if obj.get("loginVersion") is not None else None, + "metadataUrl": obj.get("metadataUrl"), + "metadataXml": obj.get("metadataXml") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_deactivate_application_request.py b/zitadel_client/models/beta_app_service_deactivate_application_request.py new file mode 100644 index 00000000..e6fabd97 --- /dev/null +++ b/zitadel_client/models/beta_app_service_deactivate_application_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceDeactivateApplicationRequest(BaseModel): + """ + BetaAppServiceDeactivateApplicationRequest + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["projectId", "id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceDeactivateApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceDeactivateApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_deactivate_application_response.py b/zitadel_client/models/beta_app_service_deactivate_application_response.py new file mode 100644 index 00000000..3836cf5b --- /dev/null +++ b/zitadel_client/models/beta_app_service_deactivate_application_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceDeactivateApplicationResponse(BaseModel): + """ + BetaAppServiceDeactivateApplicationResponse + """ # noqa: E501 + deactivation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deactivationDate") + __properties: ClassVar[List[str]] = ["deactivationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceDeactivateApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceDeactivateApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deactivationDate": obj.get("deactivationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_delete_application_key_request.py b/zitadel_client/models/beta_app_service_delete_application_key_request.py new file mode 100644 index 00000000..f48b8db6 --- /dev/null +++ b/zitadel_client/models/beta_app_service_delete_application_key_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceDeleteApplicationKeyRequest(BaseModel): + """ + BetaAppServiceDeleteApplicationKeyRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + application_id: Optional[StrictStr] = Field(default=None, alias="applicationId") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["id", "projectId", "applicationId", "organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "projectId": obj.get("projectId"), + "applicationId": obj.get("applicationId"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_delete_application_key_response.py b/zitadel_client/models/beta_app_service_delete_application_key_response.py new file mode 100644 index 00000000..ad56f797 --- /dev/null +++ b/zitadel_client/models/beta_app_service_delete_application_key_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceDeleteApplicationKeyResponse(BaseModel): + """ + BetaAppServiceDeleteApplicationKeyResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_delete_application_request.py b/zitadel_client/models/beta_app_service_delete_application_request.py new file mode 100644 index 00000000..1c785a6b --- /dev/null +++ b/zitadel_client/models/beta_app_service_delete_application_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceDeleteApplicationRequest(BaseModel): + """ + BetaAppServiceDeleteApplicationRequest + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["projectId", "id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_delete_application_response.py b/zitadel_client/models/beta_app_service_delete_application_response.py new file mode 100644 index 00000000..1d5d09b1 --- /dev/null +++ b/zitadel_client/models/beta_app_service_delete_application_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceDeleteApplicationResponse(BaseModel): + """ + BetaAppServiceDeleteApplicationResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceDeleteApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_get_application_key_request.py b/zitadel_client/models/beta_app_service_get_application_key_request.py new file mode 100644 index 00000000..858dc74c --- /dev/null +++ b/zitadel_client/models/beta_app_service_get_application_key_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceGetApplicationKeyRequest(BaseModel): + """ + BetaAppServiceGetApplicationKeyRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + application_id: Optional[StrictStr] = Field(default=None, alias="applicationId") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["id", "projectId", "applicationId", "organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "projectId": obj.get("projectId"), + "applicationId": obj.get("applicationId"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_get_application_key_response.py b/zitadel_client/models/beta_app_service_get_application_key_response.py new file mode 100644 index 00000000..8312b53f --- /dev/null +++ b/zitadel_client/models/beta_app_service_get_application_key_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceGetApplicationKeyResponse(BaseModel): + """ + BetaAppServiceGetApplicationKeyResponse + """ # noqa: E501 + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["id", "creationDate", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_get_application_request.py b/zitadel_client/models/beta_app_service_get_application_request.py new file mode 100644 index 00000000..c94bf32b --- /dev/null +++ b/zitadel_client/models/beta_app_service_get_application_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceGetApplicationRequest(BaseModel): + """ + BetaAppServiceGetApplicationRequest + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_get_application_response.py b/zitadel_client/models/beta_app_service_get_application_response.py new file mode 100644 index 00000000..f29c5bf8 --- /dev/null +++ b/zitadel_client/models/beta_app_service_get_application_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_application import BetaAppServiceApplication +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceGetApplicationResponse(BaseModel): + """ + BetaAppServiceGetApplicationResponse + """ # noqa: E501 + app: Optional[BetaAppServiceApplication] = None + __properties: ClassVar[List[str]] = ["app"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of app + if self.app: + _dict['app'] = self.app.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceGetApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "app": BetaAppServiceApplication.from_dict(obj["app"]) if obj.get("app") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_list_application_keys_request.py b/zitadel_client/models/beta_app_service_list_application_keys_request.py new file mode 100644 index 00000000..bed1a386 --- /dev/null +++ b/zitadel_client/models/beta_app_service_list_application_keys_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_application_keys_sorting import BetaAppServiceApplicationKeysSorting +from zitadel_client.models.beta_app_service_pagination_request import BetaAppServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceListApplicationKeysRequest(BaseModel): + """ + BetaAppServiceListApplicationKeysRequest + """ # noqa: E501 + pagination: Optional[BetaAppServicePaginationRequest] = None + sorting_column: Optional[BetaAppServiceApplicationKeysSorting] = Field(default=None, alias="sortingColumn") + application_id: Optional[StrictStr] = Field(default=None, alias="applicationId") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "applicationId", "organizationId", "projectId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationKeysRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationKeysRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaAppServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "applicationId": obj.get("applicationId"), + "organizationId": obj.get("organizationId"), + "projectId": obj.get("projectId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_list_application_keys_response.py b/zitadel_client/models/beta_app_service_list_application_keys_response.py new file mode 100644 index 00000000..c27a1252 --- /dev/null +++ b/zitadel_client/models/beta_app_service_list_application_keys_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_application_key import BetaAppServiceApplicationKey +from zitadel_client.models.beta_app_service_pagination_response import BetaAppServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceListApplicationKeysResponse(BaseModel): + """ + BetaAppServiceListApplicationKeysResponse + """ # noqa: E501 + keys: Optional[List[BetaAppServiceApplicationKey]] = None + pagination: Optional[BetaAppServicePaginationResponse] = None + __properties: ClassVar[List[str]] = ["keys", "pagination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationKeysResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in keys (list) + _items = [] + if self.keys: + for _item_keys in self.keys: + if _item_keys: + _items.append(_item_keys.to_dict()) + _dict['keys'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationKeysResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keys": [BetaAppServiceApplicationKey.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None, + "pagination": BetaAppServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_list_applications_request.py b/zitadel_client/models/beta_app_service_list_applications_request.py new file mode 100644 index 00000000..28c3ce06 --- /dev/null +++ b/zitadel_client/models/beta_app_service_list_applications_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_app_sorting import BetaAppServiceAppSorting +from zitadel_client.models.beta_app_service_application_search_filter import BetaAppServiceApplicationSearchFilter +from zitadel_client.models.beta_app_service_pagination_request import BetaAppServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceListApplicationsRequest(BaseModel): + """ + BetaAppServiceListApplicationsRequest + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + pagination: Optional[BetaAppServicePaginationRequest] = None + filters: Optional[List[BetaAppServiceApplicationSearchFilter]] = Field(default=None, description="criteria the client is looking for") + sorting_column: Optional[BetaAppServiceAppSorting] = Field(default=None, alias="sortingColumn") + __properties: ClassVar[List[str]] = ["projectId", "pagination", "filters", "sortingColumn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "pagination": BetaAppServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "filters": [BetaAppServiceApplicationSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "sortingColumn": obj.get("sortingColumn") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_list_applications_response.py b/zitadel_client/models/beta_app_service_list_applications_response.py new file mode 100644 index 00000000..67a53ae0 --- /dev/null +++ b/zitadel_client/models/beta_app_service_list_applications_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_application import BetaAppServiceApplication +from zitadel_client.models.beta_app_service_pagination_response import BetaAppServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceListApplicationsResponse(BaseModel): + """ + BetaAppServiceListApplicationsResponse + """ # noqa: E501 + applications: Optional[List[BetaAppServiceApplication]] = None + pagination: Optional[BetaAppServicePaginationResponse] = None + __properties: ClassVar[List[str]] = ["applications", "pagination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in applications (list) + _items = [] + if self.applications: + for _item_applications in self.applications: + if _item_applications: + _items.append(_item_applications.to_dict()) + _dict['applications'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceListApplicationsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "applications": [BetaAppServiceApplication.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None, + "pagination": BetaAppServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_login_v2.py b/zitadel_client/models/beta_app_service_login_v2.py new file mode 100644 index 00000000..f3ac01ac --- /dev/null +++ b/zitadel_client/models/beta_app_service_login_v2.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceLoginV2(BaseModel): + """ + BetaAppServiceLoginV2 + """ # noqa: E501 + base_uri: Optional[StrictStr] = Field(default=None, description="Optionally specify a base uri of the login UI. If unspecified the default URI will be used.", alias="baseUri") + __properties: ClassVar[List[str]] = ["baseUri"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceLoginV2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if base_uri (nullable) is None + # and model_fields_set contains the field + if self.base_uri is None and "base_uri" in self.model_fields_set: + _dict['baseUri'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceLoginV2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseUri": obj.get("baseUri") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_login_version.py b/zitadel_client/models/beta_app_service_login_version.py new file mode 100644 index 00000000..ecc0a02d --- /dev/null +++ b/zitadel_client/models/beta_app_service_login_version.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_login_v2 import BetaAppServiceLoginV2 +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceLoginVersion(BaseModel): + """ + BetaAppServiceLoginVersion + """ # noqa: E501 + login_v1: Optional[Dict[str, Any]] = Field(default=None, alias="loginV1") + login_v2: Optional[BetaAppServiceLoginV2] = Field(default=None, alias="loginV2") + __properties: ClassVar[List[str]] = ["loginV1", "loginV2"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceLoginVersion from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of login_v2 + if self.login_v2: + _dict['loginV2'] = self.login_v2.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceLoginVersion from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginV1": obj.get("loginV1"), + "loginV2": BetaAppServiceLoginV2.from_dict(obj["loginV2"]) if obj.get("loginV2") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_oidc_app_type.py b/zitadel_client/models/beta_app_service_oidc_app_type.py new file mode 100644 index 00000000..2f11f657 --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_app_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceOIDCAppType(str, Enum): + """ + BetaAppServiceOIDCAppType + """ + + """ + allowed enum values + """ + OIDC_APP_TYPE_WEB = 'OIDC_APP_TYPE_WEB' + OIDC_APP_TYPE_USER_AGENT = 'OIDC_APP_TYPE_USER_AGENT' + OIDC_APP_TYPE_NATIVE = 'OIDC_APP_TYPE_NATIVE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceOIDCAppType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_oidc_auth_method_type.py b/zitadel_client/models/beta_app_service_oidc_auth_method_type.py new file mode 100644 index 00000000..a1a407e1 --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_auth_method_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceOIDCAuthMethodType(str, Enum): + """ + BetaAppServiceOIDCAuthMethodType + """ + + """ + allowed enum values + """ + OIDC_AUTH_METHOD_TYPE_BASIC = 'OIDC_AUTH_METHOD_TYPE_BASIC' + OIDC_AUTH_METHOD_TYPE_POST = 'OIDC_AUTH_METHOD_TYPE_POST' + OIDC_AUTH_METHOD_TYPE_NONE = 'OIDC_AUTH_METHOD_TYPE_NONE' + OIDC_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT = 'OIDC_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceOIDCAuthMethodType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_oidc_config.py b/zitadel_client/models/beta_app_service_oidc_config.py new file mode 100644 index 00000000..876b3de3 --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_config.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_login_version import BetaAppServiceLoginVersion +from zitadel_client.models.beta_app_service_oidc_app_type import BetaAppServiceOIDCAppType +from zitadel_client.models.beta_app_service_oidc_auth_method_type import BetaAppServiceOIDCAuthMethodType +from zitadel_client.models.beta_app_service_oidc_grant_type import BetaAppServiceOIDCGrantType +from zitadel_client.models.beta_app_service_oidc_localized_message import BetaAppServiceOIDCLocalizedMessage +from zitadel_client.models.beta_app_service_oidc_response_type import BetaAppServiceOIDCResponseType +from zitadel_client.models.beta_app_service_oidc_token_type import BetaAppServiceOIDCTokenType +from zitadel_client.models.beta_app_service_oidc_version import BetaAppServiceOIDCVersion +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceOIDCConfig(BaseModel): + """ + BetaAppServiceOIDCConfig + """ # noqa: E501 + redirect_uris: Optional[List[StrictStr]] = Field(default=None, alias="redirectUris") + response_types: Optional[List[BetaAppServiceOIDCResponseType]] = Field(default=None, alias="responseTypes") + grant_types: Optional[List[BetaAppServiceOIDCGrantType]] = Field(default=None, alias="grantTypes") + app_type: Optional[BetaAppServiceOIDCAppType] = Field(default=None, alias="appType") + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + auth_method_type: Optional[BetaAppServiceOIDCAuthMethodType] = Field(default=None, alias="authMethodType") + post_logout_redirect_uris: Optional[List[StrictStr]] = Field(default=None, alias="postLogoutRedirectUris") + version: Optional[BetaAppServiceOIDCVersion] = None + none_compliant: Optional[StrictBool] = Field(default=None, alias="noneCompliant") + compliance_problems: Optional[List[BetaAppServiceOIDCLocalizedMessage]] = Field(default=None, alias="complianceProblems") + dev_mode: Optional[StrictBool] = Field(default=None, alias="devMode") + access_token_type: Optional[BetaAppServiceOIDCTokenType] = Field(default=None, alias="accessTokenType") + access_token_role_assertion: Optional[StrictBool] = Field(default=None, alias="accessTokenRoleAssertion") + id_token_role_assertion: Optional[StrictBool] = Field(default=None, alias="idTokenRoleAssertion") + id_token_userinfo_assertion: Optional[StrictBool] = Field(default=None, alias="idTokenUserinfoAssertion") + clock_skew: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="clockSkew") + additional_origins: Optional[List[StrictStr]] = Field(default=None, alias="additionalOrigins") + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") + skip_native_app_success_page: Optional[StrictBool] = Field(default=None, alias="skipNativeAppSuccessPage") + back_channel_logout_uri: Optional[StrictStr] = Field(default=None, alias="backChannelLogoutUri") + login_version: Optional[BetaAppServiceLoginVersion] = Field(default=None, alias="loginVersion") + __properties: ClassVar[List[str]] = ["redirectUris", "responseTypes", "grantTypes", "appType", "clientId", "authMethodType", "postLogoutRedirectUris", "version", "noneCompliant", "complianceProblems", "devMode", "accessTokenType", "accessTokenRoleAssertion", "idTokenRoleAssertion", "idTokenUserinfoAssertion", "clockSkew", "additionalOrigins", "allowedOrigins", "skipNativeAppSuccessPage", "backChannelLogoutUri", "loginVersion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceOIDCConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in compliance_problems (list) + _items = [] + if self.compliance_problems: + for _item_compliance_problems in self.compliance_problems: + if _item_compliance_problems: + _items.append(_item_compliance_problems.to_dict()) + _dict['complianceProblems'] = _items + # override the default output from pydantic by calling `to_dict()` of login_version + if self.login_version: + _dict['loginVersion'] = self.login_version.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceOIDCConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "redirectUris": obj.get("redirectUris"), + "responseTypes": obj.get("responseTypes"), + "grantTypes": obj.get("grantTypes"), + "appType": obj.get("appType"), + "clientId": obj.get("clientId"), + "authMethodType": obj.get("authMethodType"), + "postLogoutRedirectUris": obj.get("postLogoutRedirectUris"), + "version": obj.get("version"), + "noneCompliant": obj.get("noneCompliant"), + "complianceProblems": [BetaAppServiceOIDCLocalizedMessage.from_dict(_item) for _item in obj["complianceProblems"]] if obj.get("complianceProblems") is not None else None, + "devMode": obj.get("devMode"), + "accessTokenType": obj.get("accessTokenType"), + "accessTokenRoleAssertion": obj.get("accessTokenRoleAssertion"), + "idTokenRoleAssertion": obj.get("idTokenRoleAssertion"), + "idTokenUserinfoAssertion": obj.get("idTokenUserinfoAssertion"), + "clockSkew": obj.get("clockSkew"), + "additionalOrigins": obj.get("additionalOrigins"), + "allowedOrigins": obj.get("allowedOrigins"), + "skipNativeAppSuccessPage": obj.get("skipNativeAppSuccessPage"), + "backChannelLogoutUri": obj.get("backChannelLogoutUri"), + "loginVersion": BetaAppServiceLoginVersion.from_dict(obj["loginVersion"]) if obj.get("loginVersion") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_oidc_grant_type.py b/zitadel_client/models/beta_app_service_oidc_grant_type.py new file mode 100644 index 00000000..67a73603 --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_grant_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceOIDCGrantType(str, Enum): + """ + BetaAppServiceOIDCGrantType + """ + + """ + allowed enum values + """ + OIDC_GRANT_TYPE_AUTHORIZATION_CODE = 'OIDC_GRANT_TYPE_AUTHORIZATION_CODE' + OIDC_GRANT_TYPE_IMPLICIT = 'OIDC_GRANT_TYPE_IMPLICIT' + OIDC_GRANT_TYPE_REFRESH_TOKEN = 'OIDC_GRANT_TYPE_REFRESH_TOKEN' + OIDC_GRANT_TYPE_DEVICE_CODE = 'OIDC_GRANT_TYPE_DEVICE_CODE' + OIDC_GRANT_TYPE_TOKEN_EXCHANGE = 'OIDC_GRANT_TYPE_TOKEN_EXCHANGE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceOIDCGrantType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_oidc_localized_message.py b/zitadel_client/models/beta_app_service_oidc_localized_message.py new file mode 100644 index 00000000..ad46711e --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_localized_message.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceOIDCLocalizedMessage(BaseModel): + """ + BetaAppServiceOIDCLocalizedMessage + """ # noqa: E501 + key: Optional[StrictStr] = None + localized_message: Optional[StrictStr] = Field(default=None, alias="localizedMessage") + __properties: ClassVar[List[str]] = ["key", "localizedMessage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceOIDCLocalizedMessage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceOIDCLocalizedMessage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "localizedMessage": obj.get("localizedMessage") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_oidc_response_type.py b/zitadel_client/models/beta_app_service_oidc_response_type.py new file mode 100644 index 00000000..ea1f650c --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_response_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceOIDCResponseType(str, Enum): + """ + BetaAppServiceOIDCResponseType + """ + + """ + allowed enum values + """ + OIDC_RESPONSE_TYPE_UNSPECIFIED = 'OIDC_RESPONSE_TYPE_UNSPECIFIED' + OIDC_RESPONSE_TYPE_CODE = 'OIDC_RESPONSE_TYPE_CODE' + OIDC_RESPONSE_TYPE_ID_TOKEN = 'OIDC_RESPONSE_TYPE_ID_TOKEN' + OIDC_RESPONSE_TYPE_ID_TOKEN_TOKEN = 'OIDC_RESPONSE_TYPE_ID_TOKEN_TOKEN' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceOIDCResponseType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_oidc_token_type.py b/zitadel_client/models/beta_app_service_oidc_token_type.py new file mode 100644 index 00000000..fc605caa --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_token_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceOIDCTokenType(str, Enum): + """ + BetaAppServiceOIDCTokenType + """ + + """ + allowed enum values + """ + OIDC_TOKEN_TYPE_BEARER = 'OIDC_TOKEN_TYPE_BEARER' + OIDC_TOKEN_TYPE_JWT = 'OIDC_TOKEN_TYPE_JWT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceOIDCTokenType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_oidc_version.py b/zitadel_client/models/beta_app_service_oidc_version.py new file mode 100644 index 00000000..b2c01913 --- /dev/null +++ b/zitadel_client/models/beta_app_service_oidc_version.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceOIDCVersion(str, Enum): + """ + BetaAppServiceOIDCVersion + """ + + """ + allowed enum values + """ + OIDC_VERSION_1_0 = 'OIDC_VERSION_1_0' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceOIDCVersion from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_app_service_pagination_request.py b/zitadel_client/models/beta_app_service_pagination_request.py new file mode 100644 index 00000000..f38e09ad --- /dev/null +++ b/zitadel_client/models/beta_app_service_pagination_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServicePaginationRequest(BaseModel): + """ + BetaAppServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServicePaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServicePaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_pagination_response.py b/zitadel_client/models/beta_app_service_pagination_response.py new file mode 100644 index 00000000..9e4a476f --- /dev/null +++ b/zitadel_client/models/beta_app_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServicePaginationResponse(BaseModel): + """ + BetaAppServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_reactivate_application_request.py b/zitadel_client/models/beta_app_service_reactivate_application_request.py new file mode 100644 index 00000000..47330637 --- /dev/null +++ b/zitadel_client/models/beta_app_service_reactivate_application_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceReactivateApplicationRequest(BaseModel): + """ + BetaAppServiceReactivateApplicationRequest + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["projectId", "id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceReactivateApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceReactivateApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_reactivate_application_response.py b/zitadel_client/models/beta_app_service_reactivate_application_response.py new file mode 100644 index 00000000..f29aae49 --- /dev/null +++ b/zitadel_client/models/beta_app_service_reactivate_application_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceReactivateApplicationResponse(BaseModel): + """ + BetaAppServiceReactivateApplicationResponse + """ # noqa: E501 + reactivation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="reactivationDate") + __properties: ClassVar[List[str]] = ["reactivationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceReactivateApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceReactivateApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reactivationDate": obj.get("reactivationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_regenerate_client_secret_request.py b/zitadel_client/models/beta_app_service_regenerate_client_secret_request.py new file mode 100644 index 00000000..b4595eae --- /dev/null +++ b/zitadel_client/models/beta_app_service_regenerate_client_secret_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceRegenerateClientSecretRequest(BaseModel): + """ + BetaAppServiceRegenerateClientSecretRequest + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + application_id: Optional[StrictStr] = Field(default=None, alias="applicationId") + is_api: Optional[StrictBool] = Field(default=None, alias="isApi") + is_oidc: Optional[StrictBool] = Field(default=None, alias="isOidc") + __properties: ClassVar[List[str]] = ["projectId", "applicationId", "isApi", "isOidc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceRegenerateClientSecretRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceRegenerateClientSecretRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "applicationId": obj.get("applicationId"), + "isApi": obj.get("isApi"), + "isOidc": obj.get("isOidc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_regenerate_client_secret_response.py b/zitadel_client/models/beta_app_service_regenerate_client_secret_response.py new file mode 100644 index 00000000..6627e6a3 --- /dev/null +++ b/zitadel_client/models/beta_app_service_regenerate_client_secret_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceRegenerateClientSecretResponse(BaseModel): + """ + BetaAppServiceRegenerateClientSecretResponse + """ # noqa: E501 + client_secret: Optional[StrictStr] = Field(default=None, alias="clientSecret") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["clientSecret", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceRegenerateClientSecretResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceRegenerateClientSecretResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientSecret": obj.get("clientSecret"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_rpc_status.py b/zitadel_client/models/beta_app_service_saml_config.py similarity index 66% rename from zitadel_client/models/settings_service_rpc_status.py rename to zitadel_client/models/beta_app_service_saml_config.py index 4c028548..17c7b24e 100644 --- a/zitadel_client/models/settings_service_rpc_status.py +++ b/zitadel_client/models/beta_app_service_saml_config.py @@ -17,19 +17,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.settings_service_protobuf_any import SettingsServiceProtobufAny +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_app_service_login_version import BetaAppServiceLoginVersion from typing import Optional, Set from typing_extensions import Self -class SettingsServiceRpcStatus(BaseModel): +class BetaAppServiceSAMLConfig(BaseModel): """ - SettingsServiceRpcStatus + BetaAppServiceSAMLConfig """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[SettingsServiceProtobufAny]] = None + login_version: Optional[BetaAppServiceLoginVersion] = Field(default=None, alias="loginVersion") + metadata_url: Optional[StrictStr] = Field(default=None, alias="metadataUrl") + metadata_xml: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, alias="metadataXml") + __properties: ClassVar[List[str]] = ["loginVersion", "metadataUrl", "metadataXml"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SettingsServiceRpcStatus from a JSON string""" + """Create an instance of BetaAppServiceSAMLConfig from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +71,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + # override the default output from pydantic by calling `to_dict()` of login_version + if self.login_version: + _dict['loginVersion'] = self.login_version.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SettingsServiceRpcStatus from a dict""" + """Create an instance of BetaAppServiceSAMLConfig from a dict""" if obj is None: return None @@ -89,9 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [SettingsServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "loginVersion": BetaAppServiceLoginVersion.from_dict(obj["loginVersion"]) if obj.get("loginVersion") is not None else None, + "metadataUrl": obj.get("metadataUrl"), + "metadataXml": obj.get("metadataXml") }) return _obj diff --git a/zitadel_client/models/beta_app_service_text_filter_method.py b/zitadel_client/models/beta_app_service_text_filter_method.py new file mode 100644 index 00000000..b0ef666d --- /dev/null +++ b/zitadel_client/models/beta_app_service_text_filter_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAppServiceTextFilterMethod(str, Enum): + """ + BetaAppServiceTextFilterMethod + """ + + """ + allowed enum values + """ + TEXT_FILTER_METHOD_EQUALS = 'TEXT_FILTER_METHOD_EQUALS' + TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE = 'TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE' + TEXT_FILTER_METHOD_STARTS_WITH = 'TEXT_FILTER_METHOD_STARTS_WITH' + TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_FILTER_METHOD_CONTAINS = 'TEXT_FILTER_METHOD_CONTAINS' + TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE' + TEXT_FILTER_METHOD_ENDS_WITH = 'TEXT_FILTER_METHOD_ENDS_WITH' + TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAppServiceTextFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_delete_web_key_response.py b/zitadel_client/models/beta_app_service_update_api_application_configuration_request.py similarity index 75% rename from zitadel_client/models/web_key_service_beta_delete_web_key_response.py rename to zitadel_client/models/beta_app_service_update_api_application_configuration_request.py index b8e96839..990bf55f 100644 --- a/zitadel_client/models/web_key_service_beta_delete_web_key_response.py +++ b/zitadel_client/models/beta_app_service_update_api_application_configuration_request.py @@ -17,17 +17,18 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_api_auth_method_type import BetaAppServiceAPIAuthMethodType from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaDeleteWebKeyResponse(BaseModel): +class BetaAppServiceUpdateAPIApplicationConfigurationRequest(BaseModel): """ - WebKeyServiceBetaDeleteWebKeyResponse + BetaAppServiceUpdateAPIApplicationConfigurationRequest """ # noqa: E501 - deletion_date: Optional[datetime] = Field(default=None, description="The timestamp of the deletion of the key. Note that the deletion date is only guaranteed to be set if the deletion was successful during the request. In case the deletion occurred in a previous request, the deletion date might be empty.", alias="deletionDate") + auth_method_type: Optional[BetaAppServiceAPIAuthMethodType] = Field(default=None, alias="authMethodType") + __properties: ClassVar[List[str]] = ["authMethodType"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaDeleteWebKeyResponse from a JSON string""" + """Create an instance of BetaAppServiceUpdateAPIApplicationConfigurationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaDeleteWebKeyResponse from a dict""" + """Create an instance of BetaAppServiceUpdateAPIApplicationConfigurationRequest from a dict""" if obj is None: return None @@ -80,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "deletionDate": obj.get("deletionDate") + "authMethodType": obj.get("authMethodType") }) return _obj diff --git a/zitadel_client/models/beta_app_service_update_application_request.py b/zitadel_client/models/beta_app_service_update_application_request.py new file mode 100644 index 00000000..c0c7d539 --- /dev/null +++ b/zitadel_client/models/beta_app_service_update_application_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_app_service_update_api_application_configuration_request import BetaAppServiceUpdateAPIApplicationConfigurationRequest +from zitadel_client.models.beta_app_service_update_oidc_application_configuration_request import BetaAppServiceUpdateOIDCApplicationConfigurationRequest +from zitadel_client.models.beta_app_service_update_saml_application_configuration_request import BetaAppServiceUpdateSAMLApplicationConfigurationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceUpdateApplicationRequest(BaseModel): + """ + BetaAppServiceUpdateApplicationRequest + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, alias="projectId") + id: StrictStr + name: Optional[StrictStr] = None + api_configuration_request: Optional[BetaAppServiceUpdateAPIApplicationConfigurationRequest] = Field(default=None, alias="apiConfigurationRequest") + oidc_configuration_request: Optional[BetaAppServiceUpdateOIDCApplicationConfigurationRequest] = Field(default=None, alias="oidcConfigurationRequest") + saml_configuration_request: Optional[BetaAppServiceUpdateSAMLApplicationConfigurationRequest] = Field(default=None, alias="samlConfigurationRequest") + __properties: ClassVar[List[str]] = ["projectId", "id", "name", "apiConfigurationRequest", "oidcConfigurationRequest", "samlConfigurationRequest"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateApplicationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of api_configuration_request + if self.api_configuration_request: + _dict['apiConfigurationRequest'] = self.api_configuration_request.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_configuration_request + if self.oidc_configuration_request: + _dict['oidcConfigurationRequest'] = self.oidc_configuration_request.to_dict() + # override the default output from pydantic by calling `to_dict()` of saml_configuration_request + if self.saml_configuration_request: + _dict['samlConfigurationRequest'] = self.saml_configuration_request.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateApplicationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "id": obj.get("id"), + "name": obj.get("name"), + "apiConfigurationRequest": BetaAppServiceUpdateAPIApplicationConfigurationRequest.from_dict(obj["apiConfigurationRequest"]) if obj.get("apiConfigurationRequest") is not None else None, + "oidcConfigurationRequest": BetaAppServiceUpdateOIDCApplicationConfigurationRequest.from_dict(obj["oidcConfigurationRequest"]) if obj.get("oidcConfigurationRequest") is not None else None, + "samlConfigurationRequest": BetaAppServiceUpdateSAMLApplicationConfigurationRequest.from_dict(obj["samlConfigurationRequest"]) if obj.get("samlConfigurationRequest") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_update_application_response.py b/zitadel_client/models/beta_app_service_update_application_response.py new file mode 100644 index 00000000..f5228e07 --- /dev/null +++ b/zitadel_client/models/beta_app_service_update_application_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceUpdateApplicationResponse(BaseModel): + """ + BetaAppServiceUpdateApplicationResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateApplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateApplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_update_oidc_application_configuration_request.py b/zitadel_client/models/beta_app_service_update_oidc_application_configuration_request.py new file mode 100644 index 00000000..071640df --- /dev/null +++ b/zitadel_client/models/beta_app_service_update_oidc_application_configuration_request.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_app_service_login_version import BetaAppServiceLoginVersion +from zitadel_client.models.beta_app_service_oidc_app_type import BetaAppServiceOIDCAppType +from zitadel_client.models.beta_app_service_oidc_auth_method_type import BetaAppServiceOIDCAuthMethodType +from zitadel_client.models.beta_app_service_oidc_grant_type import BetaAppServiceOIDCGrantType +from zitadel_client.models.beta_app_service_oidc_response_type import BetaAppServiceOIDCResponseType +from zitadel_client.models.beta_app_service_oidc_token_type import BetaAppServiceOIDCTokenType +from zitadel_client.models.beta_app_service_oidc_version import BetaAppServiceOIDCVersion +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceUpdateOIDCApplicationConfigurationRequest(BaseModel): + """ + BetaAppServiceUpdateOIDCApplicationConfigurationRequest + """ # noqa: E501 + redirect_uris: Optional[List[StrictStr]] = Field(default=None, alias="redirectUris") + response_types: Optional[List[BetaAppServiceOIDCResponseType]] = Field(default=None, alias="responseTypes") + grant_types: Optional[List[BetaAppServiceOIDCGrantType]] = Field(default=None, alias="grantTypes") + app_type: Optional[BetaAppServiceOIDCAppType] = Field(default=None, alias="appType") + auth_method_type: Optional[BetaAppServiceOIDCAuthMethodType] = Field(default=None, alias="authMethodType") + post_logout_redirect_uris: Optional[List[StrictStr]] = Field(default=None, alias="postLogoutRedirectUris") + version: Optional[BetaAppServiceOIDCVersion] = None + dev_mode: Optional[StrictBool] = Field(default=None, alias="devMode") + access_token_type: Optional[BetaAppServiceOIDCTokenType] = Field(default=None, alias="accessTokenType") + access_token_role_assertion: Optional[StrictBool] = Field(default=None, alias="accessTokenRoleAssertion") + id_token_role_assertion: Optional[StrictBool] = Field(default=None, alias="idTokenRoleAssertion") + id_token_userinfo_assertion: Optional[StrictBool] = Field(default=None, alias="idTokenUserinfoAssertion") + clock_skew: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="clockSkew") + additional_origins: Optional[List[StrictStr]] = Field(default=None, alias="additionalOrigins") + skip_native_app_success_page: Optional[StrictBool] = Field(default=None, alias="skipNativeAppSuccessPage") + back_channel_logout_uri: Optional[StrictStr] = Field(default=None, alias="backChannelLogoutUri") + login_version: Optional[BetaAppServiceLoginVersion] = Field(default=None, alias="loginVersion") + __properties: ClassVar[List[str]] = ["redirectUris", "responseTypes", "grantTypes", "appType", "authMethodType", "postLogoutRedirectUris", "version", "devMode", "accessTokenType", "accessTokenRoleAssertion", "idTokenRoleAssertion", "idTokenUserinfoAssertion", "clockSkew", "additionalOrigins", "skipNativeAppSuccessPage", "backChannelLogoutUri", "loginVersion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateOIDCApplicationConfigurationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of login_version + if self.login_version: + _dict['loginVersion'] = self.login_version.to_dict() + # set to None if dev_mode (nullable) is None + # and model_fields_set contains the field + if self.dev_mode is None and "dev_mode" in self.model_fields_set: + _dict['devMode'] = None + + # set to None if access_token_role_assertion (nullable) is None + # and model_fields_set contains the field + if self.access_token_role_assertion is None and "access_token_role_assertion" in self.model_fields_set: + _dict['accessTokenRoleAssertion'] = None + + # set to None if id_token_role_assertion (nullable) is None + # and model_fields_set contains the field + if self.id_token_role_assertion is None and "id_token_role_assertion" in self.model_fields_set: + _dict['idTokenRoleAssertion'] = None + + # set to None if id_token_userinfo_assertion (nullable) is None + # and model_fields_set contains the field + if self.id_token_userinfo_assertion is None and "id_token_userinfo_assertion" in self.model_fields_set: + _dict['idTokenUserinfoAssertion'] = None + + # set to None if skip_native_app_success_page (nullable) is None + # and model_fields_set contains the field + if self.skip_native_app_success_page is None and "skip_native_app_success_page" in self.model_fields_set: + _dict['skipNativeAppSuccessPage'] = None + + # set to None if back_channel_logout_uri (nullable) is None + # and model_fields_set contains the field + if self.back_channel_logout_uri is None and "back_channel_logout_uri" in self.model_fields_set: + _dict['backChannelLogoutUri'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateOIDCApplicationConfigurationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "redirectUris": obj.get("redirectUris"), + "responseTypes": obj.get("responseTypes"), + "grantTypes": obj.get("grantTypes"), + "appType": obj.get("appType"), + "authMethodType": obj.get("authMethodType"), + "postLogoutRedirectUris": obj.get("postLogoutRedirectUris"), + "version": obj.get("version"), + "devMode": obj.get("devMode"), + "accessTokenType": obj.get("accessTokenType"), + "accessTokenRoleAssertion": obj.get("accessTokenRoleAssertion"), + "idTokenRoleAssertion": obj.get("idTokenRoleAssertion"), + "idTokenUserinfoAssertion": obj.get("idTokenUserinfoAssertion"), + "clockSkew": obj.get("clockSkew"), + "additionalOrigins": obj.get("additionalOrigins"), + "skipNativeAppSuccessPage": obj.get("skipNativeAppSuccessPage"), + "backChannelLogoutUri": obj.get("backChannelLogoutUri"), + "loginVersion": BetaAppServiceLoginVersion.from_dict(obj["loginVersion"]) if obj.get("loginVersion") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_app_service_update_saml_application_configuration_request.py b/zitadel_client/models/beta_app_service_update_saml_application_configuration_request.py new file mode 100644 index 00000000..f28799fe --- /dev/null +++ b/zitadel_client/models/beta_app_service_update_saml_application_configuration_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_app_service_login_version import BetaAppServiceLoginVersion +from typing import Optional, Set +from typing_extensions import Self + +class BetaAppServiceUpdateSAMLApplicationConfigurationRequest(BaseModel): + """ + BetaAppServiceUpdateSAMLApplicationConfigurationRequest + """ # noqa: E501 + login_version: Optional[BetaAppServiceLoginVersion] = Field(default=None, alias="loginVersion") + metadata_url: Optional[StrictStr] = Field(default=None, alias="metadataUrl") + metadata_xml: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, alias="metadataXml") + __properties: ClassVar[List[str]] = ["loginVersion", "metadataUrl", "metadataXml"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateSAMLApplicationConfigurationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of login_version + if self.login_version: + _dict['loginVersion'] = self.login_version.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAppServiceUpdateSAMLApplicationConfigurationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginVersion": BetaAppServiceLoginVersion.from_dict(obj["loginVersion"]) if obj.get("loginVersion") is not None else None, + "metadataUrl": obj.get("metadataUrl"), + "metadataXml": obj.get("metadataXml") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_activate_authorization_request.py b/zitadel_client/models/beta_authorization_service_activate_authorization_request.py new file mode 100644 index 00000000..07d9795b --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_activate_authorization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceActivateAuthorizationRequest(BaseModel): + """ + BetaAuthorizationServiceActivateAuthorizationRequest + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the authorization that should be activated.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceActivateAuthorizationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceActivateAuthorizationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_activate_authorization_response.py b/zitadel_client/models/beta_authorization_service_activate_authorization_response.py new file mode 100644 index 00000000..7ac06b50 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_activate_authorization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceActivateAuthorizationResponse(BaseModel): + """ + BetaAuthorizationServiceActivateAuthorizationResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceActivateAuthorizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceActivateAuthorizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_any.py b/zitadel_client/models/beta_authorization_service_any.py new file mode 100644 index 00000000..a6b18a79 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_authorization.py b/zitadel_client/models/beta_authorization_service_authorization.py new file mode 100644 index 00000000..6b4e9d1c --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_authorization.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_authorization_service_state import BetaAuthorizationServiceState +from zitadel_client.models.beta_authorization_service_user import BetaAuthorizationServiceUser +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceAuthorization(BaseModel): + """ + BetaAuthorizationServiceAuthorization + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the authorization.") + project_id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the project the user was granted the authorization for.", alias="projectId") + project_name: Optional[StrictStr] = Field(default=None, description="Name is the name of the project the user was granted the authorization for.", alias="projectName") + project_organization_id: Optional[StrictStr] = Field(default=None, description="OrganizationID is the ID of the organization the project belongs to.", alias="projectOrganizationId") + project_grant_id: Optional[StrictStr] = Field(default=None, description="ID of the granted project, only provided if it is a granted project.", alias="projectGrantId") + granted_organization_id: Optional[StrictStr] = Field(default=None, description="ID of the organization the project is granted to, only provided if it is a granted project.", alias="grantedOrganizationId") + organization_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the organization the authorization belongs to.", alias="organizationId") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + state: Optional[BetaAuthorizationServiceState] = None + user: Optional[BetaAuthorizationServiceUser] = None + roles: Optional[List[StrictStr]] = Field(default=None, description="Roles contains the roles the user was granted for the project.") + __properties: ClassVar[List[str]] = ["id", "projectId", "projectName", "projectOrganizationId", "projectGrantId", "grantedOrganizationId", "organizationId", "creationDate", "changeDate", "state", "user", "roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceAuthorization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # set to None if project_grant_id (nullable) is None + # and model_fields_set contains the field + if self.project_grant_id is None and "project_grant_id" in self.model_fields_set: + _dict['projectGrantId'] = None + + # set to None if granted_organization_id (nullable) is None + # and model_fields_set contains the field + if self.granted_organization_id is None and "granted_organization_id" in self.model_fields_set: + _dict['grantedOrganizationId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceAuthorization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "projectId": obj.get("projectId"), + "projectName": obj.get("projectName"), + "projectOrganizationId": obj.get("projectOrganizationId"), + "projectGrantId": obj.get("projectGrantId"), + "grantedOrganizationId": obj.get("grantedOrganizationId"), + "organizationId": obj.get("organizationId"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "state": obj.get("state"), + "user": BetaAuthorizationServiceUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "roles": obj.get("roles") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_authorization_field_name.py b/zitadel_client/models/beta_authorization_service_authorization_field_name.py new file mode 100644 index 00000000..e7f311e4 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_authorization_field_name.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAuthorizationServiceAuthorizationFieldName(str, Enum): + """ + BetaAuthorizationServiceAuthorizationFieldName + """ + + """ + allowed enum values + """ + AUTHORIZATION_FIELD_NAME_UNSPECIFIED = 'AUTHORIZATION_FIELD_NAME_UNSPECIFIED' + AUTHORIZATION_FIELD_NAME_CREATED_DATE = 'AUTHORIZATION_FIELD_NAME_CREATED_DATE' + AUTHORIZATION_FIELD_NAME_CHANGED_DATE = 'AUTHORIZATION_FIELD_NAME_CHANGED_DATE' + AUTHORIZATION_FIELD_NAME_ID = 'AUTHORIZATION_FIELD_NAME_ID' + AUTHORIZATION_FIELD_NAME_USER_ID = 'AUTHORIZATION_FIELD_NAME_USER_ID' + AUTHORIZATION_FIELD_NAME_PROJECT_ID = 'AUTHORIZATION_FIELD_NAME_PROJECT_ID' + AUTHORIZATION_FIELD_NAME_ORGANIZATION_ID = 'AUTHORIZATION_FIELD_NAME_ORGANIZATION_ID' + AUTHORIZATION_FIELD_NAME_USER_ORGANIZATION_ID = 'AUTHORIZATION_FIELD_NAME_USER_ORGANIZATION_ID' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAuthorizationServiceAuthorizationFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_authorization_service_authorizations_search_filter.py b/zitadel_client/models/beta_authorization_service_authorizations_search_filter.py new file mode 100644 index 00000000..79c88b79 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_authorizations_search_filter.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_authorization_service_id_filter import BetaAuthorizationServiceIDFilter +from zitadel_client.models.beta_authorization_service_in_ids_filter import BetaAuthorizationServiceInIDsFilter +from zitadel_client.models.beta_authorization_service_project_name_query import BetaAuthorizationServiceProjectNameQuery +from zitadel_client.models.beta_authorization_service_role_key_query import BetaAuthorizationServiceRoleKeyQuery +from zitadel_client.models.beta_authorization_service_state_query import BetaAuthorizationServiceStateQuery +from zitadel_client.models.beta_authorization_service_user_display_name_query import BetaAuthorizationServiceUserDisplayNameQuery +from zitadel_client.models.beta_authorization_service_user_preferred_login_name_query import BetaAuthorizationServiceUserPreferredLoginNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceAuthorizationsSearchFilter(BaseModel): + """ + BetaAuthorizationServiceAuthorizationsSearchFilter + """ # noqa: E501 + authorization_ids: Optional[BetaAuthorizationServiceInIDsFilter] = Field(default=None, alias="authorizationIds") + organization_id: Optional[BetaAuthorizationServiceIDFilter] = Field(default=None, alias="organizationId") + project_grant_id: Optional[BetaAuthorizationServiceIDFilter] = Field(default=None, alias="projectGrantId") + project_id: Optional[BetaAuthorizationServiceIDFilter] = Field(default=None, alias="projectId") + project_name: Optional[BetaAuthorizationServiceProjectNameQuery] = Field(default=None, alias="projectName") + role_key: Optional[BetaAuthorizationServiceRoleKeyQuery] = Field(default=None, alias="roleKey") + state: Optional[BetaAuthorizationServiceStateQuery] = None + user_display_name: Optional[BetaAuthorizationServiceUserDisplayNameQuery] = Field(default=None, alias="userDisplayName") + user_id: Optional[BetaAuthorizationServiceIDFilter] = Field(default=None, alias="userId") + user_organization_id: Optional[BetaAuthorizationServiceIDFilter] = Field(default=None, alias="userOrganizationId") + user_preferred_login_name: Optional[BetaAuthorizationServiceUserPreferredLoginNameQuery] = Field(default=None, alias="userPreferredLoginName") + __properties: ClassVar[List[str]] = ["authorizationIds", "organizationId", "projectGrantId", "projectId", "projectName", "roleKey", "state", "userDisplayName", "userId", "userOrganizationId", "userPreferredLoginName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceAuthorizationsSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of authorization_ids + if self.authorization_ids: + _dict['authorizationIds'] = self.authorization_ids.to_dict() + # override the default output from pydantic by calling `to_dict()` of organization_id + if self.organization_id: + _dict['organizationId'] = self.organization_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_grant_id + if self.project_grant_id: + _dict['projectGrantId'] = self.project_grant_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_id + if self.project_id: + _dict['projectId'] = self.project_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_name + if self.project_name: + _dict['projectName'] = self.project_name.to_dict() + # override the default output from pydantic by calling `to_dict()` of role_key + if self.role_key: + _dict['roleKey'] = self.role_key.to_dict() + # override the default output from pydantic by calling `to_dict()` of state + if self.state: + _dict['state'] = self.state.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_display_name + if self.user_display_name: + _dict['userDisplayName'] = self.user_display_name.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_id + if self.user_id: + _dict['userId'] = self.user_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_organization_id + if self.user_organization_id: + _dict['userOrganizationId'] = self.user_organization_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_preferred_login_name + if self.user_preferred_login_name: + _dict['userPreferredLoginName'] = self.user_preferred_login_name.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceAuthorizationsSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authorizationIds": BetaAuthorizationServiceInIDsFilter.from_dict(obj["authorizationIds"]) if obj.get("authorizationIds") is not None else None, + "organizationId": BetaAuthorizationServiceIDFilter.from_dict(obj["organizationId"]) if obj.get("organizationId") is not None else None, + "projectGrantId": BetaAuthorizationServiceIDFilter.from_dict(obj["projectGrantId"]) if obj.get("projectGrantId") is not None else None, + "projectId": BetaAuthorizationServiceIDFilter.from_dict(obj["projectId"]) if obj.get("projectId") is not None else None, + "projectName": BetaAuthorizationServiceProjectNameQuery.from_dict(obj["projectName"]) if obj.get("projectName") is not None else None, + "roleKey": BetaAuthorizationServiceRoleKeyQuery.from_dict(obj["roleKey"]) if obj.get("roleKey") is not None else None, + "state": BetaAuthorizationServiceStateQuery.from_dict(obj["state"]) if obj.get("state") is not None else None, + "userDisplayName": BetaAuthorizationServiceUserDisplayNameQuery.from_dict(obj["userDisplayName"]) if obj.get("userDisplayName") is not None else None, + "userId": BetaAuthorizationServiceIDFilter.from_dict(obj["userId"]) if obj.get("userId") is not None else None, + "userOrganizationId": BetaAuthorizationServiceIDFilter.from_dict(obj["userOrganizationId"]) if obj.get("userOrganizationId") is not None else None, + "userPreferredLoginName": BetaAuthorizationServiceUserPreferredLoginNameQuery.from_dict(obj["userPreferredLoginName"]) if obj.get("userPreferredLoginName") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_connect_error.py b/zitadel_client/models/beta_authorization_service_connect_error.py new file mode 100644 index 00000000..37dc29c4 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_authorization_service_any import BetaAuthorizationServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaAuthorizationServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaAuthorizationServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_web_key.py b/zitadel_client/models/beta_authorization_service_create_authorization_request.py similarity index 58% rename from zitadel_client/models/web_key_service_beta_web_key.py rename to zitadel_client/models/beta_authorization_service_create_authorization_request.py index 584e3a84..7e53888d 100644 --- a/zitadel_client/models/web_key_service_beta_web_key.py +++ b/zitadel_client/models/beta_authorization_service_create_authorization_request.py @@ -17,26 +17,20 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA -from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA -from zitadel_client.models.web_key_service_beta_state import WebKeyServiceBetaState from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaWebKey(BaseModel): +class BetaAuthorizationServiceCreateAuthorizationRequest(BaseModel): """ - WebKeyServiceBetaWebKey + BetaAuthorizationServiceCreateAuthorizationRequest """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the key.") - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the key creation.", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the key (e.g. creation, activation, deactivation).", alias="changeDate") - state: Optional[WebKeyServiceBetaState] = WebKeyServiceBetaState.STATE_UNSPECIFIED - rsa: Optional[WebKeyServiceBetaRSA] = None - ecdsa: Optional[WebKeyServiceBetaECDSA] = None - ed25519: Optional[Dict[str, Any]] = None + user_id: Optional[StrictStr] = Field(default=None, description="UserID is the ID of the user who should be granted the authorization.", alias="userId") + project_id: Optional[StrictStr] = Field(default=None, description="Project ID is the ID of the project the user should be authorized for.", alias="projectId") + organization_id: Optional[StrictStr] = Field(default=None, description="OrganizationID is the ID of the organization on which the authorization should be created. The organization must either own the project or have a grant for the project. If omitted, the authorization is created on the projects organization.", alias="organizationId") + role_keys: Optional[List[StrictStr]] = Field(default=None, description="RoleKeys are the keys of the roles the user should be granted.", alias="roleKeys") + __properties: ClassVar[List[str]] = ["userId", "projectId", "organizationId", "roleKeys"] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaWebKey from a JSON string""" + """Create an instance of BetaAuthorizationServiceCreateAuthorizationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,11 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if organization_id (nullable) is None + # and model_fields_set contains the field + if self.organization_id is None and "organization_id" in self.model_fields_set: + _dict['organizationId'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaWebKey from a dict""" + """Create an instance of BetaAuthorizationServiceCreateAuthorizationRequest from a dict""" if obj is None: return None @@ -89,13 +88,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "id": obj.get("id"), - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "state": obj.get("state") if obj.get("state") is not None else WebKeyServiceBetaState.STATE_UNSPECIFIED, - "rsa": WebKeyServiceBetaRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None, - "ecdsa": WebKeyServiceBetaECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, - "ed25519": obj.get("ed25519") + "userId": obj.get("userId"), + "projectId": obj.get("projectId"), + "organizationId": obj.get("organizationId"), + "roleKeys": obj.get("roleKeys") }) return _obj diff --git a/zitadel_client/models/beta_authorization_service_create_authorization_response.py b/zitadel_client/models/beta_authorization_service_create_authorization_response.py new file mode 100644 index 00000000..8a23f119 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_create_authorization_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceCreateAuthorizationResponse(BaseModel): + """ + BetaAuthorizationServiceCreateAuthorizationResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the newly created authorization.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["id", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceCreateAuthorizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceCreateAuthorizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_deactivate_authorization_request.py b/zitadel_client/models/beta_authorization_service_deactivate_authorization_request.py new file mode 100644 index 00000000..ea613ad9 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_deactivate_authorization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceDeactivateAuthorizationRequest(BaseModel): + """ + BetaAuthorizationServiceDeactivateAuthorizationRequest + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the authorization that should be deactivated.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeactivateAuthorizationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeactivateAuthorizationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_deactivate_authorization_response.py b/zitadel_client/models/beta_authorization_service_deactivate_authorization_response.py new file mode 100644 index 00000000..5f417811 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_deactivate_authorization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceDeactivateAuthorizationResponse(BaseModel): + """ + BetaAuthorizationServiceDeactivateAuthorizationResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeactivateAuthorizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeactivateAuthorizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_delete_authorization_request.py b/zitadel_client/models/beta_authorization_service_delete_authorization_request.py new file mode 100644 index 00000000..1879ec8b --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_delete_authorization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceDeleteAuthorizationRequest(BaseModel): + """ + BetaAuthorizationServiceDeleteAuthorizationRequest + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the authorization that should be deleted.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeleteAuthorizationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeleteAuthorizationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_delete_authorization_response.py b/zitadel_client/models/beta_authorization_service_delete_authorization_response.py new file mode 100644 index 00000000..e7fe1c27 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_delete_authorization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceDeleteAuthorizationResponse(BaseModel): + """ + BetaAuthorizationServiceDeleteAuthorizationResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeleteAuthorizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceDeleteAuthorizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_id_filter.py b/zitadel_client/models/beta_authorization_service_id_filter.py new file mode 100644 index 00000000..37e5dadf --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_id_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceIDFilter(BaseModel): + """ + BetaAuthorizationServiceIDFilter + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Only return resources that belong to this id.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceIDFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceIDFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_in_ids_filter.py b/zitadel_client/models/beta_authorization_service_in_ids_filter.py new file mode 100644 index 00000000..873668ab --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_in_ids_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceInIDsFilter(BaseModel): + """ + BetaAuthorizationServiceInIDsFilter + """ # noqa: E501 + ids: Optional[List[StrictStr]] = Field(default=None, description="Defines the ids to query for.") + __properties: ClassVar[List[str]] = ["ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceInIDsFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceInIDsFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ids": obj.get("ids") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_list_authorizations_request.py b/zitadel_client/models/beta_authorization_service_list_authorizations_request.py new file mode 100644 index 00000000..e3f358d3 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_list_authorizations_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_authorization_service_authorization_field_name import BetaAuthorizationServiceAuthorizationFieldName +from zitadel_client.models.beta_authorization_service_authorizations_search_filter import BetaAuthorizationServiceAuthorizationsSearchFilter +from zitadel_client.models.beta_authorization_service_pagination_request import BetaAuthorizationServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceListAuthorizationsRequest(BaseModel): + """ + BetaAuthorizationServiceListAuthorizationsRequest + """ # noqa: E501 + pagination: Optional[BetaAuthorizationServicePaginationRequest] = None + sorting_column: Optional[BetaAuthorizationServiceAuthorizationFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaAuthorizationServiceAuthorizationsSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceListAuthorizationsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceListAuthorizationsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaAuthorizationServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaAuthorizationServiceAuthorizationsSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_list_authorizations_response.py b/zitadel_client/models/beta_authorization_service_list_authorizations_response.py new file mode 100644 index 00000000..34dd81d1 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_list_authorizations_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_authorization_service_authorization import BetaAuthorizationServiceAuthorization +from zitadel_client.models.beta_authorization_service_pagination_response import BetaAuthorizationServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceListAuthorizationsResponse(BaseModel): + """ + BetaAuthorizationServiceListAuthorizationsResponse + """ # noqa: E501 + pagination: Optional[BetaAuthorizationServicePaginationResponse] = None + authorizations: Optional[List[BetaAuthorizationServiceAuthorization]] = None + __properties: ClassVar[List[str]] = ["pagination", "authorizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceListAuthorizationsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in authorizations (list) + _items = [] + if self.authorizations: + for _item_authorizations in self.authorizations: + if _item_authorizations: + _items.append(_item_authorizations.to_dict()) + _dict['authorizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceListAuthorizationsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaAuthorizationServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "authorizations": [BetaAuthorizationServiceAuthorization.from_dict(_item) for _item in obj["authorizations"]] if obj.get("authorizations") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_pagination_request.py b/zitadel_client/models/beta_authorization_service_pagination_request.py new file mode 100644 index 00000000..33570546 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_pagination_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServicePaginationRequest(BaseModel): + """ + BetaAuthorizationServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServicePaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServicePaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_pagination_response.py b/zitadel_client/models/beta_authorization_service_pagination_response.py new file mode 100644 index 00000000..605283e0 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServicePaginationResponse(BaseModel): + """ + BetaAuthorizationServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_project_name_query.py b/zitadel_client/models/beta_authorization_service_project_name_query.py new file mode 100644 index 00000000..7c5fdabc --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_project_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_authorization_service_text_filter_method import BetaAuthorizationServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceProjectNameQuery(BaseModel): + """ + BetaAuthorizationServiceProjectNameQuery + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Specify the name of the project the user was granted the authorization for to search for. Note that this will also include authorizations granted for project grants of the same project.") + method: Optional[BetaAuthorizationServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["name", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceProjectNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceProjectNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_role_key_query.py b/zitadel_client/models/beta_authorization_service_role_key_query.py new file mode 100644 index 00000000..b8ca0b96 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_role_key_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_authorization_service_text_filter_method import BetaAuthorizationServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceRoleKeyQuery(BaseModel): + """ + BetaAuthorizationServiceRoleKeyQuery + """ # noqa: E501 + key: Optional[StrictStr] = Field(default=None, description="Specify the key of the role the user was granted to search for.") + method: Optional[BetaAuthorizationServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["key", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceRoleKeyQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceRoleKeyQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_state.py b/zitadel_client/models/beta_authorization_service_state.py new file mode 100644 index 00000000..d640080e --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAuthorizationServiceState(str, Enum): + """ + BetaAuthorizationServiceState + """ + + """ + allowed enum values + """ + STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' + STATE_ACTIVE = 'STATE_ACTIVE' + STATE_INACTIVE = 'STATE_INACTIVE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAuthorizationServiceState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_ecdsa.py b/zitadel_client/models/beta_authorization_service_state_query.py similarity index 79% rename from zitadel_client/models/web_key_service_beta_ecdsa.py rename to zitadel_client/models/beta_authorization_service_state_query.py index 5ec0c13b..849d52b1 100644 --- a/zitadel_client/models/web_key_service_beta_ecdsa.py +++ b/zitadel_client/models/beta_authorization_service_state_query.py @@ -18,16 +18,17 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_ecdsa_curve import WebKeyServiceBetaECDSACurve +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_authorization_service_state import BetaAuthorizationServiceState from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaECDSA(BaseModel): +class BetaAuthorizationServiceStateQuery(BaseModel): """ - WebKeyServiceBetaECDSA + BetaAuthorizationServiceStateQuery """ # noqa: E501 - curve: Optional[WebKeyServiceBetaECDSACurve] = WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED + state: Optional[BetaAuthorizationServiceState] = None + __properties: ClassVar[List[str]] = ["state"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaECDSA from a JSON string""" + """Create an instance of BetaAuthorizationServiceStateQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaECDSA from a dict""" + """Create an instance of BetaAuthorizationServiceStateQuery from a dict""" if obj is None: return None @@ -80,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "curve": obj.get("curve") if obj.get("curve") is not None else WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED + "state": obj.get("state") }) return _obj diff --git a/zitadel_client/models/beta_authorization_service_text_filter_method.py b/zitadel_client/models/beta_authorization_service_text_filter_method.py new file mode 100644 index 00000000..ef551212 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_text_filter_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaAuthorizationServiceTextFilterMethod(str, Enum): + """ + BetaAuthorizationServiceTextFilterMethod + """ + + """ + allowed enum values + """ + TEXT_FILTER_METHOD_EQUALS = 'TEXT_FILTER_METHOD_EQUALS' + TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE = 'TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE' + TEXT_FILTER_METHOD_STARTS_WITH = 'TEXT_FILTER_METHOD_STARTS_WITH' + TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_FILTER_METHOD_CONTAINS = 'TEXT_FILTER_METHOD_CONTAINS' + TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE' + TEXT_FILTER_METHOD_ENDS_WITH = 'TEXT_FILTER_METHOD_ENDS_WITH' + TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaAuthorizationServiceTextFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_beta_create_target_response.py b/zitadel_client/models/beta_authorization_service_update_authorization_request.py similarity index 74% rename from zitadel_client/models/action_service_beta_create_target_response.py rename to zitadel_client/models/beta_authorization_service_update_authorization_request.py index d13b9481..7b0bbe4d 100644 --- a/zitadel_client/models/action_service_beta_create_target_response.py +++ b/zitadel_client/models/beta_authorization_service_update_authorization_request.py @@ -17,19 +17,18 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaCreateTargetResponse(BaseModel): +class BetaAuthorizationServiceUpdateAuthorizationRequest(BaseModel): """ - ActionServiceBetaCreateTargetResponse + BetaAuthorizationServiceUpdateAuthorizationRequest """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created target.") - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the target creation.", alias="creationDate") - signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the authorization.") + role_keys: Optional[List[StrictStr]] = Field(default=None, description="RoleKeys are the keys of the roles the user should be granted. Note that any role keys previously granted to the user and not present in the list will be revoked.", alias="roleKeys") + __properties: ClassVar[List[str]] = ["id", "roleKeys"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaCreateTargetResponse from a JSON string""" + """Create an instance of BetaAuthorizationServiceUpdateAuthorizationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaCreateTargetResponse from a dict""" + """Create an instance of BetaAuthorizationServiceUpdateAuthorizationRequest from a dict""" if obj is None: return None @@ -83,8 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "creationDate": obj.get("creationDate"), - "signingKey": obj.get("signingKey") + "roleKeys": obj.get("roleKeys") }) return _obj diff --git a/zitadel_client/models/beta_authorization_service_update_authorization_response.py b/zitadel_client/models/beta_authorization_service_update_authorization_response.py new file mode 100644 index 00000000..e3f0bb39 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_update_authorization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceUpdateAuthorizationResponse(BaseModel): + """ + BetaAuthorizationServiceUpdateAuthorizationResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUpdateAuthorizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUpdateAuthorizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_user.py b/zitadel_client/models/beta_authorization_service_user.py new file mode 100644 index 00000000..b06b048b --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_user.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceUser(BaseModel): + """ + BetaAuthorizationServiceUser + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID represents the ID of the user who was granted the authorization.") + preferred_login_name: Optional[StrictStr] = Field(default=None, description="PreferredLoginName represents the preferred login name of the granted user.", alias="preferredLoginName") + display_name: Optional[StrictStr] = Field(default=None, description="DisplayName represents the public display name of the granted user.", alias="displayName") + avatar_url: Optional[StrictStr] = Field(default=None, description="AvatarURL is the URL to the user's public avatar image.", alias="avatarUrl") + organization_id: Optional[StrictStr] = Field(default=None, description="The organization the user belong to. This does not have to correspond with the authorizations organization.", alias="organizationId") + __properties: ClassVar[List[str]] = ["id", "preferredLoginName", "displayName", "avatarUrl", "organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "preferredLoginName": obj.get("preferredLoginName"), + "displayName": obj.get("displayName"), + "avatarUrl": obj.get("avatarUrl"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_user_display_name_query.py b/zitadel_client/models/beta_authorization_service_user_display_name_query.py new file mode 100644 index 00000000..0d469ea4 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_user_display_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_authorization_service_text_filter_method import BetaAuthorizationServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceUserDisplayNameQuery(BaseModel): + """ + BetaAuthorizationServiceUserDisplayNameQuery + """ # noqa: E501 + display_name: Optional[StrictStr] = Field(default=None, description="Specify the public display name of the granted user to search for.", alias="displayName") + method: Optional[BetaAuthorizationServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["displayName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUserDisplayNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUserDisplayNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayName": obj.get("displayName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_authorization_service_user_preferred_login_name_query.py b/zitadel_client/models/beta_authorization_service_user_preferred_login_name_query.py new file mode 100644 index 00000000..bda2e727 --- /dev/null +++ b/zitadel_client/models/beta_authorization_service_user_preferred_login_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_authorization_service_text_filter_method import BetaAuthorizationServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaAuthorizationServiceUserPreferredLoginNameQuery(BaseModel): + """ + BetaAuthorizationServiceUserPreferredLoginNameQuery + """ # noqa: E501 + login_name: Optional[StrictStr] = Field(default=None, description="Specify the preferred login name of the granted user to search for.", alias="loginName") + method: Optional[BetaAuthorizationServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["loginName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUserPreferredLoginNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaAuthorizationServiceUserPreferredLoginNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginName": obj.get("loginName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_any.py b/zitadel_client/models/beta_feature_service_any.py new file mode 100644 index 00000000..12fb52ae --- /dev/null +++ b/zitadel_client/models/beta_feature_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_connect_error.py b/zitadel_client/models/beta_feature_service_connect_error.py new file mode 100644 index 00000000..2ef2715a --- /dev/null +++ b/zitadel_client/models/beta_feature_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_feature_service_any import BetaFeatureServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaFeatureServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaFeatureServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_details.py b/zitadel_client/models/beta_feature_service_details.py new file mode 100644 index 00000000..9212aa28 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceDetails(BaseModel): + """ + BetaFeatureServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_feature_flag.py b/zitadel_client/models/beta_feature_service_feature_flag.py new file mode 100644 index 00000000..53234d29 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_feature_flag.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_source import BetaFeatureServiceSource +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceFeatureFlag(BaseModel): + """ + FeatureFlag is a simple boolean Feature setting, without further payload. + """ # noqa: E501 + enabled: Optional[StrictBool] = None + source: Optional[BetaFeatureServiceSource] = None + __properties: ClassVar[List[str]] = ["enabled", "source"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceFeatureFlag from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceFeatureFlag from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "source": obj.get("source") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_instance_features_request.py b/zitadel_client/models/beta_feature_service_get_instance_features_request.py new file mode 100644 index 00000000..5d5ee834 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_instance_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetInstanceFeaturesRequest(BaseModel): + """ + BetaFeatureServiceGetInstanceFeaturesRequest + """ # noqa: E501 + inheritance: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["inheritance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_instance_features_response.py b/zitadel_client/models/beta_feature_service_get_instance_features_response.py new file mode 100644 index 00000000..1302661b --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_instance_features_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from zitadel_client.models.beta_feature_service_feature_flag import BetaFeatureServiceFeatureFlag +from zitadel_client.models.beta_feature_service_improved_performance_feature_flag import BetaFeatureServiceImprovedPerformanceFeatureFlag +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetInstanceFeaturesResponse(BaseModel): + """ + BetaFeatureServiceGetInstanceFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + login_default_org: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="loginDefaultOrg") + user_schema: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[BetaFeatureServiceImprovedPerformanceFeatureFlag] = Field(default=None, alias="improvedPerformance") + debug_oidc_parent_error: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="debugOidcParentError") + oidc_single_v1_session_termination: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcSingleV1SessionTermination") + __properties: ClassVar[List[str]] = ["details", "loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "debugOidcParentError", "oidcSingleV1SessionTermination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of login_default_org + if self.login_default_org: + _dict['loginDefaultOrg'] = self.login_default_org.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_schema + if self.user_schema: + _dict['userSchema'] = self.user_schema.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_token_exchange + if self.oidc_token_exchange: + _dict['oidcTokenExchange'] = self.oidc_token_exchange.to_dict() + # override the default output from pydantic by calling `to_dict()` of improved_performance + if self.improved_performance: + _dict['improvedPerformance'] = self.improved_performance.to_dict() + # override the default output from pydantic by calling `to_dict()` of debug_oidc_parent_error + if self.debug_oidc_parent_error: + _dict['debugOidcParentError'] = self.debug_oidc_parent_error.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_single_v1_session_termination + if self.oidc_single_v1_session_termination: + _dict['oidcSingleV1SessionTermination'] = self.oidc_single_v1_session_termination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetInstanceFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "loginDefaultOrg": BetaFeatureServiceFeatureFlag.from_dict(obj["loginDefaultOrg"]) if obj.get("loginDefaultOrg") is not None else None, + "userSchema": BetaFeatureServiceFeatureFlag.from_dict(obj["userSchema"]) if obj.get("userSchema") is not None else None, + "oidcTokenExchange": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcTokenExchange"]) if obj.get("oidcTokenExchange") is not None else None, + "improvedPerformance": BetaFeatureServiceImprovedPerformanceFeatureFlag.from_dict(obj["improvedPerformance"]) if obj.get("improvedPerformance") is not None else None, + "debugOidcParentError": BetaFeatureServiceFeatureFlag.from_dict(obj["debugOidcParentError"]) if obj.get("debugOidcParentError") is not None else None, + "oidcSingleV1SessionTermination": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcSingleV1SessionTermination"]) if obj.get("oidcSingleV1SessionTermination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_organization_features_request.py b/zitadel_client/models/beta_feature_service_get_organization_features_request.py new file mode 100644 index 00000000..2e5fecb4 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_organization_features_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetOrganizationFeaturesRequest(BaseModel): + """ + BetaFeatureServiceGetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + inheritance: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationId", "inheritance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_rsa.py b/zitadel_client/models/beta_feature_service_get_organization_features_response.py similarity index 71% rename from zitadel_client/models/web_key_service_beta_rsa.py rename to zitadel_client/models/beta_feature_service_get_organization_features_response.py index 732ce677..fce850bc 100644 --- a/zitadel_client/models/web_key_service_beta_rsa.py +++ b/zitadel_client/models/beta_feature_service_get_organization_features_response.py @@ -18,18 +18,17 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_rsa_bits import WebKeyServiceBetaRSABits -from zitadel_client.models.web_key_service_beta_rsa_hasher import WebKeyServiceBetaRSAHasher +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaRSA(BaseModel): +class BetaFeatureServiceGetOrganizationFeaturesResponse(BaseModel): """ - WebKeyServiceBetaRSA + BetaFeatureServiceGetOrganizationFeaturesResponse """ # noqa: E501 - bits: Optional[WebKeyServiceBetaRSABits] = WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED - hasher: Optional[WebKeyServiceBetaRSAHasher] = WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaRSA from a JSON string""" + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +69,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaRSA from a dict""" + """Create an instance of BetaFeatureServiceGetOrganizationFeaturesResponse from a dict""" if obj is None: return None @@ -82,8 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "bits": obj.get("bits") if obj.get("bits") is not None else WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED, - "hasher": obj.get("hasher") if obj.get("hasher") is not None else WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_feature_service_get_system_features_response.py b/zitadel_client/models/beta_feature_service_get_system_features_response.py new file mode 100644 index 00000000..764bcd4f --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_system_features_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from zitadel_client.models.beta_feature_service_feature_flag import BetaFeatureServiceFeatureFlag +from zitadel_client.models.beta_feature_service_improved_performance_feature_flag import BetaFeatureServiceImprovedPerformanceFeatureFlag +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetSystemFeaturesResponse(BaseModel): + """ + BetaFeatureServiceGetSystemFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + login_default_org: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="loginDefaultOrg") + user_schema: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[BetaFeatureServiceImprovedPerformanceFeatureFlag] = Field(default=None, alias="improvedPerformance") + oidc_single_v1_session_termination: Optional[BetaFeatureServiceFeatureFlag] = Field(default=None, alias="oidcSingleV1SessionTermination") + __properties: ClassVar[List[str]] = ["details", "loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "oidcSingleV1SessionTermination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetSystemFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of login_default_org + if self.login_default_org: + _dict['loginDefaultOrg'] = self.login_default_org.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_schema + if self.user_schema: + _dict['userSchema'] = self.user_schema.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_token_exchange + if self.oidc_token_exchange: + _dict['oidcTokenExchange'] = self.oidc_token_exchange.to_dict() + # override the default output from pydantic by calling `to_dict()` of improved_performance + if self.improved_performance: + _dict['improvedPerformance'] = self.improved_performance.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc_single_v1_session_termination + if self.oidc_single_v1_session_termination: + _dict['oidcSingleV1SessionTermination'] = self.oidc_single_v1_session_termination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetSystemFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "loginDefaultOrg": BetaFeatureServiceFeatureFlag.from_dict(obj["loginDefaultOrg"]) if obj.get("loginDefaultOrg") is not None else None, + "userSchema": BetaFeatureServiceFeatureFlag.from_dict(obj["userSchema"]) if obj.get("userSchema") is not None else None, + "oidcTokenExchange": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcTokenExchange"]) if obj.get("oidcTokenExchange") is not None else None, + "improvedPerformance": BetaFeatureServiceImprovedPerformanceFeatureFlag.from_dict(obj["improvedPerformance"]) if obj.get("improvedPerformance") is not None else None, + "oidcSingleV1SessionTermination": BetaFeatureServiceFeatureFlag.from_dict(obj["oidcSingleV1SessionTermination"]) if obj.get("oidcSingleV1SessionTermination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_user_features_request.py b/zitadel_client/models/beta_feature_service_get_user_features_request.py new file mode 100644 index 00000000..1955f97d --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_user_features_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetUserFeaturesRequest(BaseModel): + """ + BetaFeatureServiceGetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + inheritance: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["userId", "inheritance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_get_user_features_response.py b/zitadel_client/models/beta_feature_service_get_user_features_response.py new file mode 100644 index 00000000..83279cd8 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_get_user_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceGetUserFeaturesResponse(BaseModel): + """ + BetaFeatureServiceGetUserFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceGetUserFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_improved_performance.py b/zitadel_client/models/beta_feature_service_improved_performance.py new file mode 100644 index 00000000..c81c477c --- /dev/null +++ b/zitadel_client/models/beta_feature_service_improved_performance.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaFeatureServiceImprovedPerformance(str, Enum): + """ + BetaFeatureServiceImprovedPerformance + """ + + """ + allowed enum values + """ + IMPROVED_PERFORMANCE_UNSPECIFIED = 'IMPROVED_PERFORMANCE_UNSPECIFIED' + IMPROVED_PERFORMANCE_ORG_BY_ID = 'IMPROVED_PERFORMANCE_ORG_BY_ID' + IMPROVED_PERFORMANCE_PROJECT_GRANT = 'IMPROVED_PERFORMANCE_PROJECT_GRANT' + IMPROVED_PERFORMANCE_PROJECT = 'IMPROVED_PERFORMANCE_PROJECT' + IMPROVED_PERFORMANCE_USER_GRANT = 'IMPROVED_PERFORMANCE_USER_GRANT' + IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED = 'IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaFeatureServiceImprovedPerformance from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/session_service_otp_email_send_code.py b/zitadel_client/models/beta_feature_service_improved_performance_feature_flag.py similarity index 72% rename from zitadel_client/models/session_service_otp_email_send_code.py rename to zitadel_client/models/beta_feature_service_improved_performance_feature_flag.py index 73f2b655..cc7c30ef 100644 --- a/zitadel_client/models/session_service_otp_email_send_code.py +++ b/zitadel_client/models/beta_feature_service_improved_performance_feature_flag.py @@ -19,15 +19,18 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from zitadel_client.models.beta_feature_service_source import BetaFeatureServiceSource from typing import Optional, Set from typing_extensions import Self -class SessionServiceOTPEmailSendCode(BaseModel): +class BetaFeatureServiceImprovedPerformanceFeatureFlag(BaseModel): """ - SessionServiceOTPEmailSendCode + BetaFeatureServiceImprovedPerformanceFeatureFlag """ # noqa: E501 - url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: Code, UserID, LoginName, DisplayName, PreferredLanguage, SessionID", alias="urlTemplate") + execution_paths: Optional[List[BetaFeatureServiceImprovedPerformance]] = Field(default=None, alias="executionPaths") + source: Optional[BetaFeatureServiceSource] = None + __properties: ClassVar[List[str]] = ["executionPaths", "source"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceOTPEmailSendCode from a JSON string""" + """Create an instance of BetaFeatureServiceImprovedPerformanceFeatureFlag from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceOTPEmailSendCode from a dict""" + """Create an instance of BetaFeatureServiceImprovedPerformanceFeatureFlag from a dict""" if obj is None: return None @@ -80,7 +83,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "urlTemplate": obj.get("urlTemplate") + "executionPaths": obj.get("executionPaths"), + "source": obj.get("source") }) return _obj diff --git a/zitadel_client/models/beta_feature_service_reset_instance_features_response.py b/zitadel_client/models/beta_feature_service_reset_instance_features_response.py new file mode 100644 index 00000000..a9edce24 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_instance_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetInstanceFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetInstanceFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetInstanceFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetInstanceFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_organization_features_request.py b/zitadel_client/models/beta_feature_service_reset_organization_features_request.py new file mode 100644 index 00000000..de97e2aa --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_organization_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetOrganizationFeaturesRequest(BaseModel): + """ + BetaFeatureServiceResetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_organization_features_response.py b/zitadel_client/models/beta_feature_service_reset_organization_features_response.py new file mode 100644 index 00000000..a56a0d42 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_organization_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetOrganizationFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetOrganizationFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetOrganizationFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_system_features_response.py b/zitadel_client/models/beta_feature_service_reset_system_features_response.py new file mode 100644 index 00000000..5b56236b --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_system_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetSystemFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetSystemFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetSystemFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetSystemFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_user_features_request.py b/zitadel_client/models/beta_feature_service_reset_user_features_request.py new file mode 100644 index 00000000..f85922d7 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_user_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetUserFeaturesRequest(BaseModel): + """ + BetaFeatureServiceResetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_reset_user_features_response.py b/zitadel_client/models/beta_feature_service_reset_user_features_response.py new file mode 100644 index 00000000..c20ad74d --- /dev/null +++ b/zitadel_client/models/beta_feature_service_reset_user_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceResetUserFeaturesResponse(BaseModel): + """ + BetaFeatureServiceResetUserFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceResetUserFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_instance_features_request.py b/zitadel_client/models/beta_feature_service_set_instance_features_request.py new file mode 100644 index 00000000..43c83cac --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_instance_features_request.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetInstanceFeaturesRequest(BaseModel): + """ + BetaFeatureServiceSetInstanceFeaturesRequest + """ # noqa: E501 + login_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[BetaFeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + debug_oidc_parent_error: Optional[StrictBool] = Field(default=None, alias="debugOidcParentError") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + __properties: ClassVar[List[str]] = ["loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "debugOidcParentError", "oidcSingleV1SessionTermination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if debug_oidc_parent_error (nullable) is None + # and model_fields_set contains the field + if self.debug_oidc_parent_error is None and "debug_oidc_parent_error" in self.model_fields_set: + _dict['debugOidcParentError'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginDefaultOrg": obj.get("loginDefaultOrg"), + "userSchema": obj.get("userSchema"), + "oidcTokenExchange": obj.get("oidcTokenExchange"), + "improvedPerformance": obj.get("improvedPerformance"), + "debugOidcParentError": obj.get("debugOidcParentError"), + "oidcSingleV1SessionTermination": obj.get("oidcSingleV1SessionTermination") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_instance_features_response.py b/zitadel_client/models/beta_feature_service_set_instance_features_response.py new file mode 100644 index 00000000..4228738a --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_instance_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetInstanceFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetInstanceFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetInstanceFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_organization_features_request.py b/zitadel_client/models/beta_feature_service_set_organization_features_request.py new file mode 100644 index 00000000..090d9919 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_organization_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetOrganizationFeaturesRequest(BaseModel): + """ + BetaFeatureServiceSetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_organization_features_response.py b/zitadel_client/models/beta_feature_service_set_organization_features_response.py new file mode 100644 index 00000000..27da759c --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_organization_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetOrganizationFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetOrganizationFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetOrganizationFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_system_features_request.py b/zitadel_client/models/beta_feature_service_set_system_features_request.py new file mode 100644 index 00000000..15001a86 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_system_features_request.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_feature_service_improved_performance import BetaFeatureServiceImprovedPerformance +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetSystemFeaturesRequest(BaseModel): + """ + BetaFeatureServiceSetSystemFeaturesRequest + """ # noqa: E501 + login_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[BetaFeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + __properties: ClassVar[List[str]] = ["loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "oidcSingleV1SessionTermination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginDefaultOrg": obj.get("loginDefaultOrg"), + "userSchema": obj.get("userSchema"), + "oidcTokenExchange": obj.get("oidcTokenExchange"), + "improvedPerformance": obj.get("improvedPerformance"), + "oidcSingleV1SessionTermination": obj.get("oidcSingleV1SessionTermination") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_system_features_response.py b/zitadel_client/models/beta_feature_service_set_system_features_response.py new file mode 100644 index 00000000..eaa23073 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_system_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetSystemFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetSystemFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetSystemFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_user_feature_request.py b/zitadel_client/models/beta_feature_service_set_user_feature_request.py new file mode 100644 index 00000000..04cde3fc --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_user_feature_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetUserFeatureRequest(BaseModel): + """ + BetaFeatureServiceSetUserFeatureRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeatureRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeatureRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_set_user_features_response.py b/zitadel_client/models/beta_feature_service_set_user_features_response.py new file mode 100644 index 00000000..7e946b99 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_set_user_features_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_feature_service_details import BetaFeatureServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaFeatureServiceSetUserFeaturesResponse(BaseModel): + """ + BetaFeatureServiceSetUserFeaturesResponse + """ # noqa: E501 + details: Optional[BetaFeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeaturesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaFeatureServiceSetUserFeaturesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaFeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_feature_service_source.py b/zitadel_client/models/beta_feature_service_source.py new file mode 100644 index 00000000..9d9b9924 --- /dev/null +++ b/zitadel_client/models/beta_feature_service_source.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaFeatureServiceSource(str, Enum): + """ + BetaFeatureServiceSource + """ + + """ + allowed enum values + """ + SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED' + SOURCE_SYSTEM = 'SOURCE_SYSTEM' + SOURCE_INSTANCE = 'SOURCE_INSTANCE' + SOURCE_ORGANIZATION = 'SOURCE_ORGANIZATION' + SOURCE_PROJECT = 'SOURCE_PROJECT' + SOURCE_APP = 'SOURCE_APP' + SOURCE_USER = 'SOURCE_USER' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaFeatureServiceSource from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_instance_service_add_custom_domain_request.py b/zitadel_client/models/beta_instance_service_add_custom_domain_request.py new file mode 100644 index 00000000..9618b5fe --- /dev/null +++ b/zitadel_client/models/beta_instance_service_add_custom_domain_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceAddCustomDomainRequest(BaseModel): + """ + BetaInstanceServiceAddCustomDomainRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + domain: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["instanceId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddCustomDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddCustomDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_add_custom_domain_response.py b/zitadel_client/models/beta_instance_service_add_custom_domain_response.py new file mode 100644 index 00000000..b7ccd79a --- /dev/null +++ b/zitadel_client/models/beta_instance_service_add_custom_domain_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceAddCustomDomainResponse(BaseModel): + """ + BetaInstanceServiceAddCustomDomainResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddCustomDomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddCustomDomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_add_trusted_domain_request.py b/zitadel_client/models/beta_instance_service_add_trusted_domain_request.py new file mode 100644 index 00000000..5c609c18 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_add_trusted_domain_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceAddTrustedDomainRequest(BaseModel): + """ + BetaInstanceServiceAddTrustedDomainRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + domain: StrictStr + __properties: ClassVar[List[str]] = ["instanceId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddTrustedDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddTrustedDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_add_trusted_domain_response.py b/zitadel_client/models/beta_instance_service_add_trusted_domain_response.py new file mode 100644 index 00000000..8a754150 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_add_trusted_domain_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceAddTrustedDomainResponse(BaseModel): + """ + BetaInstanceServiceAddTrustedDomainResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddTrustedDomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceAddTrustedDomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_rpc_status.py b/zitadel_client/models/beta_instance_service_any.py similarity index 62% rename from zitadel_client/models/web_key_service_rpc_status.py rename to zitadel_client/models/beta_instance_service_any.py index 79ce9b53..6c3423ff 100644 --- a/zitadel_client/models/web_key_service_rpc_status.py +++ b/zitadel_client/models/beta_instance_service_any.py @@ -17,19 +17,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_protobuf_any import WebKeyServiceProtobufAny +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceRpcStatus(BaseModel): +class BetaInstanceServiceAny(BaseModel): """ - WebKeyServiceRpcStatus + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[WebKeyServiceProtobufAny]] = None + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceRpcStatus from a JSON string""" + """Create an instance of BetaInstanceServiceAny from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,18 +73,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceRpcStatus from a dict""" + """Create an instance of BetaInstanceServiceAny from a dict""" if obj is None: return None @@ -89,10 +90,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [WebKeyServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/zitadel_client/models/beta_instance_service_connect_error.py b/zitadel_client/models/beta_instance_service_connect_error.py new file mode 100644 index 00000000..4a6b07e4 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_any import BetaInstanceServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaInstanceServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaInstanceServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_delete_instance_request.py b/zitadel_client/models/beta_instance_service_delete_instance_request.py new file mode 100644 index 00000000..01fc55cb --- /dev/null +++ b/zitadel_client/models/beta_instance_service_delete_instance_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceDeleteInstanceRequest(BaseModel): + """ + BetaInstanceServiceDeleteInstanceRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + __properties: ClassVar[List[str]] = ["instanceId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDeleteInstanceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDeleteInstanceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_delete_instance_response.py b/zitadel_client/models/beta_instance_service_delete_instance_response.py new file mode 100644 index 00000000..1b363ad7 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_delete_instance_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceDeleteInstanceResponse(BaseModel): + """ + BetaInstanceServiceDeleteInstanceResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDeleteInstanceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDeleteInstanceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_domain.py b/zitadel_client/models/beta_instance_service_domain.py new file mode 100644 index 00000000..843f3cb5 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_domain.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceDomain(BaseModel): + """ + BetaInstanceServiceDomain + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + domain: Optional[StrictStr] = None + primary: Optional[StrictBool] = None + generated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["instanceId", "creationDate", "domain", "primary", "generated"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "creationDate": obj.get("creationDate"), + "domain": obj.get("domain"), + "primary": obj.get("primary"), + "generated": obj.get("generated") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_domain_field_name.py b/zitadel_client/models/beta_instance_service_domain_field_name.py new file mode 100644 index 00000000..29266180 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_domain_field_name.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInstanceServiceDomainFieldName(str, Enum): + """ + BetaInstanceServiceDomainFieldName + """ + + """ + allowed enum values + """ + DOMAIN_FIELD_NAME_UNSPECIFIED = 'DOMAIN_FIELD_NAME_UNSPECIFIED' + DOMAIN_FIELD_NAME_DOMAIN = 'DOMAIN_FIELD_NAME_DOMAIN' + DOMAIN_FIELD_NAME_PRIMARY = 'DOMAIN_FIELD_NAME_PRIMARY' + DOMAIN_FIELD_NAME_GENERATED = 'DOMAIN_FIELD_NAME_GENERATED' + DOMAIN_FIELD_NAME_CREATION_DATE = 'DOMAIN_FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInstanceServiceDomainFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_instance_service_domain_generated_query.py b/zitadel_client/models/beta_instance_service_domain_generated_query.py new file mode 100644 index 00000000..7dbcc5bd --- /dev/null +++ b/zitadel_client/models/beta_instance_service_domain_generated_query.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceDomainGeneratedQuery(BaseModel): + """ + BetaInstanceServiceDomainGeneratedQuery + """ # noqa: E501 + generated: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["generated"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainGeneratedQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainGeneratedQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "generated": obj.get("generated") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_domain_primary_query.py b/zitadel_client/models/beta_instance_service_domain_primary_query.py new file mode 100644 index 00000000..34c6dd09 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_domain_primary_query.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceDomainPrimaryQuery(BaseModel): + """ + BetaInstanceServiceDomainPrimaryQuery + """ # noqa: E501 + primary: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["primary"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainPrimaryQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainPrimaryQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "primary": obj.get("primary") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_domain_query.py b/zitadel_client/models/beta_instance_service_domain_query.py new file mode 100644 index 00000000..616d7628 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_domain_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_instance_service_text_query_method import BetaInstanceServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceDomainQuery(BaseModel): + """ + BetaInstanceServiceDomainQuery + """ # noqa: E501 + domain: Optional[StrictStr] = None + method: Optional[BetaInstanceServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["domain", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_domain_search_query.py b/zitadel_client/models/beta_instance_service_domain_search_query.py new file mode 100644 index 00000000..0842e17f --- /dev/null +++ b/zitadel_client/models/beta_instance_service_domain_search_query.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_instance_service_domain_generated_query import BetaInstanceServiceDomainGeneratedQuery +from zitadel_client.models.beta_instance_service_domain_primary_query import BetaInstanceServiceDomainPrimaryQuery +from zitadel_client.models.beta_instance_service_domain_query import BetaInstanceServiceDomainQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceDomainSearchQuery(BaseModel): + """ + BetaInstanceServiceDomainSearchQuery + """ # noqa: E501 + domain_query: Optional[BetaInstanceServiceDomainQuery] = Field(default=None, alias="domainQuery") + generated_query: Optional[BetaInstanceServiceDomainGeneratedQuery] = Field(default=None, alias="generatedQuery") + primary_query: Optional[BetaInstanceServiceDomainPrimaryQuery] = Field(default=None, alias="primaryQuery") + __properties: ClassVar[List[str]] = ["domainQuery", "generatedQuery", "primaryQuery"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainSearchQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_query + if self.domain_query: + _dict['domainQuery'] = self.domain_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of generated_query + if self.generated_query: + _dict['generatedQuery'] = self.generated_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of primary_query + if self.primary_query: + _dict['primaryQuery'] = self.primary_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceDomainSearchQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainQuery": BetaInstanceServiceDomainQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None, + "generatedQuery": BetaInstanceServiceDomainGeneratedQuery.from_dict(obj["generatedQuery"]) if obj.get("generatedQuery") is not None else None, + "primaryQuery": BetaInstanceServiceDomainPrimaryQuery.from_dict(obj["primaryQuery"]) if obj.get("primaryQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_execution_methods_response.py b/zitadel_client/models/beta_instance_service_domains_query.py similarity index 85% rename from zitadel_client/models/action_service_beta_list_execution_methods_response.py rename to zitadel_client/models/beta_instance_service_domains_query.py index 87aa02d8..1b29cf34 100644 --- a/zitadel_client/models/action_service_beta_list_execution_methods_response.py +++ b/zitadel_client/models/beta_instance_service_domains_query.py @@ -22,11 +22,12 @@ from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionMethodsResponse(BaseModel): +class BetaInstanceServiceDomainsQuery(BaseModel): """ - ActionServiceBetaListExecutionMethodsResponse + BetaInstanceServiceDomainsQuery """ # noqa: E501 - methods: Optional[List[StrictStr]] = None + domains: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["domains"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionMethodsResponse from a JSON string""" + """Create an instance of BetaInstanceServiceDomainsQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionMethodsResponse from a dict""" + """Create an instance of BetaInstanceServiceDomainsQuery from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "methods": obj.get("methods") + "domains": obj.get("domains") }) return _obj diff --git a/zitadel_client/models/beta_instance_service_field_name.py b/zitadel_client/models/beta_instance_service_field_name.py new file mode 100644 index 00000000..e5a19f49 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_field_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInstanceServiceFieldName(str, Enum): + """ + BetaInstanceServiceFieldName + """ + + """ + allowed enum values + """ + FIELD_NAME_UNSPECIFIED = 'FIELD_NAME_UNSPECIFIED' + FIELD_NAME_ID = 'FIELD_NAME_ID' + FIELD_NAME_NAME = 'FIELD_NAME_NAME' + FIELD_NAME_CREATION_DATE = 'FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInstanceServiceFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_instance_service_get_instance_request.py b/zitadel_client/models/beta_instance_service_get_instance_request.py new file mode 100644 index 00000000..60287c2d --- /dev/null +++ b/zitadel_client/models/beta_instance_service_get_instance_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceGetInstanceRequest(BaseModel): + """ + BetaInstanceServiceGetInstanceRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + __properties: ClassVar[List[str]] = ["instanceId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceGetInstanceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceGetInstanceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_get_instance_response.py b/zitadel_client/models/beta_instance_service_get_instance_response.py new file mode 100644 index 00000000..9bc46e5e --- /dev/null +++ b/zitadel_client/models/beta_instance_service_get_instance_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_instance_service_instance import BetaInstanceServiceInstance +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceGetInstanceResponse(BaseModel): + """ + BetaInstanceServiceGetInstanceResponse + """ # noqa: E501 + instance: Optional[BetaInstanceServiceInstance] = None + __properties: ClassVar[List[str]] = ["instance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceGetInstanceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance + if self.instance: + _dict['instance'] = self.instance.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceGetInstanceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance": BetaInstanceServiceInstance.from_dict(obj["instance"]) if obj.get("instance") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_execution_services_response.py b/zitadel_client/models/beta_instance_service_ids_query.py similarity index 85% rename from zitadel_client/models/action_service_beta_list_execution_services_response.py rename to zitadel_client/models/beta_instance_service_ids_query.py index 10f01bb2..25fd0f2a 100644 --- a/zitadel_client/models/action_service_beta_list_execution_services_response.py +++ b/zitadel_client/models/beta_instance_service_ids_query.py @@ -22,11 +22,12 @@ from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaListExecutionServicesResponse(BaseModel): +class BetaInstanceServiceIdsQuery(BaseModel): """ - ActionServiceBetaListExecutionServicesResponse + BetaInstanceServiceIdsQuery """ # noqa: E501 - services: Optional[List[StrictStr]] = None + ids: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["ids"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionServicesResponse from a JSON string""" + """Create an instance of BetaInstanceServiceIdsQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaListExecutionServicesResponse from a dict""" + """Create an instance of BetaInstanceServiceIdsQuery from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "services": obj.get("services") + "ids": obj.get("ids") }) return _obj diff --git a/zitadel_client/models/beta_instance_service_instance.py b/zitadel_client/models/beta_instance_service_instance.py new file mode 100644 index 00000000..97bcf0cc --- /dev/null +++ b/zitadel_client/models/beta_instance_service_instance.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_domain import BetaInstanceServiceDomain +from zitadel_client.models.beta_instance_service_state import BetaInstanceServiceState +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceInstance(BaseModel): + """ + BetaInstanceServiceInstance + """ # noqa: E501 + id: Optional[StrictStr] = None + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + state: Optional[BetaInstanceServiceState] = None + name: Optional[StrictStr] = None + version: Optional[StrictStr] = None + domains: Optional[List[BetaInstanceServiceDomain]] = None + __properties: ClassVar[List[str]] = ["id", "changeDate", "creationDate", "state", "name", "version", "domains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceInstance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in domains (list) + _items = [] + if self.domains: + for _item_domains in self.domains: + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceInstance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "changeDate": obj.get("changeDate"), + "creationDate": obj.get("creationDate"), + "state": obj.get("state"), + "name": obj.get("name"), + "version": obj.get("version"), + "domains": [BetaInstanceServiceDomain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_list_custom_domains_request.py b/zitadel_client/models/beta_instance_service_list_custom_domains_request.py new file mode 100644 index 00000000..aaa2d443 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_list_custom_domains_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_domain_field_name import BetaInstanceServiceDomainFieldName +from zitadel_client.models.beta_instance_service_domain_search_query import BetaInstanceServiceDomainSearchQuery +from zitadel_client.models.beta_instance_service_pagination_request import BetaInstanceServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceListCustomDomainsRequest(BaseModel): + """ + BetaInstanceServiceListCustomDomainsRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + pagination: Optional[BetaInstanceServicePaginationRequest] = None + sorting_column: Optional[BetaInstanceServiceDomainFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[BetaInstanceServiceDomainSearchQuery]] = Field(default=None, description="Criterias the client is looking for.") + __properties: ClassVar[List[str]] = ["instanceId", "pagination", "sortingColumn", "queries"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListCustomDomainsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) + _items = [] + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListCustomDomainsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "pagination": BetaInstanceServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "queries": [BetaInstanceServiceDomainSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_list_custom_domains_response.py b/zitadel_client/models/beta_instance_service_list_custom_domains_response.py new file mode 100644 index 00000000..1ca807ce --- /dev/null +++ b/zitadel_client/models/beta_instance_service_list_custom_domains_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_domain import BetaInstanceServiceDomain +from zitadel_client.models.beta_instance_service_pagination_response import BetaInstanceServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceListCustomDomainsResponse(BaseModel): + """ + BetaInstanceServiceListCustomDomainsResponse + """ # noqa: E501 + domains: Optional[List[BetaInstanceServiceDomain]] = None + pagination: Optional[BetaInstanceServicePaginationResponse] = None + __properties: ClassVar[List[str]] = ["domains", "pagination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListCustomDomainsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in domains (list) + _items = [] + if self.domains: + for _item_domains in self.domains: + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListCustomDomainsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domains": [BetaInstanceServiceDomain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None, + "pagination": BetaInstanceServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_list_instances_request.py b/zitadel_client/models/beta_instance_service_list_instances_request.py new file mode 100644 index 00000000..dbb5538e --- /dev/null +++ b/zitadel_client/models/beta_instance_service_list_instances_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_field_name import BetaInstanceServiceFieldName +from zitadel_client.models.beta_instance_service_pagination_request import BetaInstanceServicePaginationRequest +from zitadel_client.models.beta_instance_service_query import BetaInstanceServiceQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceListInstancesRequest(BaseModel): + """ + BetaInstanceServiceListInstancesRequest + """ # noqa: E501 + queries: Optional[List[BetaInstanceServiceQuery]] = Field(default=None, description="Criterias the client is looking for.") + pagination: Optional[BetaInstanceServicePaginationRequest] = None + sorting_column: Optional[BetaInstanceServiceFieldName] = Field(default=None, alias="sortingColumn") + __properties: ClassVar[List[str]] = ["queries", "pagination", "sortingColumn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListInstancesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) + _items = [] + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListInstancesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "queries": [BetaInstanceServiceQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None, + "pagination": BetaInstanceServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_list_instances_response.py b/zitadel_client/models/beta_instance_service_list_instances_response.py new file mode 100644 index 00000000..34fc5d13 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_list_instances_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_instance import BetaInstanceServiceInstance +from zitadel_client.models.beta_instance_service_pagination_response import BetaInstanceServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceListInstancesResponse(BaseModel): + """ + BetaInstanceServiceListInstancesResponse + """ # noqa: E501 + instances: Optional[List[BetaInstanceServiceInstance]] = Field(default=None, description="The list of instances.") + pagination: Optional[BetaInstanceServicePaginationResponse] = None + __properties: ClassVar[List[str]] = ["instances", "pagination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListInstancesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item_instances in self.instances: + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListInstancesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instances": [BetaInstanceServiceInstance.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "pagination": BetaInstanceServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_list_trusted_domains_request.py b/zitadel_client/models/beta_instance_service_list_trusted_domains_request.py new file mode 100644 index 00000000..51072849 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_list_trusted_domains_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_pagination_request import BetaInstanceServicePaginationRequest +from zitadel_client.models.beta_instance_service_trusted_domain_field_name import BetaInstanceServiceTrustedDomainFieldName +from zitadel_client.models.beta_instance_service_trusted_domain_search_query import BetaInstanceServiceTrustedDomainSearchQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceListTrustedDomainsRequest(BaseModel): + """ + BetaInstanceServiceListTrustedDomainsRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + pagination: Optional[BetaInstanceServicePaginationRequest] = None + sorting_column: Optional[BetaInstanceServiceTrustedDomainFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[BetaInstanceServiceTrustedDomainSearchQuery]] = Field(default=None, description="Criterias the client is looking for.") + __properties: ClassVar[List[str]] = ["instanceId", "pagination", "sortingColumn", "queries"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListTrustedDomainsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) + _items = [] + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListTrustedDomainsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "pagination": BetaInstanceServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "queries": [BetaInstanceServiceTrustedDomainSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_list_trusted_domains_response.py b/zitadel_client/models/beta_instance_service_list_trusted_domains_response.py new file mode 100644 index 00000000..28b55106 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_list_trusted_domains_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_instance_service_pagination_response import BetaInstanceServicePaginationResponse +from zitadel_client.models.beta_instance_service_trusted_domain import BetaInstanceServiceTrustedDomain +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceListTrustedDomainsResponse(BaseModel): + """ + BetaInstanceServiceListTrustedDomainsResponse + """ # noqa: E501 + trusted_domain: Optional[List[BetaInstanceServiceTrustedDomain]] = Field(default=None, alias="trustedDomain") + pagination: Optional[BetaInstanceServicePaginationResponse] = None + __properties: ClassVar[List[str]] = ["trustedDomain", "pagination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListTrustedDomainsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in trusted_domain (list) + _items = [] + if self.trusted_domain: + for _item_trusted_domain in self.trusted_domain: + if _item_trusted_domain: + _items.append(_item_trusted_domain.to_dict()) + _dict['trustedDomain'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceListTrustedDomainsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trustedDomain": [BetaInstanceServiceTrustedDomain.from_dict(_item) for _item in obj["trustedDomain"]] if obj.get("trustedDomain") is not None else None, + "pagination": BetaInstanceServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_pagination_request.py b/zitadel_client/models/beta_instance_service_pagination_request.py new file mode 100644 index 00000000..a1b3721a --- /dev/null +++ b/zitadel_client/models/beta_instance_service_pagination_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServicePaginationRequest(BaseModel): + """ + BetaInstanceServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServicePaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServicePaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_pagination_response.py b/zitadel_client/models/beta_instance_service_pagination_response.py new file mode 100644 index 00000000..c2c853db --- /dev/null +++ b/zitadel_client/models/beta_instance_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServicePaginationResponse(BaseModel): + """ + BetaInstanceServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_query.py b/zitadel_client/models/beta_instance_service_query.py new file mode 100644 index 00000000..39ae8120 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_query.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_instance_service_domains_query import BetaInstanceServiceDomainsQuery +from zitadel_client.models.beta_instance_service_ids_query import BetaInstanceServiceIdsQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceQuery(BaseModel): + """ + BetaInstanceServiceQuery + """ # noqa: E501 + domain_query: Optional[BetaInstanceServiceDomainsQuery] = Field(default=None, alias="domainQuery") + id_query: Optional[BetaInstanceServiceIdsQuery] = Field(default=None, alias="idQuery") + __properties: ClassVar[List[str]] = ["domainQuery", "idQuery"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_query + if self.domain_query: + _dict['domainQuery'] = self.domain_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of id_query + if self.id_query: + _dict['idQuery'] = self.id_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainQuery": BetaInstanceServiceDomainsQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None, + "idQuery": BetaInstanceServiceIdsQuery.from_dict(obj["idQuery"]) if obj.get("idQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_remove_custom_domain_request.py b/zitadel_client/models/beta_instance_service_remove_custom_domain_request.py new file mode 100644 index 00000000..a5e11c11 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_remove_custom_domain_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceRemoveCustomDomainRequest(BaseModel): + """ + BetaInstanceServiceRemoveCustomDomainRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + domain: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["instanceId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveCustomDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveCustomDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_remove_custom_domain_response.py b/zitadel_client/models/beta_instance_service_remove_custom_domain_response.py new file mode 100644 index 00000000..954ae20a --- /dev/null +++ b/zitadel_client/models/beta_instance_service_remove_custom_domain_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceRemoveCustomDomainResponse(BaseModel): + """ + BetaInstanceServiceRemoveCustomDomainResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveCustomDomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveCustomDomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_remove_trusted_domain_request.py b/zitadel_client/models/beta_instance_service_remove_trusted_domain_request.py new file mode 100644 index 00000000..db836aa8 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_remove_trusted_domain_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceRemoveTrustedDomainRequest(BaseModel): + """ + BetaInstanceServiceRemoveTrustedDomainRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + domain: StrictStr + __properties: ClassVar[List[str]] = ["instanceId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveTrustedDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveTrustedDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_remove_trusted_domain_response.py b/zitadel_client/models/beta_instance_service_remove_trusted_domain_response.py new file mode 100644 index 00000000..86a76bde --- /dev/null +++ b/zitadel_client/models/beta_instance_service_remove_trusted_domain_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceRemoveTrustedDomainResponse(BaseModel): + """ + BetaInstanceServiceRemoveTrustedDomainResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveTrustedDomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceRemoveTrustedDomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_state.py b/zitadel_client/models/beta_instance_service_state.py new file mode 100644 index 00000000..0b5af3a6 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInstanceServiceState(str, Enum): + """ + BetaInstanceServiceState + """ + + """ + allowed enum values + """ + STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' + STATE_CREATING = 'STATE_CREATING' + STATE_RUNNING = 'STATE_RUNNING' + STATE_STOPPING = 'STATE_STOPPING' + STATE_STOPPED = 'STATE_STOPPED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInstanceServiceState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_instance_service_text_query_method.py b/zitadel_client/models/beta_instance_service_text_query_method.py new file mode 100644 index 00000000..cfd69eda --- /dev/null +++ b/zitadel_client/models/beta_instance_service_text_query_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInstanceServiceTextQueryMethod(str, Enum): + """ + BetaInstanceServiceTextQueryMethod + """ + + """ + allowed enum values + """ + TEXT_QUERY_METHOD_EQUALS = 'TEXT_QUERY_METHOD_EQUALS' + TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = 'TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE' + TEXT_QUERY_METHOD_STARTS_WITH = 'TEXT_QUERY_METHOD_STARTS_WITH' + TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_QUERY_METHOD_CONTAINS = 'TEXT_QUERY_METHOD_CONTAINS' + TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE' + TEXT_QUERY_METHOD_ENDS_WITH = 'TEXT_QUERY_METHOD_ENDS_WITH' + TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInstanceServiceTextQueryMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_instance_service_trusted_domain.py b/zitadel_client/models/beta_instance_service_trusted_domain.py new file mode 100644 index 00000000..c45ecbaa --- /dev/null +++ b/zitadel_client/models/beta_instance_service_trusted_domain.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceTrustedDomain(BaseModel): + """ + BetaInstanceServiceTrustedDomain + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + domain: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["instanceId", "creationDate", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceTrustedDomain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceTrustedDomain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "creationDate": obj.get("creationDate"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_trusted_domain_field_name.py b/zitadel_client/models/beta_instance_service_trusted_domain_field_name.py new file mode 100644 index 00000000..1b394341 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_trusted_domain_field_name.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInstanceServiceTrustedDomainFieldName(str, Enum): + """ + BetaInstanceServiceTrustedDomainFieldName + """ + + """ + allowed enum values + """ + TRUSTED_DOMAIN_FIELD_NAME_UNSPECIFIED = 'TRUSTED_DOMAIN_FIELD_NAME_UNSPECIFIED' + TRUSTED_DOMAIN_FIELD_NAME_DOMAIN = 'TRUSTED_DOMAIN_FIELD_NAME_DOMAIN' + TRUSTED_DOMAIN_FIELD_NAME_CREATION_DATE = 'TRUSTED_DOMAIN_FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInstanceServiceTrustedDomainFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_instance_service_trusted_domain_search_query.py b/zitadel_client/models/beta_instance_service_trusted_domain_search_query.py new file mode 100644 index 00000000..64347576 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_trusted_domain_search_query.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_instance_service_domain_query import BetaInstanceServiceDomainQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceTrustedDomainSearchQuery(BaseModel): + """ + BetaInstanceServiceTrustedDomainSearchQuery + """ # noqa: E501 + domain_query: Optional[BetaInstanceServiceDomainQuery] = Field(default=None, alias="domainQuery") + __properties: ClassVar[List[str]] = ["domainQuery"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceTrustedDomainSearchQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_query + if self.domain_query: + _dict['domainQuery'] = self.domain_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceTrustedDomainSearchQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainQuery": BetaInstanceServiceDomainQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_update_instance_request.py b/zitadel_client/models/beta_instance_service_update_instance_request.py new file mode 100644 index 00000000..104d5c4d --- /dev/null +++ b/zitadel_client/models/beta_instance_service_update_instance_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceUpdateInstanceRequest(BaseModel): + """ + BetaInstanceServiceUpdateInstanceRequest + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, description="used only to identify the instance to change.", alias="instanceId") + instance_name: Optional[StrictStr] = Field(default=None, alias="instanceName") + __properties: ClassVar[List[str]] = ["instanceId", "instanceName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceUpdateInstanceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceUpdateInstanceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "instanceName": obj.get("instanceName") + }) + return _obj + + diff --git a/zitadel_client/models/beta_instance_service_update_instance_response.py b/zitadel_client/models/beta_instance_service_update_instance_response.py new file mode 100644 index 00000000..a9c0fb85 --- /dev/null +++ b/zitadel_client/models/beta_instance_service_update_instance_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInstanceServiceUpdateInstanceResponse(BaseModel): + """ + BetaInstanceServiceUpdateInstanceResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInstanceServiceUpdateInstanceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInstanceServiceUpdateInstanceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_administrator.py b/zitadel_client/models/beta_internal_permission_service_administrator.py new file mode 100644 index 00000000..d333be46 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_administrator.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_internal_permission_service_organization import BetaInternalPermissionServiceOrganization +from zitadel_client.models.beta_internal_permission_service_project import BetaInternalPermissionServiceProject +from zitadel_client.models.beta_internal_permission_service_project_grant import BetaInternalPermissionServiceProjectGrant +from zitadel_client.models.beta_internal_permission_service_user import BetaInternalPermissionServiceUser +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceAdministrator(BaseModel): + """ + BetaInternalPermissionServiceAdministrator + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + user: Optional[BetaInternalPermissionServiceUser] = None + roles: Optional[List[StrictStr]] = Field(default=None, description="Roles are the roles that were granted to the user for the specified resource.") + instance: Optional[StrictBool] = Field(default=None, description="Instance is returned if the administrator roles were granted on the instance level.") + organization: Optional[BetaInternalPermissionServiceOrganization] = None + project: Optional[BetaInternalPermissionServiceProject] = None + project_grant: Optional[BetaInternalPermissionServiceProjectGrant] = Field(default=None, alias="projectGrant") + __properties: ClassVar[List[str]] = ["creationDate", "changeDate", "user", "roles", "instance", "organization", "project", "projectGrant"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAdministrator from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of organization + if self.organization: + _dict['organization'] = self.organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of project + if self.project: + _dict['project'] = self.project.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_grant + if self.project_grant: + _dict['projectGrant'] = self.project_grant.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAdministrator from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "user": BetaInternalPermissionServiceUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "roles": obj.get("roles"), + "instance": obj.get("instance"), + "organization": BetaInternalPermissionServiceOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "project": BetaInternalPermissionServiceProject.from_dict(obj["project"]) if obj.get("project") is not None else None, + "projectGrant": BetaInternalPermissionServiceProjectGrant.from_dict(obj["projectGrant"]) if obj.get("projectGrant") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_administrator_field_name.py b/zitadel_client/models/beta_internal_permission_service_administrator_field_name.py new file mode 100644 index 00000000..464df942 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_administrator_field_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInternalPermissionServiceAdministratorFieldName(str, Enum): + """ + BetaInternalPermissionServiceAdministratorFieldName + """ + + """ + allowed enum values + """ + ADMINISTRATOR_FIELD_NAME_UNSPECIFIED = 'ADMINISTRATOR_FIELD_NAME_UNSPECIFIED' + ADMINISTRATOR_FIELD_NAME_USER_ID = 'ADMINISTRATOR_FIELD_NAME_USER_ID' + ADMINISTRATOR_FIELD_NAME_CREATION_DATE = 'ADMINISTRATOR_FIELD_NAME_CREATION_DATE' + ADMINISTRATOR_FIELD_NAME_CHANGE_DATE = 'ADMINISTRATOR_FIELD_NAME_CHANGE_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInternalPermissionServiceAdministratorFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_internal_permission_service_administrator_search_filter.py b/zitadel_client/models/beta_internal_permission_service_administrator_search_filter.py new file mode 100644 index 00000000..3e1ac899 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_administrator_search_filter.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_internal_permission_service_id_filter import BetaInternalPermissionServiceIDFilter +from zitadel_client.models.beta_internal_permission_service_in_ids_filter import BetaInternalPermissionServiceInIDsFilter +from zitadel_client.models.beta_internal_permission_service_resource_filter import BetaInternalPermissionServiceResourceFilter +from zitadel_client.models.beta_internal_permission_service_role_filter import BetaInternalPermissionServiceRoleFilter +from zitadel_client.models.beta_internal_permission_service_timestamp_filter import BetaInternalPermissionServiceTimestampFilter +from zitadel_client.models.beta_internal_permission_service_user_display_name_filter import BetaInternalPermissionServiceUserDisplayNameFilter +from zitadel_client.models.beta_internal_permission_service_user_preferred_login_name_filter import BetaInternalPermissionServiceUserPreferredLoginNameFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceAdministratorSearchFilter(BaseModel): + """ + BetaInternalPermissionServiceAdministratorSearchFilter + """ # noqa: E501 + var_and: Optional[BetaInternalPermissionServiceAndFilter] = Field(default=None, alias="and") + change_date: Optional[BetaInternalPermissionServiceTimestampFilter] = Field(default=None, alias="changeDate") + creation_date: Optional[BetaInternalPermissionServiceTimestampFilter] = Field(default=None, alias="creationDate") + in_user_ids_filter: Optional[BetaInternalPermissionServiceInIDsFilter] = Field(default=None, alias="inUserIdsFilter") + var_not: Optional[BetaInternalPermissionServiceNotFilter] = Field(default=None, alias="not") + var_or: Optional[BetaInternalPermissionServiceOrFilter] = Field(default=None, alias="or") + resource: Optional[BetaInternalPermissionServiceResourceFilter] = None + role: Optional[BetaInternalPermissionServiceRoleFilter] = None + user_display_name: Optional[BetaInternalPermissionServiceUserDisplayNameFilter] = Field(default=None, alias="userDisplayName") + user_organization_id: Optional[BetaInternalPermissionServiceIDFilter] = Field(default=None, alias="userOrganizationId") + user_preferred_login_name: Optional[BetaInternalPermissionServiceUserPreferredLoginNameFilter] = Field(default=None, alias="userPreferredLoginName") + __properties: ClassVar[List[str]] = ["and", "changeDate", "creationDate", "inUserIdsFilter", "not", "or", "resource", "role", "userDisplayName", "userOrganizationId", "userPreferredLoginName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAdministratorSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_and + if self.var_and: + _dict['and'] = self.var_and.to_dict() + # override the default output from pydantic by calling `to_dict()` of change_date + if self.change_date: + _dict['changeDate'] = self.change_date.to_dict() + # override the default output from pydantic by calling `to_dict()` of creation_date + if self.creation_date: + _dict['creationDate'] = self.creation_date.to_dict() + # override the default output from pydantic by calling `to_dict()` of in_user_ids_filter + if self.in_user_ids_filter: + _dict['inUserIdsFilter'] = self.in_user_ids_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_not + if self.var_not: + _dict['not'] = self.var_not.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_or + if self.var_or: + _dict['or'] = self.var_or.to_dict() + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # override the default output from pydantic by calling `to_dict()` of role + if self.role: + _dict['role'] = self.role.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_display_name + if self.user_display_name: + _dict['userDisplayName'] = self.user_display_name.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_organization_id + if self.user_organization_id: + _dict['userOrganizationId'] = self.user_organization_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_preferred_login_name + if self.user_preferred_login_name: + _dict['userPreferredLoginName'] = self.user_preferred_login_name.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAdministratorSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "and": BetaInternalPermissionServiceAndFilter.from_dict(obj["and"]) if obj.get("and") is not None else None, + "changeDate": BetaInternalPermissionServiceTimestampFilter.from_dict(obj["changeDate"]) if obj.get("changeDate") is not None else None, + "creationDate": BetaInternalPermissionServiceTimestampFilter.from_dict(obj["creationDate"]) if obj.get("creationDate") is not None else None, + "inUserIdsFilter": BetaInternalPermissionServiceInIDsFilter.from_dict(obj["inUserIdsFilter"]) if obj.get("inUserIdsFilter") is not None else None, + "not": BetaInternalPermissionServiceNotFilter.from_dict(obj["not"]) if obj.get("not") is not None else None, + "or": BetaInternalPermissionServiceOrFilter.from_dict(obj["or"]) if obj.get("or") is not None else None, + "resource": BetaInternalPermissionServiceResourceFilter.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "role": BetaInternalPermissionServiceRoleFilter.from_dict(obj["role"]) if obj.get("role") is not None else None, + "userDisplayName": BetaInternalPermissionServiceUserDisplayNameFilter.from_dict(obj["userDisplayName"]) if obj.get("userDisplayName") is not None else None, + "userOrganizationId": BetaInternalPermissionServiceIDFilter.from_dict(obj["userOrganizationId"]) if obj.get("userOrganizationId") is not None else None, + "userPreferredLoginName": BetaInternalPermissionServiceUserPreferredLoginNameFilter.from_dict(obj["userPreferredLoginName"]) if obj.get("userPreferredLoginName") is not None else None + }) + return _obj + +from zitadel_client.models.beta_internal_permission_service_and_filter import BetaInternalPermissionServiceAndFilter +from zitadel_client.models.beta_internal_permission_service_not_filter import BetaInternalPermissionServiceNotFilter +from zitadel_client.models.beta_internal_permission_service_or_filter import BetaInternalPermissionServiceOrFilter +# TODO: Rewrite to not use raise_errors +BetaInternalPermissionServiceAdministratorSearchFilter.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/beta_internal_permission_service_and_filter.py b/zitadel_client/models/beta_internal_permission_service_and_filter.py new file mode 100644 index 00000000..ed158c17 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_and_filter.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceAndFilter(BaseModel): + """ + BetaInternalPermissionServiceAndFilter + """ # noqa: E501 + queries: Optional[List[BetaInternalPermissionServiceAdministratorSearchFilter]] = None + __properties: ClassVar[List[str]] = ["queries"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAndFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) + _items = [] + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAndFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "queries": [BetaInternalPermissionServiceAdministratorSearchFilter.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None + }) + return _obj + +from zitadel_client.models.beta_internal_permission_service_administrator_search_filter import BetaInternalPermissionServiceAdministratorSearchFilter +# TODO: Rewrite to not use raise_errors +BetaInternalPermissionServiceAndFilter.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/beta_internal_permission_service_any.py b/zitadel_client/models/beta_internal_permission_service_any.py new file mode 100644 index 00000000..56a5ed91 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_connect_error.py b/zitadel_client/models/beta_internal_permission_service_connect_error.py new file mode 100644 index 00000000..18ef256f --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_internal_permission_service_any import BetaInternalPermissionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaInternalPermissionServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaInternalPermissionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_create_administrator_request.py b/zitadel_client/models/beta_internal_permission_service_create_administrator_request.py new file mode 100644 index 00000000..28baee74 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_create_administrator_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_internal_permission_service_resource_type import BetaInternalPermissionServiceResourceType +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceCreateAdministratorRequest(BaseModel): + """ + BetaInternalPermissionServiceCreateAdministratorRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="UserID is the ID of the user who should be granted the administrator role.", alias="userId") + resource: Optional[BetaInternalPermissionServiceResourceType] = None + roles: Optional[List[StrictStr]] = Field(default=None, description="Roles are the roles that should be granted to the user for the specified resource. Note that roles are currently specific to the resource type. This means that if you want to grant a user the administrator role for an organization and a project, you need to create two administrator roles.") + __properties: ClassVar[List[str]] = ["userId", "resource", "roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceCreateAdministratorRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceCreateAdministratorRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "resource": BetaInternalPermissionServiceResourceType.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "roles": obj.get("roles") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_create_administrator_response.py b/zitadel_client/models/beta_internal_permission_service_create_administrator_response.py new file mode 100644 index 00000000..3ec780f2 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_create_administrator_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceCreateAdministratorResponse(BaseModel): + """ + BetaInternalPermissionServiceCreateAdministratorResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceCreateAdministratorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceCreateAdministratorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_delete_administrator_request.py b/zitadel_client/models/beta_internal_permission_service_delete_administrator_request.py new file mode 100644 index 00000000..e6dd06c3 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_delete_administrator_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_internal_permission_service_resource_type import BetaInternalPermissionServiceResourceType +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceDeleteAdministratorRequest(BaseModel): + """ + BetaInternalPermissionServiceDeleteAdministratorRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="UserID is the ID of the user who should have his administrator roles removed.", alias="userId") + resource: Optional[BetaInternalPermissionServiceResourceType] = None + __properties: ClassVar[List[str]] = ["userId", "resource"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceDeleteAdministratorRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceDeleteAdministratorRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "resource": BetaInternalPermissionServiceResourceType.from_dict(obj["resource"]) if obj.get("resource") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_delete_administrator_response.py b/zitadel_client/models/beta_internal_permission_service_delete_administrator_response.py new file mode 100644 index 00000000..d82b7a5f --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_delete_administrator_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceDeleteAdministratorResponse(BaseModel): + """ + BetaInternalPermissionServiceDeleteAdministratorResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceDeleteAdministratorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceDeleteAdministratorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_id_filter.py b/zitadel_client/models/beta_internal_permission_service_id_filter.py new file mode 100644 index 00000000..e401d2a3 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_id_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceIDFilter(BaseModel): + """ + BetaInternalPermissionServiceIDFilter + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Only return resources that belong to this id.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceIDFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceIDFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_in_ids_filter.py b/zitadel_client/models/beta_internal_permission_service_in_ids_filter.py new file mode 100644 index 00000000..af856b00 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_in_ids_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceInIDsFilter(BaseModel): + """ + BetaInternalPermissionServiceInIDsFilter + """ # noqa: E501 + ids: Optional[List[StrictStr]] = Field(default=None, description="Defines the ids to query for.") + __properties: ClassVar[List[str]] = ["ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceInIDsFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceInIDsFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ids": obj.get("ids") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_list_administrators_request.py b/zitadel_client/models/beta_internal_permission_service_list_administrators_request.py new file mode 100644 index 00000000..ff6f8cd3 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_list_administrators_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_internal_permission_service_administrator_field_name import BetaInternalPermissionServiceAdministratorFieldName +from zitadel_client.models.beta_internal_permission_service_administrator_search_filter import BetaInternalPermissionServiceAdministratorSearchFilter +from zitadel_client.models.beta_internal_permission_service_pagination_request import BetaInternalPermissionServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceListAdministratorsRequest(BaseModel): + """ + BetaInternalPermissionServiceListAdministratorsRequest + """ # noqa: E501 + pagination: Optional[BetaInternalPermissionServicePaginationRequest] = None + sorting_column: Optional[BetaInternalPermissionServiceAdministratorFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaInternalPermissionServiceAdministratorSearchFilter]] = Field(default=None, description="Filter the administrator roles to be returned.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceListAdministratorsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceListAdministratorsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaInternalPermissionServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaInternalPermissionServiceAdministratorSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_list_administrators_response.py b/zitadel_client/models/beta_internal_permission_service_list_administrators_response.py new file mode 100644 index 00000000..07388c0d --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_list_administrators_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_internal_permission_service_administrator import BetaInternalPermissionServiceAdministrator +from zitadel_client.models.beta_internal_permission_service_pagination_response import BetaInternalPermissionServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceListAdministratorsResponse(BaseModel): + """ + BetaInternalPermissionServiceListAdministratorsResponse + """ # noqa: E501 + pagination: Optional[BetaInternalPermissionServicePaginationResponse] = None + administrators: Optional[List[BetaInternalPermissionServiceAdministrator]] = None + __properties: ClassVar[List[str]] = ["pagination", "administrators"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceListAdministratorsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in administrators (list) + _items = [] + if self.administrators: + for _item_administrators in self.administrators: + if _item_administrators: + _items.append(_item_administrators.to_dict()) + _dict['administrators'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceListAdministratorsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaInternalPermissionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "administrators": [BetaInternalPermissionServiceAdministrator.from_dict(_item) for _item in obj["administrators"]] if obj.get("administrators") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/oidc_service_rpc_status.py b/zitadel_client/models/beta_internal_permission_service_not_filter.py similarity index 68% rename from zitadel_client/models/oidc_service_rpc_status.py rename to zitadel_client/models/beta_internal_permission_service_not_filter.py index 5dbf6d41..278162fc 100644 --- a/zitadel_client/models/oidc_service_rpc_status.py +++ b/zitadel_client/models/beta_internal_permission_service_not_filter.py @@ -17,19 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.oidc_service_protobuf_any import OIDCServiceProtobufAny +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class OIDCServiceRpcStatus(BaseModel): +class BetaInternalPermissionServiceNotFilter(BaseModel): """ - OIDCServiceRpcStatus + BetaInternalPermissionServiceNotFilter """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[OIDCServiceProtobufAny]] = None + query: Optional[BetaInternalPermissionServiceAdministratorSearchFilter] = None + __properties: ClassVar[List[str]] = ["query"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OIDCServiceRpcStatus from a JSON string""" + """Create an instance of BetaInternalPermissionServiceNotFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +68,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OIDCServiceRpcStatus from a dict""" + """Create an instance of BetaInternalPermissionServiceNotFilter from a dict""" if obj is None: return None @@ -89,10 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [OIDCServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "query": BetaInternalPermissionServiceAdministratorSearchFilter.from_dict(obj["query"]) if obj.get("query") is not None else None }) return _obj +from zitadel_client.models.beta_internal_permission_service_administrator_search_filter import BetaInternalPermissionServiceAdministratorSearchFilter +# TODO: Rewrite to not use raise_errors +BetaInternalPermissionServiceNotFilter.model_rebuild(raise_errors=False) diff --git a/zitadel_client/models/identity_provider_service_rpc_status.py b/zitadel_client/models/beta_internal_permission_service_or_filter.py similarity index 67% rename from zitadel_client/models/identity_provider_service_rpc_status.py rename to zitadel_client/models/beta_internal_permission_service_or_filter.py index 7791068f..bef1dd68 100644 --- a/zitadel_client/models/identity_provider_service_rpc_status.py +++ b/zitadel_client/models/beta_internal_permission_service_or_filter.py @@ -17,19 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.identity_provider_service_protobuf_any import IdentityProviderServiceProtobufAny from typing import Optional, Set from typing_extensions import Self -class IdentityProviderServiceRpcStatus(BaseModel): +class BetaInternalPermissionServiceOrFilter(BaseModel): """ - IdentityProviderServiceRpcStatus + BetaInternalPermissionServiceOrFilter """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[IdentityProviderServiceProtobufAny]] = None + queries: Optional[List[BetaInternalPermissionServiceAdministratorSearchFilter]] = None + __properties: ClassVar[List[str]] = ["queries"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of IdentityProviderServiceRpcStatus from a JSON string""" + """Create an instance of BetaInternalPermissionServiceOrFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +68,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of IdentityProviderServiceRpcStatus from a dict""" + """Create an instance of BetaInternalPermissionServiceOrFilter from a dict""" if obj is None: return None @@ -89,10 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [IdentityProviderServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "queries": [BetaInternalPermissionServiceAdministratorSearchFilter.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj +from zitadel_client.models.beta_internal_permission_service_administrator_search_filter import BetaInternalPermissionServiceAdministratorSearchFilter +# TODO: Rewrite to not use raise_errors +BetaInternalPermissionServiceOrFilter.model_rebuild(raise_errors=False) diff --git a/zitadel_client/models/beta_internal_permission_service_organization.py b/zitadel_client/models/beta_internal_permission_service_organization.py new file mode 100644 index 00000000..4794878b --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_organization.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceOrganization(BaseModel): + """ + BetaInternalPermissionServiceOrganization + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the organization the user was granted the administrator role for.") + name: Optional[StrictStr] = Field(default=None, description="Name is the name of the organization the user was granted the administrator role for.") + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_pagination_request.py b/zitadel_client/models/beta_internal_permission_service_pagination_request.py new file mode 100644 index 00000000..e41873a2 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_pagination_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServicePaginationRequest(BaseModel): + """ + BetaInternalPermissionServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServicePaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServicePaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_pagination_response.py b/zitadel_client/models/beta_internal_permission_service_pagination_response.py new file mode 100644 index 00000000..87b42474 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServicePaginationResponse(BaseModel): + """ + BetaInternalPermissionServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_project.py b/zitadel_client/models/beta_internal_permission_service_project.py new file mode 100644 index 00000000..2d1eb50b --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_project.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceProject(BaseModel): + """ + BetaInternalPermissionServiceProject + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the project the user was granted the administrator role for.") + name: Optional[StrictStr] = Field(default=None, description="Name is the name of the project the user was granted the administrator role for.") + organization_id: Optional[StrictStr] = Field(default=None, description="OrganizationID is the ID of the organization the project belongs to.", alias="organizationId") + __properties: ClassVar[List[str]] = ["id", "name", "organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceProject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceProject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_project_grant.py b/zitadel_client/models/beta_internal_permission_service_project_grant.py new file mode 100644 index 00000000..c4de3197 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_project_grant.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceProjectGrant(BaseModel): + """ + BetaInternalPermissionServiceProjectGrant + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, description="ProjectID is required to grant administrator privileges for a specific project.", alias="projectId") + project_grant_id: Optional[StrictStr] = Field(default=None, description="ProjectGrantID is required to grant administrator privileges for a specific project grant.", alias="projectGrantId") + __properties: ClassVar[List[str]] = ["projectId", "projectGrantId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceProjectGrant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceProjectGrant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "projectGrantId": obj.get("projectGrantId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_resource_filter.py b/zitadel_client/models/beta_internal_permission_service_resource_filter.py new file mode 100644 index 00000000..d5b3b736 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_resource_filter.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceResourceFilter(BaseModel): + """ + BetaInternalPermissionServiceResourceFilter + """ # noqa: E501 + instance: Optional[StrictBool] = Field(default=None, description="Search for administrators granted on the instance level.") + organization_id: Optional[StrictStr] = Field(default=None, description="Search for administrators granted on a specific organization.", alias="organizationId") + project_grant_id: Optional[StrictStr] = Field(default=None, description="Search for administrators granted on a specific project grant.", alias="projectGrantId") + project_id: Optional[StrictStr] = Field(default=None, description="Search for administrators granted on a specific project.", alias="projectId") + __properties: ClassVar[List[str]] = ["instance", "organizationId", "projectGrantId", "projectId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceResourceFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceResourceFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance": obj.get("instance"), + "organizationId": obj.get("organizationId"), + "projectGrantId": obj.get("projectGrantId"), + "projectId": obj.get("projectId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_resource_type.py b/zitadel_client/models/beta_internal_permission_service_resource_type.py new file mode 100644 index 00000000..2beedbc5 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_resource_type.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_internal_permission_service_project_grant import BetaInternalPermissionServiceProjectGrant +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceResourceType(BaseModel): + """ + BetaInternalPermissionServiceResourceType + """ # noqa: E501 + instance: Optional[StrictBool] = Field(default=None, description="Instance is the resource type for granting administrator privileges on the instance level.") + organization_id: Optional[StrictStr] = Field(default=None, description="OrganizationID is required to grant administrator privileges for a specific organization.", alias="organizationId") + project_grant: Optional[BetaInternalPermissionServiceProjectGrant] = Field(default=None, alias="projectGrant") + project_id: Optional[StrictStr] = Field(default=None, description="ProjectID is required to grant administrator privileges for a specific project.", alias="projectId") + __properties: ClassVar[List[str]] = ["instance", "organizationId", "projectGrant", "projectId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceResourceType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of project_grant + if self.project_grant: + _dict['projectGrant'] = self.project_grant.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceResourceType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance": obj.get("instance"), + "organizationId": obj.get("organizationId"), + "projectGrant": BetaInternalPermissionServiceProjectGrant.from_dict(obj["projectGrant"]) if obj.get("projectGrant") is not None else None, + "projectId": obj.get("projectId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_role_filter.py b/zitadel_client/models/beta_internal_permission_service_role_filter.py new file mode 100644 index 00000000..48fcd7f8 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_role_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceRoleFilter(BaseModel): + """ + BetaInternalPermissionServiceRoleFilter + """ # noqa: E501 + role_key: Optional[StrictStr] = Field(default=None, description="Search for administrators by the granted role.", alias="roleKey") + __properties: ClassVar[List[str]] = ["roleKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceRoleFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceRoleFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "roleKey": obj.get("roleKey") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_text_filter_method.py b/zitadel_client/models/beta_internal_permission_service_text_filter_method.py new file mode 100644 index 00000000..aacf473e --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_text_filter_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInternalPermissionServiceTextFilterMethod(str, Enum): + """ + BetaInternalPermissionServiceTextFilterMethod + """ + + """ + allowed enum values + """ + TEXT_FILTER_METHOD_EQUALS = 'TEXT_FILTER_METHOD_EQUALS' + TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE = 'TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE' + TEXT_FILTER_METHOD_STARTS_WITH = 'TEXT_FILTER_METHOD_STARTS_WITH' + TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_FILTER_METHOD_CONTAINS = 'TEXT_FILTER_METHOD_CONTAINS' + TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE' + TEXT_FILTER_METHOD_ENDS_WITH = 'TEXT_FILTER_METHOD_ENDS_WITH' + TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInternalPermissionServiceTextFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_internal_permission_service_timestamp_filter.py b/zitadel_client/models/beta_internal_permission_service_timestamp_filter.py new file mode 100644 index 00000000..61c399d3 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_timestamp_filter.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_internal_permission_service_timestamp_filter_method import BetaInternalPermissionServiceTimestampFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceTimestampFilter(BaseModel): + """ + BetaInternalPermissionServiceTimestampFilter + """ # noqa: E501 + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + method: Optional[BetaInternalPermissionServiceTimestampFilterMethod] = None + __properties: ClassVar[List[str]] = ["timestamp", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceTimestampFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceTimestampFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_timestamp_filter_method.py b/zitadel_client/models/beta_internal_permission_service_timestamp_filter_method.py new file mode 100644 index 00000000..d7e401f2 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_timestamp_filter_method.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaInternalPermissionServiceTimestampFilterMethod(str, Enum): + """ + BetaInternalPermissionServiceTimestampFilterMethod + """ + + """ + allowed enum values + """ + TIMESTAMP_FILTER_METHOD_EQUALS = 'TIMESTAMP_FILTER_METHOD_EQUALS' + TIMESTAMP_FILTER_METHOD_GREATER = 'TIMESTAMP_FILTER_METHOD_GREATER' + TIMESTAMP_FILTER_METHOD_GREATER_OR_EQUALS = 'TIMESTAMP_FILTER_METHOD_GREATER_OR_EQUALS' + TIMESTAMP_FILTER_METHOD_LESS = 'TIMESTAMP_FILTER_METHOD_LESS' + TIMESTAMP_FILTER_METHOD_LESS_OR_EQUALS = 'TIMESTAMP_FILTER_METHOD_LESS_OR_EQUALS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaInternalPermissionServiceTimestampFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_internal_permission_service_update_administrator_request.py b/zitadel_client/models/beta_internal_permission_service_update_administrator_request.py new file mode 100644 index 00000000..a46c6cef --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_update_administrator_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_internal_permission_service_resource_type import BetaInternalPermissionServiceResourceType +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceUpdateAdministratorRequest(BaseModel): + """ + BetaInternalPermissionServiceUpdateAdministratorRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="UserID is the ID of the user who should have his administrator roles update.", alias="userId") + resource: Optional[BetaInternalPermissionServiceResourceType] = None + roles: Optional[List[StrictStr]] = Field(default=None, description="Roles are the roles that the user should be granted. Note that any role previously granted to the user and not present in the list will be revoked.") + __properties: ClassVar[List[str]] = ["userId", "resource", "roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUpdateAdministratorRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUpdateAdministratorRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "resource": BetaInternalPermissionServiceResourceType.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "roles": obj.get("roles") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_update_administrator_response.py b/zitadel_client/models/beta_internal_permission_service_update_administrator_response.py new file mode 100644 index 00000000..81e23a6f --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_update_administrator_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceUpdateAdministratorResponse(BaseModel): + """ + BetaInternalPermissionServiceUpdateAdministratorResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUpdateAdministratorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUpdateAdministratorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_user.py b/zitadel_client/models/beta_internal_permission_service_user.py new file mode 100644 index 00000000..f4559b09 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_user.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceUser(BaseModel): + """ + BetaInternalPermissionServiceUser + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID is the unique identifier of the user.") + preferred_login_name: Optional[StrictStr] = Field(default=None, description="PreferredLoginName is the preferred login name of the user. This value is unique across the whole instance.", alias="preferredLoginName") + display_name: Optional[StrictStr] = Field(default=None, description="DisplayName is the public display name of the user. By default it's the user's given name and family name, their username or their email address.", alias="displayName") + organization_id: Optional[StrictStr] = Field(default=None, description="The organization the user belong to.", alias="organizationId") + __properties: ClassVar[List[str]] = ["id", "preferredLoginName", "displayName", "organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "preferredLoginName": obj.get("preferredLoginName"), + "displayName": obj.get("displayName"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_user_display_name_filter.py b/zitadel_client/models/beta_internal_permission_service_user_display_name_filter.py new file mode 100644 index 00000000..7645cc94 --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_user_display_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_internal_permission_service_text_filter_method import BetaInternalPermissionServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceUserDisplayNameFilter(BaseModel): + """ + BetaInternalPermissionServiceUserDisplayNameFilter + """ # noqa: E501 + display_name: Optional[StrictStr] = Field(default=None, description="Search for administrators by the display name of the user.", alias="displayName") + method: Optional[BetaInternalPermissionServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["displayName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUserDisplayNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUserDisplayNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayName": obj.get("displayName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_internal_permission_service_user_preferred_login_name_filter.py b/zitadel_client/models/beta_internal_permission_service_user_preferred_login_name_filter.py new file mode 100644 index 00000000..96e8bb3f --- /dev/null +++ b/zitadel_client/models/beta_internal_permission_service_user_preferred_login_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_internal_permission_service_text_filter_method import BetaInternalPermissionServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaInternalPermissionServiceUserPreferredLoginNameFilter(BaseModel): + """ + BetaInternalPermissionServiceUserPreferredLoginNameFilter + """ # noqa: E501 + preferred_login_name: Optional[StrictStr] = Field(default=None, description="Search for administrators by the preferred login name of the user.", alias="preferredLoginName") + method: Optional[BetaInternalPermissionServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["preferredLoginName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUserPreferredLoginNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaInternalPermissionServiceUserPreferredLoginNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "preferredLoginName": obj.get("preferredLoginName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_any.py b/zitadel_client/models/beta_oidc_service_any.py new file mode 100644 index 00000000..8619bdbb --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_auth_request.py b/zitadel_client/models/beta_oidc_service_auth_request.py new file mode 100644 index 00000000..b7efe66e --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_auth_request.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_oidc_service_prompt import BetaOIDCServicePrompt +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceAuthRequest(BaseModel): + """ + BetaOIDCServiceAuthRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + scope: Optional[List[StrictStr]] = None + redirect_uri: Optional[StrictStr] = Field(default=None, alias="redirectUri") + prompt: Optional[List[BetaOIDCServicePrompt]] = None + ui_locales: Optional[List[StrictStr]] = Field(default=None, alias="uiLocales") + login_hint: Optional[StrictStr] = Field(default=None, alias="loginHint") + max_age: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="maxAge") + hint_user_id: Optional[StrictStr] = Field(default=None, alias="hintUserId") + __properties: ClassVar[List[str]] = ["id", "creationDate", "clientId", "scope", "redirectUri", "prompt", "uiLocales", "loginHint", "maxAge", "hintUserId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if login_hint (nullable) is None + # and model_fields_set contains the field + if self.login_hint is None and "login_hint" in self.model_fields_set: + _dict['loginHint'] = None + + # set to None if hint_user_id (nullable) is None + # and model_fields_set contains the field + if self.hint_user_id is None and "hint_user_id" in self.model_fields_set: + _dict['hintUserId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "clientId": obj.get("clientId"), + "scope": obj.get("scope"), + "redirectUri": obj.get("redirectUri"), + "prompt": obj.get("prompt"), + "uiLocales": obj.get("uiLocales"), + "loginHint": obj.get("loginHint"), + "maxAge": obj.get("maxAge"), + "hintUserId": obj.get("hintUserId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_authorization_error.py b/zitadel_client/models/beta_oidc_service_authorization_error.py new file mode 100644 index 00000000..6c7f3005 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_authorization_error.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_error_reason import BetaOIDCServiceErrorReason +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceAuthorizationError(BaseModel): + """ + BetaOIDCServiceAuthorizationError + """ # noqa: E501 + error: Optional[BetaOIDCServiceErrorReason] = None + error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") + error_uri: Optional[StrictStr] = Field(default=None, alias="errorUri") + __properties: ClassVar[List[str]] = ["error", "errorDescription", "errorUri"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthorizationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if error_description (nullable) is None + # and model_fields_set contains the field + if self.error_description is None and "error_description" in self.model_fields_set: + _dict['errorDescription'] = None + + # set to None if error_uri (nullable) is None + # and model_fields_set contains the field + if self.error_uri is None and "error_uri" in self.model_fields_set: + _dict['errorUri'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceAuthorizationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorDescription": obj.get("errorDescription"), + "errorUri": obj.get("errorUri") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_connect_error.py b/zitadel_client/models/beta_oidc_service_connect_error.py new file mode 100644 index 00000000..e2b3dfa0 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_oidc_service_any import BetaOIDCServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaOIDCServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaOIDCServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_create_callback_request.py b/zitadel_client/models/beta_oidc_service_create_callback_request.py new file mode 100644 index 00000000..b2f71404 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_create_callback_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_authorization_error import BetaOIDCServiceAuthorizationError +from zitadel_client.models.beta_oidc_service_session import BetaOIDCServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceCreateCallbackRequest(BaseModel): + """ + BetaOIDCServiceCreateCallbackRequest + """ # noqa: E501 + auth_request_id: Optional[StrictStr] = Field(default=None, alias="authRequestId") + error: Optional[BetaOIDCServiceAuthorizationError] = None + session: Optional[BetaOIDCServiceSession] = None + __properties: ClassVar[List[str]] = ["authRequestId", "error", "session"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceCreateCallbackRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceCreateCallbackRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authRequestId": obj.get("authRequestId"), + "error": BetaOIDCServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None, + "session": BetaOIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_create_callback_response.py b/zitadel_client/models/beta_oidc_service_create_callback_response.py new file mode 100644 index 00000000..958c88c5 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_create_callback_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_details import BetaOIDCServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceCreateCallbackResponse(BaseModel): + """ + BetaOIDCServiceCreateCallbackResponse + """ # noqa: E501 + details: Optional[BetaOIDCServiceDetails] = None + callback_url: Optional[StrictStr] = Field(default=None, alias="callbackUrl") + __properties: ClassVar[List[str]] = ["details", "callbackUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceCreateCallbackResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceCreateCallbackResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaOIDCServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "callbackUrl": obj.get("callbackUrl") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_details.py b/zitadel_client/models/beta_oidc_service_details.py new file mode 100644 index 00000000..cc4b4b68 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceDetails(BaseModel): + """ + BetaOIDCServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_error_reason.py b/zitadel_client/models/beta_oidc_service_error_reason.py new file mode 100644 index 00000000..255eaa12 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_error_reason.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOIDCServiceErrorReason(str, Enum): + """ + BetaOIDCServiceErrorReason + """ + + """ + allowed enum values + """ + ERROR_REASON_UNSPECIFIED = 'ERROR_REASON_UNSPECIFIED' + ERROR_REASON_INVALID_REQUEST = 'ERROR_REASON_INVALID_REQUEST' + ERROR_REASON_UNAUTHORIZED_CLIENT = 'ERROR_REASON_UNAUTHORIZED_CLIENT' + ERROR_REASON_ACCESS_DENIED = 'ERROR_REASON_ACCESS_DENIED' + ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE = 'ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE' + ERROR_REASON_INVALID_SCOPE = 'ERROR_REASON_INVALID_SCOPE' + ERROR_REASON_SERVER_ERROR = 'ERROR_REASON_SERVER_ERROR' + ERROR_REASON_TEMPORARY_UNAVAILABLE = 'ERROR_REASON_TEMPORARY_UNAVAILABLE' + ERROR_REASON_INTERACTION_REQUIRED = 'ERROR_REASON_INTERACTION_REQUIRED' + ERROR_REASON_LOGIN_REQUIRED = 'ERROR_REASON_LOGIN_REQUIRED' + ERROR_REASON_ACCOUNT_SELECTION_REQUIRED = 'ERROR_REASON_ACCOUNT_SELECTION_REQUIRED' + ERROR_REASON_CONSENT_REQUIRED = 'ERROR_REASON_CONSENT_REQUIRED' + ERROR_REASON_INVALID_REQUEST_URI = 'ERROR_REASON_INVALID_REQUEST_URI' + ERROR_REASON_INVALID_REQUEST_OBJECT = 'ERROR_REASON_INVALID_REQUEST_OBJECT' + ERROR_REASON_REQUEST_NOT_SUPPORTED = 'ERROR_REASON_REQUEST_NOT_SUPPORTED' + ERROR_REASON_REQUEST_URI_NOT_SUPPORTED = 'ERROR_REASON_REQUEST_URI_NOT_SUPPORTED' + ERROR_REASON_REGISTRATION_NOT_SUPPORTED = 'ERROR_REASON_REGISTRATION_NOT_SUPPORTED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOIDCServiceErrorReason from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_oidc_service_get_auth_request_request.py b/zitadel_client/models/beta_oidc_service_get_auth_request_request.py new file mode 100644 index 00000000..3bad227b --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_get_auth_request_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceGetAuthRequestRequest(BaseModel): + """ + BetaOIDCServiceGetAuthRequestRequest + """ # noqa: E501 + auth_request_id: Optional[StrictStr] = Field(default=None, alias="authRequestId") + __properties: ClassVar[List[str]] = ["authRequestId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authRequestId": obj.get("authRequestId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_get_auth_request_response.py b/zitadel_client/models/beta_oidc_service_get_auth_request_response.py new file mode 100644 index 00000000..fa3b81b6 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_get_auth_request_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_oidc_service_auth_request import BetaOIDCServiceAuthRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaOIDCServiceGetAuthRequestResponse(BaseModel): + """ + BetaOIDCServiceGetAuthRequestResponse + """ # noqa: E501 + auth_request: Optional[BetaOIDCServiceAuthRequest] = Field(default=None, alias="authRequest") + __properties: ClassVar[List[str]] = ["authRequest"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of auth_request + if self.auth_request: + _dict['authRequest'] = self.auth_request.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOIDCServiceGetAuthRequestResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authRequest": BetaOIDCServiceAuthRequest.from_dict(obj["authRequest"]) if obj.get("authRequest") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_oidc_service_prompt.py b/zitadel_client/models/beta_oidc_service_prompt.py new file mode 100644 index 00000000..62841f86 --- /dev/null +++ b/zitadel_client/models/beta_oidc_service_prompt.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOIDCServicePrompt(str, Enum): + """ + BetaOIDCServicePrompt + """ + + """ + allowed enum values + """ + PROMPT_UNSPECIFIED = 'PROMPT_UNSPECIFIED' + PROMPT_NONE = 'PROMPT_NONE' + PROMPT_LOGIN = 'PROMPT_LOGIN' + PROMPT_CONSENT = 'PROMPT_CONSENT' + PROMPT_SELECT_ACCOUNT = 'PROMPT_SELECT_ACCOUNT' + PROMPT_CREATE = 'PROMPT_CREATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOIDCServicePrompt from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/user_service_protobuf_any.py b/zitadel_client/models/beta_oidc_service_session.py similarity index 79% rename from zitadel_client/models/user_service_protobuf_any.py rename to zitadel_client/models/beta_oidc_service_session.py index 31027872..f64934c5 100644 --- a/zitadel_client/models/user_service_protobuf_any.py +++ b/zitadel_client/models/beta_oidc_service_session.py @@ -18,15 +18,17 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class UserServiceProtobufAny(BaseModel): +class BetaOIDCServiceSession(BaseModel): """ - UserServiceProtobufAny + BetaOIDCServiceSession """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceProtobufAny from a JSON string""" + """Create an instance of BetaOIDCServiceSession from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceProtobufAny from a dict""" + """Create an instance of BetaOIDCServiceSession from a dict""" if obj is None: return None @@ -79,7 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") }) return _obj diff --git a/zitadel_client/models/beta_organization_service_activate_organization_request.py b/zitadel_client/models/beta_organization_service_activate_organization_request.py new file mode 100644 index 00000000..6460154d --- /dev/null +++ b/zitadel_client/models/beta_organization_service_activate_organization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceActivateOrganizationRequest(BaseModel): + """ + BetaOrganizationServiceActivateOrganizationRequest + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Organization Id for the Organization to be activated") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceActivateOrganizationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceActivateOrganizationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_activate_organization_response.py b/zitadel_client/models/beta_organization_service_activate_organization_response.py new file mode 100644 index 00000000..99451a45 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_activate_organization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceActivateOrganizationResponse(BaseModel): + """ + BetaOrganizationServiceActivateOrganizationResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceActivateOrganizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceActivateOrganizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_add_human_user_request.py b/zitadel_client/models/beta_organization_service_add_human_user_request.py new file mode 100644 index 00000000..8994899a --- /dev/null +++ b/zitadel_client/models/beta_organization_service_add_human_user_request.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_hashed_password import BetaOrganizationServiceHashedPassword +from zitadel_client.models.beta_organization_service_idp_link import BetaOrganizationServiceIDPLink +from zitadel_client.models.beta_organization_service_organization import BetaOrganizationServiceOrganization +from zitadel_client.models.beta_organization_service_password import BetaOrganizationServicePassword +from zitadel_client.models.beta_organization_service_set_human_email import BetaOrganizationServiceSetHumanEmail +from zitadel_client.models.beta_organization_service_set_human_phone import BetaOrganizationServiceSetHumanPhone +from zitadel_client.models.beta_organization_service_set_human_profile import BetaOrganizationServiceSetHumanProfile +from zitadel_client.models.beta_organization_service_set_metadata_entry import BetaOrganizationServiceSetMetadataEntry +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceAddHumanUserRequest(BaseModel): + """ + BetaOrganizationServiceAddHumanUserRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") + username: Optional[StrictStr] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") + organization: Optional[BetaOrganizationServiceOrganization] = None + profile: BetaOrganizationServiceSetHumanProfile + email: BetaOrganizationServiceSetHumanEmail + phone: Optional[BetaOrganizationServiceSetHumanPhone] = None + metadata: Optional[List[BetaOrganizationServiceSetMetadataEntry]] = None + idp_links: Optional[List[BetaOrganizationServiceIDPLink]] = Field(default=None, alias="idpLinks") + totp_secret: Optional[StrictStr] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + hashed_password: Optional[BetaOrganizationServiceHashedPassword] = Field(default=None, alias="hashedPassword") + password: Optional[BetaOrganizationServicePassword] = None + __properties: ClassVar[List[str]] = ["userId", "username", "organization", "profile", "email", "phone", "metadata", "idpLinks", "totpSecret", "hashedPassword", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddHumanUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization + if self.organization: + _dict['organization'] = self.organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in idp_links (list) + _items = [] + if self.idp_links: + for _item_idp_links in self.idp_links: + if _item_idp_links: + _items.append(_item_idp_links.to_dict()) + _dict['idpLinks'] = _items + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if totp_secret (nullable) is None + # and model_fields_set contains the field + if self.totp_secret is None and "totp_secret" in self.model_fields_set: + _dict['totpSecret'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddHumanUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "username": obj.get("username"), + "organization": BetaOrganizationServiceOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "profile": BetaOrganizationServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "email": BetaOrganizationServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "phone": BetaOrganizationServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "metadata": [BetaOrganizationServiceSetMetadataEntry.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, + "idpLinks": [BetaOrganizationServiceIDPLink.from_dict(_item) for _item in obj["idpLinks"]] if obj.get("idpLinks") is not None else None, + "totpSecret": obj.get("totpSecret"), + "hashedPassword": BetaOrganizationServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, + "password": BetaOrganizationServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_add_organization_domain_request.py b/zitadel_client/models/beta_organization_service_add_organization_domain_request.py new file mode 100644 index 00000000..245024b5 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_add_organization_domain_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceAddOrganizationDomainRequest(BaseModel): + """ + BetaOrganizationServiceAddOrganizationDomainRequest + """ # noqa: E501 + organization_id: StrictStr = Field(description="Organization Id for the Organization for which the domain is to be added to.", alias="organizationId") + domain: StrictStr = Field(description="The domain you want to add to the organization.") + __properties: ClassVar[List[str]] = ["organizationId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddOrganizationDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddOrganizationDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_add_organization_domain_response.py b/zitadel_client/models/beta_organization_service_add_organization_domain_response.py new file mode 100644 index 00000000..28108240 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_add_organization_domain_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceAddOrganizationDomainResponse(BaseModel): + """ + BetaOrganizationServiceAddOrganizationDomainResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddOrganizationDomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAddOrganizationDomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_rpc_status.py b/zitadel_client/models/beta_organization_service_admin.py similarity index 68% rename from zitadel_client/models/organization_service_rpc_status.py rename to zitadel_client/models/beta_organization_service_admin.py index d1da0b9a..5c96b776 100644 --- a/zitadel_client/models/organization_service_rpc_status.py +++ b/zitadel_client/models/beta_organization_service_admin.py @@ -17,19 +17,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.organization_service_protobuf_any import OrganizationServiceProtobufAny +from zitadel_client.models.beta_organization_service_add_human_user_request import BetaOrganizationServiceAddHumanUserRequest from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceRpcStatus(BaseModel): +class BetaOrganizationServiceAdmin(BaseModel): """ - OrganizationServiceRpcStatus + The Admin for the newly created Organization. """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[OrganizationServiceProtobufAny]] = None + roles: Optional[List[StrictStr]] = Field(default=None, description="specify Organization Member Roles for the provided user (default is ORG_OWNER if roles are empty)") + human: Optional[BetaOrganizationServiceAddHumanUserRequest] = None + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["roles", "human", "userId"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceRpcStatus from a JSON string""" + """Create an instance of BetaOrganizationServiceAdmin from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +71,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceRpcStatus from a dict""" + """Create an instance of BetaOrganizationServiceAdmin from a dict""" if obj is None: return None @@ -89,9 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [OrganizationServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "roles": obj.get("roles"), + "human": BetaOrganizationServiceAddHumanUserRequest.from_dict(obj["human"]) if obj.get("human") is not None else None, + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/beta_organization_service_any.py b/zitadel_client/models/beta_organization_service_any.py new file mode 100644 index 00000000..eef5218e --- /dev/null +++ b/zitadel_client/models/beta_organization_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_assigned_admin.py b/zitadel_client/models/beta_organization_service_assigned_admin.py new file mode 100644 index 00000000..05f54d82 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_assigned_admin.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceAssignedAdmin(BaseModel): + """ + BetaOrganizationServiceAssignedAdmin + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAssignedAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceAssignedAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_connect_error.py b/zitadel_client/models/beta_organization_service_connect_error.py new file mode 100644 index 00000000..c98c4ebf --- /dev/null +++ b/zitadel_client/models/beta_organization_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_any import BetaOrganizationServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaOrganizationServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaOrganizationServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_create_organization_request.py b/zitadel_client/models/beta_organization_service_create_organization_request.py new file mode 100644 index 00000000..20d639fc --- /dev/null +++ b/zitadel_client/models/beta_organization_service_create_organization_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_admin import BetaOrganizationServiceAdmin +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceCreateOrganizationRequest(BaseModel): + """ + BetaOrganizationServiceCreateOrganizationRequest + """ # noqa: E501 + name: StrictStr = Field(description="name of the Organization to be created.") + id: Optional[StrictStr] = Field(default=None, description="Optionally set your own id unique for the organization.") + admins: Optional[List[BetaOrganizationServiceAdmin]] = Field(default=None, description="Additional Admins for the Organization.") + __properties: ClassVar[List[str]] = ["name", "id", "admins"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreateOrganizationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in admins (list) + _items = [] + if self.admins: + for _item_admins in self.admins: + if _item_admins: + _items.append(_item_admins.to_dict()) + _dict['admins'] = _items + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreateOrganizationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "id": obj.get("id"), + "admins": [BetaOrganizationServiceAdmin.from_dict(_item) for _item in obj["admins"]] if obj.get("admins") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_create_organization_response.py b/zitadel_client/models/beta_organization_service_create_organization_response.py new file mode 100644 index 00000000..ca6e822c --- /dev/null +++ b/zitadel_client/models/beta_organization_service_create_organization_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_organization_admin import BetaOrganizationServiceOrganizationAdmin +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceCreateOrganizationResponse(BaseModel): + """ + BetaOrganizationServiceCreateOrganizationResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + id: StrictStr = Field(description="Organization ID of the newly created organization.") + organization_admins: Optional[List[BetaOrganizationServiceOrganizationAdmin]] = Field(default=None, description="The admins created/assigned for the Organization", alias="organizationAdmins") + __properties: ClassVar[List[str]] = ["creationDate", "id", "organizationAdmins"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreateOrganizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in organization_admins (list) + _items = [] + if self.organization_admins: + for _item_organization_admins in self.organization_admins: + if _item_organization_admins: + _items.append(_item_organization_admins.to_dict()) + _dict['organizationAdmins'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreateOrganizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "id": obj.get("id"), + "organizationAdmins": [BetaOrganizationServiceOrganizationAdmin.from_dict(_item) for _item in obj["organizationAdmins"]] if obj.get("organizationAdmins") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_created_admin.py b/zitadel_client/models/beta_organization_service_created_admin.py new file mode 100644 index 00000000..38fb3f5e --- /dev/null +++ b/zitadel_client/models/beta_organization_service_created_admin.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceCreatedAdmin(BaseModel): + """ + BetaOrganizationServiceCreatedAdmin + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + __properties: ClassVar[List[str]] = ["userId", "emailCode", "phoneCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreatedAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceCreatedAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_deactivate_organization_request.py b/zitadel_client/models/beta_organization_service_deactivate_organization_request.py new file mode 100644 index 00000000..54ba535e --- /dev/null +++ b/zitadel_client/models/beta_organization_service_deactivate_organization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDeactivateOrganizationRequest(BaseModel): + """ + BetaOrganizationServiceDeactivateOrganizationRequest + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Organization Id for the Organization to be deactivated") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeactivateOrganizationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeactivateOrganizationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_deactivate_organization_response.py b/zitadel_client/models/beta_organization_service_deactivate_organization_response.py new file mode 100644 index 00000000..841ea36d --- /dev/null +++ b/zitadel_client/models/beta_organization_service_deactivate_organization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDeactivateOrganizationResponse(BaseModel): + """ + BetaOrganizationServiceDeactivateOrganizationResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeactivateOrganizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeactivateOrganizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_delete_organization_domain_request.py b/zitadel_client/models/beta_organization_service_delete_organization_domain_request.py new file mode 100644 index 00000000..d63f3743 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_delete_organization_domain_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDeleteOrganizationDomainRequest(BaseModel): + """ + BetaOrganizationServiceDeleteOrganizationDomainRequest + """ # noqa: E501 + organization_id: StrictStr = Field(description="Organization Id for the Organization which domain is to be deleted.", alias="organizationId") + domain: StrictStr + __properties: ClassVar[List[str]] = ["organizationId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_delete_organization_domain_response.py b/zitadel_client/models/beta_organization_service_delete_organization_domain_response.py new file mode 100644 index 00000000..a0feec4f --- /dev/null +++ b/zitadel_client/models/beta_organization_service_delete_organization_domain_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDeleteOrganizationDomainResponse(BaseModel): + """ + BetaOrganizationServiceDeleteOrganizationDomainResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationDomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationDomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_pagination_response.py b/zitadel_client/models/beta_organization_service_delete_organization_metadata_request.py similarity index 74% rename from zitadel_client/models/action_service_beta_pagination_response.py rename to zitadel_client/models/beta_organization_service_delete_organization_metadata_request.py index ffc0b972..5ad9725a 100644 --- a/zitadel_client/models/action_service_beta_pagination_response.py +++ b/zitadel_client/models/beta_organization_service_delete_organization_metadata_request.py @@ -22,12 +22,13 @@ from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaPaginationResponse(BaseModel): +class BetaOrganizationServiceDeleteOrganizationMetadataRequest(BaseModel): """ - ActionServiceBetaPaginationResponse + BetaOrganizationServiceDeleteOrganizationMetadataRequest """ # noqa: E501 - total_result: Optional[StrictStr] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") - applied_limit: Optional[StrictStr] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + organization_id: StrictStr = Field(description="Organization ID of Orgalization which metadata is to be deleted is stored on.", alias="organizationId") + keys: Optional[List[StrictStr]] = Field(default=None, description="The keys for the Organization metadata to be deleted.") + __properties: ClassVar[List[str]] = ["organizationId", "keys"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationResponse from a JSON string""" + """Create an instance of BetaOrganizationServiceDeleteOrganizationMetadataRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaPaginationResponse from a dict""" + """Create an instance of BetaOrganizationServiceDeleteOrganizationMetadataRequest from a dict""" if obj is None: return None @@ -80,8 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "totalResult": obj.get("totalResult"), - "appliedLimit": obj.get("appliedLimit") + "organizationId": obj.get("organizationId"), + "keys": obj.get("keys") }) return _obj diff --git a/zitadel_client/models/beta_organization_service_delete_organization_metadata_response.py b/zitadel_client/models/beta_organization_service_delete_organization_metadata_response.py new file mode 100644 index 00000000..41bb2f0c --- /dev/null +++ b/zitadel_client/models/beta_organization_service_delete_organization_metadata_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDeleteOrganizationMetadataResponse(BaseModel): + """ + BetaOrganizationServiceDeleteOrganizationMetadataResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_delete_organization_request.py b/zitadel_client/models/beta_organization_service_delete_organization_request.py new file mode 100644 index 00000000..fc4ba5ac --- /dev/null +++ b/zitadel_client/models/beta_organization_service_delete_organization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDeleteOrganizationRequest(BaseModel): + """ + BetaOrganizationServiceDeleteOrganizationRequest + """ # noqa: E501 + id: StrictStr = Field(description="Organization Id for the Organization to be deleted") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_delete_organization_response.py b/zitadel_client/models/beta_organization_service_delete_organization_response.py new file mode 100644 index 00000000..644309bc --- /dev/null +++ b/zitadel_client/models/beta_organization_service_delete_organization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDeleteOrganizationResponse(BaseModel): + """ + BetaOrganizationServiceDeleteOrganizationResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDeleteOrganizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_domain.py b/zitadel_client/models/beta_organization_service_domain.py new file mode 100644 index 00000000..a80f6596 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_domain.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_domain_validation_type import BetaOrganizationServiceDomainValidationType +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDomain(BaseModel): + """ + from proto/zitadel/org.proto + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, description="The Organization id.", alias="organizationId") + domain_name: Optional[StrictStr] = Field(default=None, description="The domain name.", alias="domainName") + is_verified: Optional[StrictBool] = Field(default=None, description="Defines if the domain is verified.", alias="isVerified") + is_primary: Optional[StrictBool] = Field(default=None, description="Defines if the domain is the primary domain.", alias="isPrimary") + validation_type: Optional[BetaOrganizationServiceDomainValidationType] = Field(default=None, alias="validationType") + __properties: ClassVar[List[str]] = ["organizationId", "domainName", "isVerified", "isPrimary", "validationType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDomain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDomain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "domainName": obj.get("domainName"), + "isVerified": obj.get("isVerified"), + "isPrimary": obj.get("isPrimary"), + "validationType": obj.get("validationType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_domain_name_filter.py b/zitadel_client/models/beta_organization_service_domain_name_filter.py new file mode 100644 index 00000000..909afdf7 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_domain_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_text_query_method import BetaOrganizationServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDomainNameFilter(BaseModel): + """ + from proto/zitadel/org.proto + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The domain.") + method: Optional[BetaOrganizationServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["name", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDomainNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDomainNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_domain_search_filter.py b/zitadel_client/models/beta_organization_service_domain_search_filter.py new file mode 100644 index 00000000..c6581bf4 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_domain_search_filter.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_domain_name_filter import BetaOrganizationServiceDomainNameFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceDomainSearchFilter(BaseModel): + """ + from proto/zitadel/org.proto + """ # noqa: E501 + domain_name_filter: Optional[BetaOrganizationServiceDomainNameFilter] = Field(default=None, alias="domainNameFilter") + __properties: ClassVar[List[str]] = ["domainNameFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDomainSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_name_filter + if self.domain_name_filter: + _dict['domainNameFilter'] = self.domain_name_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceDomainSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainNameFilter": BetaOrganizationServiceDomainNameFilter.from_dict(obj["domainNameFilter"]) if obj.get("domainNameFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_domain_validation_type.py b/zitadel_client/models/beta_organization_service_domain_validation_type.py new file mode 100644 index 00000000..0024cd91 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_domain_validation_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOrganizationServiceDomainValidationType(str, Enum): + """ + from proto/zitadel/org.proto + """ + + """ + allowed enum values + """ + DOMAIN_VALIDATION_TYPE_UNSPECIFIED = 'DOMAIN_VALIDATION_TYPE_UNSPECIFIED' + DOMAIN_VALIDATION_TYPE_HTTP = 'DOMAIN_VALIDATION_TYPE_HTTP' + DOMAIN_VALIDATION_TYPE_DNS = 'DOMAIN_VALIDATION_TYPE_DNS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOrganizationServiceDomainValidationType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_organization_service_gender.py b/zitadel_client/models/beta_organization_service_gender.py new file mode 100644 index 00000000..32d9fa4e --- /dev/null +++ b/zitadel_client/models/beta_organization_service_gender.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOrganizationServiceGender(str, Enum): + """ + BetaOrganizationServiceGender + """ + + """ + allowed enum values + """ + GENDER_UNSPECIFIED = 'GENDER_UNSPECIFIED' + GENDER_FEMALE = 'GENDER_FEMALE' + GENDER_MALE = 'GENDER_MALE' + GENDER_DIVERSE = 'GENDER_DIVERSE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOrganizationServiceGender from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_organization_service_generate_organization_domain_validation_request.py b/zitadel_client/models/beta_organization_service_generate_organization_domain_validation_request.py new file mode 100644 index 00000000..bec34bca --- /dev/null +++ b/zitadel_client/models/beta_organization_service_generate_organization_domain_validation_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_domain_validation_type import BetaOrganizationServiceDomainValidationType +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceGenerateOrganizationDomainValidationRequest(BaseModel): + """ + BetaOrganizationServiceGenerateOrganizationDomainValidationRequest + """ # noqa: E501 + organization_id: StrictStr = Field(description="Organization Id for the Organization which doman to be validated.", alias="organizationId") + domain: StrictStr = Field(description="The domain which to be deleted.") + type: Optional[BetaOrganizationServiceDomainValidationType] = None + __properties: ClassVar[List[str]] = ["organizationId", "domain", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceGenerateOrganizationDomainValidationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceGenerateOrganizationDomainValidationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "domain": obj.get("domain"), + "type": obj.get("type") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_generate_organization_domain_validation_response.py b/zitadel_client/models/beta_organization_service_generate_organization_domain_validation_response.py new file mode 100644 index 00000000..1376a6c4 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_generate_organization_domain_validation_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceGenerateOrganizationDomainValidationResponse(BaseModel): + """ + BetaOrganizationServiceGenerateOrganizationDomainValidationResponse + """ # noqa: E501 + token: Optional[StrictStr] = Field(default=None, description="The token verify domain.") + url: Optional[StrictStr] = Field(default=None, description="URL used to verify the domain.") + __properties: ClassVar[List[str]] = ["token", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceGenerateOrganizationDomainValidationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceGenerateOrganizationDomainValidationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "url": obj.get("url") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_hashed_password.py b/zitadel_client/models/beta_organization_service_hashed_password.py new file mode 100644 index 00000000..1b056350 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_hashed_password.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceHashedPassword(BaseModel): + """ + BetaOrganizationServiceHashedPassword + """ # noqa: E501 + hash: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["hash", "changeRequired"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceHashedPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceHashedPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_add_organization_response_created_admin.py b/zitadel_client/models/beta_organization_service_idp_link.py similarity index 78% rename from zitadel_client/models/organization_service_add_organization_response_created_admin.py rename to zitadel_client/models/beta_organization_service_idp_link.py index bb2a7eee..f6efadfa 100644 --- a/zitadel_client/models/organization_service_add_organization_response_created_admin.py +++ b/zitadel_client/models/beta_organization_service_idp_link.py @@ -18,17 +18,18 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceAddOrganizationResponseCreatedAdmin(BaseModel): +class BetaOrganizationServiceIDPLink(BaseModel): """ - OrganizationServiceAddOrganizationResponseCreatedAdmin + BetaOrganizationServiceIDPLink """ # noqa: E501 + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") user_id: Optional[StrictStr] = Field(default=None, alias="userId") - email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") - phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationResponseCreatedAdmin from a JSON string""" + """Create an instance of BetaOrganizationServiceIDPLink from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationResponseCreatedAdmin from a dict""" + """Create an instance of BetaOrganizationServiceIDPLink from a dict""" if obj is None: return None @@ -81,9 +82,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "idpId": obj.get("idpId"), "userId": obj.get("userId"), - "emailCode": obj.get("emailCode"), - "phoneCode": obj.get("phoneCode") + "userName": obj.get("userName") }) return _obj diff --git a/zitadel_client/models/beta_organization_service_list_organization_domains_request.py b/zitadel_client/models/beta_organization_service_list_organization_domains_request.py new file mode 100644 index 00000000..646ee82a --- /dev/null +++ b/zitadel_client/models/beta_organization_service_list_organization_domains_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_domain_search_filter import BetaOrganizationServiceDomainSearchFilter +from zitadel_client.models.beta_organization_service_pagination_request import BetaOrganizationServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceListOrganizationDomainsRequest(BaseModel): + """ + BetaOrganizationServiceListOrganizationDomainsRequest + """ # noqa: E501 + organization_id: StrictStr = Field(description="Organization Id for the Organization which domains are to be listed.", alias="organizationId") + pagination: Optional[BetaOrganizationServicePaginationRequest] = None + filters: Optional[List[BetaOrganizationServiceDomainSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["organizationId", "pagination", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationDomainsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationDomainsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "pagination": BetaOrganizationServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "filters": [BetaOrganizationServiceDomainSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_list_organization_domains_response.py b/zitadel_client/models/beta_organization_service_list_organization_domains_response.py new file mode 100644 index 00000000..53f3677e --- /dev/null +++ b/zitadel_client/models/beta_organization_service_list_organization_domains_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_domain import BetaOrganizationServiceDomain +from zitadel_client.models.beta_organization_service_pagination_response import BetaOrganizationServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceListOrganizationDomainsResponse(BaseModel): + """ + BetaOrganizationServiceListOrganizationDomainsResponse + """ # noqa: E501 + pagination: Optional[BetaOrganizationServicePaginationResponse] = None + domains: Optional[List[BetaOrganizationServiceDomain]] = Field(default=None, description="The domains requested.") + __properties: ClassVar[List[str]] = ["pagination", "domains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationDomainsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in domains (list) + _items = [] + if self.domains: + for _item_domains in self.domains: + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationDomainsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaOrganizationServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "domains": [BetaOrganizationServiceDomain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_list_organization_metadata_request.py b/zitadel_client/models/beta_organization_service_list_organization_metadata_request.py new file mode 100644 index 00000000..993b1b7b --- /dev/null +++ b/zitadel_client/models/beta_organization_service_list_organization_metadata_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_metadata_query import BetaOrganizationServiceMetadataQuery +from zitadel_client.models.beta_organization_service_pagination_request import BetaOrganizationServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceListOrganizationMetadataRequest(BaseModel): + """ + BetaOrganizationServiceListOrganizationMetadataRequest + """ # noqa: E501 + organization_id: StrictStr = Field(description="Organization ID of Orgalization which metadata is to be listed.", alias="organizationId") + pagination: Optional[BetaOrganizationServicePaginationRequest] = None + filter: Optional[List[BetaOrganizationServiceMetadataQuery]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["organizationId", "pagination", "filter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationMetadataRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filter (list) + _items = [] + if self.filter: + for _item_filter in self.filter: + if _item_filter: + _items.append(_item_filter.to_dict()) + _dict['filter'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationMetadataRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "pagination": BetaOrganizationServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "filter": [BetaOrganizationServiceMetadataQuery.from_dict(_item) for _item in obj["filter"]] if obj.get("filter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_list_organization_metadata_response.py b/zitadel_client/models/beta_organization_service_list_organization_metadata_response.py new file mode 100644 index 00000000..23eb3215 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_list_organization_metadata_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_metadata import BetaOrganizationServiceMetadata +from zitadel_client.models.beta_organization_service_pagination_response import BetaOrganizationServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceListOrganizationMetadataResponse(BaseModel): + """ + BetaOrganizationServiceListOrganizationMetadataResponse + """ # noqa: E501 + pagination: Optional[BetaOrganizationServicePaginationResponse] = None + metadata: Optional[List[BetaOrganizationServiceMetadata]] = Field(default=None, description="The Organization metadata requested.") + __properties: ClassVar[List[str]] = ["pagination", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaOrganizationServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "metadata": [BetaOrganizationServiceMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_list_organizations_request.py b/zitadel_client/models/beta_organization_service_list_organizations_request.py new file mode 100644 index 00000000..6458072f --- /dev/null +++ b/zitadel_client/models/beta_organization_service_list_organizations_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_org_field_name import BetaOrganizationServiceOrgFieldName +from zitadel_client.models.beta_organization_service_organization_search_filter import BetaOrganizationServiceOrganizationSearchFilter +from zitadel_client.models.beta_organization_service_pagination_request import BetaOrganizationServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceListOrganizationsRequest(BaseModel): + """ + BetaOrganizationServiceListOrganizationsRequest + """ # noqa: E501 + pagination: Optional[BetaOrganizationServicePaginationRequest] = None + sorting_column: Optional[BetaOrganizationServiceOrgFieldName] = Field(default=None, alias="sortingColumn") + filter: Optional[List[BetaOrganizationServiceOrganizationSearchFilter]] = Field(default=None, description="Define the criteria to query for. repeated ProjectRoleQuery filters = 4;") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filter (list) + _items = [] + if self.filter: + for _item_filter in self.filter: + if _item_filter: + _items.append(_item_filter.to_dict()) + _dict['filter'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaOrganizationServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filter": [BetaOrganizationServiceOrganizationSearchFilter.from_dict(_item) for _item in obj["filter"]] if obj.get("filter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_list_organizations_response.py b/zitadel_client/models/beta_organization_service_list_organizations_response.py new file mode 100644 index 00000000..31d869e6 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_list_organizations_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_organization_service_organization import BetaOrganizationServiceOrganization +from zitadel_client.models.beta_organization_service_pagination_response import BetaOrganizationServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceListOrganizationsResponse(BaseModel): + """ + BetaOrganizationServiceListOrganizationsResponse + """ # noqa: E501 + pagination: Optional[BetaOrganizationServicePaginationResponse] = None + organizations: Optional[List[BetaOrganizationServiceOrganization]] = Field(default=None, description="The Organizations requested") + __properties: ClassVar[List[str]] = ["pagination", "organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) + _items = [] + if self.organizations: + for _item_organizations in self.organizations: + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceListOrganizationsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaOrganizationServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "organizations": [BetaOrganizationServiceOrganization.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_metadata.py b/zitadel_client/models/beta_organization_service_metadata.py new file mode 100644 index 00000000..ff4bd56e --- /dev/null +++ b/zitadel_client/models/beta_organization_service_metadata.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceMetadata(BaseModel): + """ + BetaOrganizationServiceMetadata + """ # noqa: E501 + key: Optional[StrictStr] = Field(default=None, description="Key in the metadata key/value pair.") + value: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="Value in the metadata key/value pair.") + __properties: ClassVar[List[str]] = ["key", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_metadata_key_query.py b/zitadel_client/models/beta_organization_service_metadata_key_query.py new file mode 100644 index 00000000..6b5e500c --- /dev/null +++ b/zitadel_client/models/beta_organization_service_metadata_key_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_text_query_method import BetaOrganizationServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceMetadataKeyQuery(BaseModel): + """ + BetaOrganizationServiceMetadataKeyQuery + """ # noqa: E501 + key: Optional[StrictStr] = None + method: Optional[BetaOrganizationServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["key", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceMetadataKeyQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceMetadataKeyQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_metadata_query.py b/zitadel_client/models/beta_organization_service_metadata_query.py new file mode 100644 index 00000000..2b914246 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_metadata_query.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_metadata_key_query import BetaOrganizationServiceMetadataKeyQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceMetadataQuery(BaseModel): + """ + BetaOrganizationServiceMetadataQuery + """ # noqa: E501 + key_query: Optional[BetaOrganizationServiceMetadataKeyQuery] = Field(default=None, alias="keyQuery") + __properties: ClassVar[List[str]] = ["keyQuery"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceMetadataQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of key_query + if self.key_query: + _dict['keyQuery'] = self.key_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceMetadataQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keyQuery": BetaOrganizationServiceMetadataKeyQuery.from_dict(obj["keyQuery"]) if obj.get("keyQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_org_domain_filter.py b/zitadel_client/models/beta_organization_service_org_domain_filter.py new file mode 100644 index 00000000..eb782457 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_org_domain_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_text_query_method import BetaOrganizationServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceOrgDomainFilter(BaseModel): + """ + BetaOrganizationServiceOrgDomainFilter + """ # noqa: E501 + domain: Optional[StrictStr] = Field(default=None, description="The domain.") + method: Optional[BetaOrganizationServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["domain", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgDomainFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgDomainFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_org_field_name.py b/zitadel_client/models/beta_organization_service_org_field_name.py new file mode 100644 index 00000000..4530059c --- /dev/null +++ b/zitadel_client/models/beta_organization_service_org_field_name.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOrganizationServiceOrgFieldName(str, Enum): + """ + BetaOrganizationServiceOrgFieldName + """ + + """ + allowed enum values + """ + ORG_FIELD_NAME_UNSPECIFIED = 'ORG_FIELD_NAME_UNSPECIFIED' + ORG_FIELD_NAME_NAME = 'ORG_FIELD_NAME_NAME' + ORG_FIELD_NAME_CREATION_DATE = 'ORG_FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOrganizationServiceOrgFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_organization_service_org_id_filter.py b/zitadel_client/models/beta_organization_service_org_id_filter.py new file mode 100644 index 00000000..d727a455 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_org_id_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceOrgIDFilter(BaseModel): + """ + BetaOrganizationServiceOrgIDFilter + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The Organization id.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgIDFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgIDFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_org_name_filter.py b/zitadel_client/models/beta_organization_service_org_name_filter.py new file mode 100644 index 00000000..d8ee78e1 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_org_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_text_query_method import BetaOrganizationServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceOrgNameFilter(BaseModel): + """ + BetaOrganizationServiceOrgNameFilter + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Organization name.") + method: Optional[BetaOrganizationServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["name", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_org_state.py b/zitadel_client/models/beta_organization_service_org_state.py new file mode 100644 index 00000000..e14936fc --- /dev/null +++ b/zitadel_client/models/beta_organization_service_org_state.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOrganizationServiceOrgState(str, Enum): + """ + BetaOrganizationServiceOrgState + """ + + """ + allowed enum values + """ + ORG_STATE_UNSPECIFIED = 'ORG_STATE_UNSPECIFIED' + ORG_STATE_ACTIVE = 'ORG_STATE_ACTIVE' + ORG_STATE_INACTIVE = 'ORG_STATE_INACTIVE' + ORG_STATE_REMOVED = 'ORG_STATE_REMOVED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOrganizationServiceOrgState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_organization_service_org_state_filter.py b/zitadel_client/models/beta_organization_service_org_state_filter.py new file mode 100644 index 00000000..eeb0f9cb --- /dev/null +++ b/zitadel_client/models/beta_organization_service_org_state_filter.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_org_state import BetaOrganizationServiceOrgState +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceOrgStateFilter(BaseModel): + """ + BetaOrganizationServiceOrgStateFilter + """ # noqa: E501 + state: Optional[BetaOrganizationServiceOrgState] = None + __properties: ClassVar[List[str]] = ["state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgStateFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrgStateFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_organization.py b/zitadel_client/models/beta_organization_service_organization.py new file mode 100644 index 00000000..5d4ff9de --- /dev/null +++ b/zitadel_client/models/beta_organization_service_organization.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_org_state import BetaOrganizationServiceOrgState +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceOrganization(BaseModel): + """ + BetaOrganizationServiceOrganization + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the organization.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + changed_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changedDate") + state: Optional[BetaOrganizationServiceOrgState] = None + name: Optional[StrictStr] = Field(default=None, description="Name of the organization.") + primary_domain: Optional[StrictStr] = Field(default=None, description="Primary domain used in the organization.", alias="primaryDomain") + __properties: ClassVar[List[str]] = ["id", "creationDate", "changedDate", "state", "name", "primaryDomain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changedDate": obj.get("changedDate"), + "state": obj.get("state"), + "name": obj.get("name"), + "primaryDomain": obj.get("primaryDomain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_organization_admin.py b/zitadel_client/models/beta_organization_service_organization_admin.py new file mode 100644 index 00000000..4bfb3b47 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_organization_admin.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_assigned_admin import BetaOrganizationServiceAssignedAdmin +from zitadel_client.models.beta_organization_service_created_admin import BetaOrganizationServiceCreatedAdmin +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceOrganizationAdmin(BaseModel): + """ + BetaOrganizationServiceOrganizationAdmin + """ # noqa: E501 + assigned_admin: Optional[BetaOrganizationServiceAssignedAdmin] = Field(default=None, alias="assignedAdmin") + created_admin: Optional[BetaOrganizationServiceCreatedAdmin] = Field(default=None, alias="createdAdmin") + __properties: ClassVar[List[str]] = ["assignedAdmin", "createdAdmin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrganizationAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of assigned_admin + if self.assigned_admin: + _dict['assignedAdmin'] = self.assigned_admin.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_admin + if self.created_admin: + _dict['createdAdmin'] = self.created_admin.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrganizationAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignedAdmin": BetaOrganizationServiceAssignedAdmin.from_dict(obj["assignedAdmin"]) if obj.get("assignedAdmin") is not None else None, + "createdAdmin": BetaOrganizationServiceCreatedAdmin.from_dict(obj["createdAdmin"]) if obj.get("createdAdmin") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_organization_search_filter.py b/zitadel_client/models/beta_organization_service_organization_search_filter.py new file mode 100644 index 00000000..0986780d --- /dev/null +++ b/zitadel_client/models/beta_organization_service_organization_search_filter.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_org_domain_filter import BetaOrganizationServiceOrgDomainFilter +from zitadel_client.models.beta_organization_service_org_id_filter import BetaOrganizationServiceOrgIDFilter +from zitadel_client.models.beta_organization_service_org_name_filter import BetaOrganizationServiceOrgNameFilter +from zitadel_client.models.beta_organization_service_org_state_filter import BetaOrganizationServiceOrgStateFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceOrganizationSearchFilter(BaseModel): + """ + BetaOrganizationServiceOrganizationSearchFilter + """ # noqa: E501 + domain_filter: Optional[BetaOrganizationServiceOrgDomainFilter] = Field(default=None, alias="domainFilter") + id_filter: Optional[BetaOrganizationServiceOrgIDFilter] = Field(default=None, alias="idFilter") + name_filter: Optional[BetaOrganizationServiceOrgNameFilter] = Field(default=None, alias="nameFilter") + state_filter: Optional[BetaOrganizationServiceOrgStateFilter] = Field(default=None, alias="stateFilter") + __properties: ClassVar[List[str]] = ["domainFilter", "idFilter", "nameFilter", "stateFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrganizationSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_filter + if self.domain_filter: + _dict['domainFilter'] = self.domain_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of id_filter + if self.id_filter: + _dict['idFilter'] = self.id_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of name_filter + if self.name_filter: + _dict['nameFilter'] = self.name_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of state_filter + if self.state_filter: + _dict['stateFilter'] = self.state_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceOrganizationSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainFilter": BetaOrganizationServiceOrgDomainFilter.from_dict(obj["domainFilter"]) if obj.get("domainFilter") is not None else None, + "idFilter": BetaOrganizationServiceOrgIDFilter.from_dict(obj["idFilter"]) if obj.get("idFilter") is not None else None, + "nameFilter": BetaOrganizationServiceOrgNameFilter.from_dict(obj["nameFilter"]) if obj.get("nameFilter") is not None else None, + "stateFilter": BetaOrganizationServiceOrgStateFilter.from_dict(obj["stateFilter"]) if obj.get("stateFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_pagination_request.py b/zitadel_client/models/beta_organization_service_pagination_request.py new file mode 100644 index 00000000..612b73b0 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_pagination_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServicePaginationRequest(BaseModel): + """ + BetaOrganizationServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_pagination_response.py b/zitadel_client/models/beta_organization_service_pagination_response.py new file mode 100644 index 00000000..b098b950 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServicePaginationResponse(BaseModel): + """ + BetaOrganizationServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_password.py b/zitadel_client/models/beta_organization_service_password.py new file mode 100644 index 00000000..986a58fc --- /dev/null +++ b/zitadel_client/models/beta_organization_service_password.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServicePassword(BaseModel): + """ + BetaOrganizationServicePassword + """ # noqa: E501 + password: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["password", "changeRequired"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServicePassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_send_email_verification_code.py b/zitadel_client/models/beta_organization_service_send_email_verification_code.py new file mode 100644 index 00000000..36498ace --- /dev/null +++ b/zitadel_client/models/beta_organization_service_send_email_verification_code.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSendEmailVerificationCode(BaseModel): + """ + BetaOrganizationServiceSendEmailVerificationCode + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSendEmailVerificationCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSendEmailVerificationCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_set_human_email.py b/zitadel_client/models/beta_organization_service_set_human_email.py new file mode 100644 index 00000000..31e665a6 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_human_email.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_send_email_verification_code import BetaOrganizationServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSetHumanEmail(BaseModel): + """ + BetaOrganizationServiceSetHumanEmail + """ # noqa: E501 + email: StrictStr + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[BetaOrganizationServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["email", "isVerified", "returnCode", "sendCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanEmail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanEmail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isVerified": obj.get("isVerified"), + "returnCode": obj.get("returnCode"), + "sendCode": BetaOrganizationServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_set_human_phone.py b/zitadel_client/models/beta_organization_service_set_human_phone.py new file mode 100644 index 00000000..1a6ebcaf --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_human_phone.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSetHumanPhone(BaseModel): + """ + BetaOrganizationServiceSetHumanPhone + """ # noqa: E501 + phone: Optional[StrictStr] = None + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["phone", "isVerified", "returnCode", "sendCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanPhone from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanPhone from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phone": obj.get("phone"), + "isVerified": obj.get("isVerified"), + "returnCode": obj.get("returnCode"), + "sendCode": obj.get("sendCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_set_human_profile.py b/zitadel_client/models/beta_organization_service_set_human_profile.py new file mode 100644 index 00000000..bd9c5bcf --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_human_profile.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_organization_service_gender import BetaOrganizationServiceGender +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSetHumanProfile(BaseModel): + """ + BetaOrganizationServiceSetHumanProfile + """ # noqa: E501 + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[BetaOrganizationServiceGender] = None + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetHumanProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "givenName": obj.get("givenName"), + "familyName": obj.get("familyName"), + "nickName": obj.get("nickName"), + "displayName": obj.get("displayName"), + "preferredLanguage": obj.get("preferredLanguage"), + "gender": obj.get("gender") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_set_metadata_entry.py b/zitadel_client/models/beta_organization_service_set_metadata_entry.py new file mode 100644 index 00000000..27caf5c8 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_metadata_entry.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSetMetadataEntry(BaseModel): + """ + BetaOrganizationServiceSetMetadataEntry + """ # noqa: E501 + key: StrictStr + value: Union[StrictBytes, StrictStr] + __properties: ClassVar[List[str]] = ["key", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetMetadataEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetMetadataEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_execution.py b/zitadel_client/models/beta_organization_service_set_organization_metadata_request.py similarity index 65% rename from zitadel_client/models/action_service_beta_execution.py rename to zitadel_client/models/beta_organization_service_set_organization_metadata_request.py index dd544268..ac330db3 100644 --- a/zitadel_client/models/action_service_beta_execution.py +++ b/zitadel_client/models/beta_organization_service_set_organization_metadata_request.py @@ -17,21 +17,19 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from zitadel_client.models.beta_organization_service_metadata import BetaOrganizationServiceMetadata from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaExecution(BaseModel): +class BetaOrganizationServiceSetOrganizationMetadataRequest(BaseModel): """ - ActionServiceBetaExecution + BetaOrganizationServiceSetOrganizationMetadataRequest """ # noqa: E501 - condition: Optional[ActionServiceBetaCondition] = None - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution creation.", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the execution.", alias="changeDate") - targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + organization_id: StrictStr = Field(description="Organization Id for the Organization doman to be verified.", alias="organizationId") + metadata: Optional[List[BetaOrganizationServiceMetadata]] = Field(default=None, description="Metadata to set.") + __properties: ClassVar[List[str]] = ["organizationId", "metadata"] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaExecution from a JSON string""" + """Create an instance of BetaOrganizationServiceSetOrganizationMetadataRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,14 +70,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of condition - if self.condition: - _dict['condition'] = self.condition.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaExecution from a dict""" + """Create an instance of BetaOrganizationServiceSetOrganizationMetadataRequest from a dict""" if obj is None: return None @@ -87,10 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "condition": ActionServiceBetaCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "targets": obj.get("targets") + "organizationId": obj.get("organizationId"), + "metadata": [BetaOrganizationServiceMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_organization_service_set_organization_metadata_response.py b/zitadel_client/models/beta_organization_service_set_organization_metadata_response.py new file mode 100644 index 00000000..c3fe561b --- /dev/null +++ b/zitadel_client/models/beta_organization_service_set_organization_metadata_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceSetOrganizationMetadataResponse(BaseModel): + """ + BetaOrganizationServiceSetOrganizationMetadataResponse + """ # noqa: E501 + set_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="setDate") + __properties: ClassVar[List[str]] = ["setDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetOrganizationMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceSetOrganizationMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "setDate": obj.get("setDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_text_query_method.py b/zitadel_client/models/beta_organization_service_text_query_method.py new file mode 100644 index 00000000..b91d314f --- /dev/null +++ b/zitadel_client/models/beta_organization_service_text_query_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaOrganizationServiceTextQueryMethod(str, Enum): + """ + BetaOrganizationServiceTextQueryMethod + """ + + """ + allowed enum values + """ + TEXT_QUERY_METHOD_EQUALS = 'TEXT_QUERY_METHOD_EQUALS' + TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = 'TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE' + TEXT_QUERY_METHOD_STARTS_WITH = 'TEXT_QUERY_METHOD_STARTS_WITH' + TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_QUERY_METHOD_CONTAINS = 'TEXT_QUERY_METHOD_CONTAINS' + TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE' + TEXT_QUERY_METHOD_ENDS_WITH = 'TEXT_QUERY_METHOD_ENDS_WITH' + TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaOrganizationServiceTextQueryMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_create_web_key_response.py b/zitadel_client/models/beta_organization_service_update_organization_request.py similarity index 77% rename from zitadel_client/models/web_key_service_beta_create_web_key_response.py rename to zitadel_client/models/beta_organization_service_update_organization_request.py index 6fac779d..0e38b89f 100644 --- a/zitadel_client/models/web_key_service_beta_create_web_key_response.py +++ b/zitadel_client/models/beta_organization_service_update_organization_request.py @@ -17,18 +17,18 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaCreateWebKeyResponse(BaseModel): +class BetaOrganizationServiceUpdateOrganizationRequest(BaseModel): """ - WebKeyServiceBetaCreateWebKeyResponse + BetaOrganizationServiceUpdateOrganizationRequest """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created key.") - creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the key creation.", alias="creationDate") + id: StrictStr = Field(description="Organization Id for the Organization to be updated") + name: StrictStr = Field(description="New Name for the Organization to be updated") + __properties: ClassVar[List[str]] = ["id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaCreateWebKeyResponse from a JSON string""" + """Create an instance of BetaOrganizationServiceUpdateOrganizationRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaCreateWebKeyResponse from a dict""" + """Create an instance of BetaOrganizationServiceUpdateOrganizationRequest from a dict""" if obj is None: return None @@ -82,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "creationDate": obj.get("creationDate") + "name": obj.get("name") }) return _obj diff --git a/zitadel_client/models/beta_organization_service_update_organization_response.py b/zitadel_client/models/beta_organization_service_update_organization_response.py new file mode 100644 index 00000000..40fd17d4 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_update_organization_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceUpdateOrganizationResponse(BaseModel): + """ + BetaOrganizationServiceUpdateOrganizationResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceUpdateOrganizationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceUpdateOrganizationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_verify_organization_domain_request.py b/zitadel_client/models/beta_organization_service_verify_organization_domain_request.py new file mode 100644 index 00000000..fa9b951f --- /dev/null +++ b/zitadel_client/models/beta_organization_service_verify_organization_domain_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceVerifyOrganizationDomainRequest(BaseModel): + """ + BetaOrganizationServiceVerifyOrganizationDomainRequest + """ # noqa: E501 + organization_id: StrictStr = Field(description="Organization Id for the Organization doman to be verified.", alias="organizationId") + domain: Optional[StrictStr] = Field(default=None, description="Organization Id for the Organization doman to be verified.") + __properties: ClassVar[List[str]] = ["organizationId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceVerifyOrganizationDomainRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceVerifyOrganizationDomainRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_organization_service_verify_organization_domain_response.py b/zitadel_client/models/beta_organization_service_verify_organization_domain_response.py new file mode 100644 index 00000000..f38ef5f2 --- /dev/null +++ b/zitadel_client/models/beta_organization_service_verify_organization_domain_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaOrganizationServiceVerifyOrganizationDomainResponse(BaseModel): + """ + BetaOrganizationServiceVerifyOrganizationDomainResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceVerifyOrganizationDomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaOrganizationServiceVerifyOrganizationDomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_activate_project_grant_request.py b/zitadel_client/models/beta_project_service_activate_project_grant_request.py new file mode 100644 index 00000000..ffb4ca06 --- /dev/null +++ b/zitadel_client/models/beta_project_service_activate_project_grant_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceActivateProjectGrantRequest(BaseModel): + """ + BetaProjectServiceActivateProjectGrantRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + granted_organization_id: StrictStr = Field(description="Organization the project is granted to.", alias="grantedOrganizationId") + __properties: ClassVar[List[str]] = ["projectId", "grantedOrganizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectGrantRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectGrantRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "grantedOrganizationId": obj.get("grantedOrganizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_activate_project_grant_response.py b/zitadel_client/models/beta_project_service_activate_project_grant_response.py new file mode 100644 index 00000000..75f4bab9 --- /dev/null +++ b/zitadel_client/models/beta_project_service_activate_project_grant_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceActivateProjectGrantResponse(BaseModel): + """ + BetaProjectServiceActivateProjectGrantResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectGrantResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectGrantResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_activate_project_request.py b/zitadel_client/models/beta_project_service_activate_project_request.py new file mode 100644 index 00000000..5c9e13e9 --- /dev/null +++ b/zitadel_client/models/beta_project_service_activate_project_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceActivateProjectRequest(BaseModel): + """ + BetaProjectServiceActivateProjectRequest + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the project.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_activate_project_response.py b/zitadel_client/models/beta_project_service_activate_project_response.py new file mode 100644 index 00000000..c29e02ef --- /dev/null +++ b/zitadel_client/models/beta_project_service_activate_project_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceActivateProjectResponse(BaseModel): + """ + BetaProjectServiceActivateProjectResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceActivateProjectResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_add_project_role_request.py b/zitadel_client/models/beta_project_service_add_project_role_request.py new file mode 100644 index 00000000..0e7f7b88 --- /dev/null +++ b/zitadel_client/models/beta_project_service_add_project_role_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceAddProjectRoleRequest(BaseModel): + """ + BetaProjectServiceAddProjectRoleRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + role_key: StrictStr = Field(description="The key is the only relevant attribute for ZITADEL regarding the authorization checks.", alias="roleKey") + display_name: StrictStr = Field(description="Name displayed for the role.", alias="displayName") + group: Optional[StrictStr] = Field(default=None, description="The group is only used for display purposes. That you have better handling, like giving all the roles from a group to a user.") + __properties: ClassVar[List[str]] = ["projectId", "roleKey", "displayName", "group"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceAddProjectRoleRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceAddProjectRoleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "roleKey": obj.get("roleKey"), + "displayName": obj.get("displayName"), + "group": obj.get("group") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_add_project_role_response.py b/zitadel_client/models/beta_project_service_add_project_role_response.py new file mode 100644 index 00000000..f273e424 --- /dev/null +++ b/zitadel_client/models/beta_project_service_add_project_role_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceAddProjectRoleResponse(BaseModel): + """ + BetaProjectServiceAddProjectRoleResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceAddProjectRoleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceAddProjectRoleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_any.py b/zitadel_client/models/beta_project_service_any.py new file mode 100644 index 00000000..397fcf8d --- /dev/null +++ b/zitadel_client/models/beta_project_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_project_service_connect_error.py b/zitadel_client/models/beta_project_service_connect_error.py new file mode 100644 index 00000000..100dcb72 --- /dev/null +++ b/zitadel_client/models/beta_project_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_any import BetaProjectServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaProjectServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaProjectServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_project_service_create_project_grant_request.py b/zitadel_client/models/beta_project_service_create_project_grant_request.py new file mode 100644 index 00000000..cf03c777 --- /dev/null +++ b/zitadel_client/models/beta_project_service_create_project_grant_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceCreateProjectGrantRequest(BaseModel): + """ + BetaProjectServiceCreateProjectGrantRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + granted_organization_id: StrictStr = Field(description="Organization the project is granted to.", alias="grantedOrganizationId") + role_keys: Optional[List[StrictStr]] = Field(default=None, description="Keys of the role available for the project grant.", alias="roleKeys") + __properties: ClassVar[List[str]] = ["projectId", "grantedOrganizationId", "roleKeys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectGrantRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectGrantRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "grantedOrganizationId": obj.get("grantedOrganizationId"), + "roleKeys": obj.get("roleKeys") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_create_project_grant_response.py b/zitadel_client/models/beta_project_service_create_project_grant_response.py new file mode 100644 index 00000000..3e786183 --- /dev/null +++ b/zitadel_client/models/beta_project_service_create_project_grant_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceCreateProjectGrantResponse(BaseModel): + """ + BetaProjectServiceCreateProjectGrantResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectGrantResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectGrantResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_create_project_request.py b/zitadel_client/models/beta_project_service_create_project_request.py new file mode 100644 index 00000000..4a437e96 --- /dev/null +++ b/zitadel_client/models/beta_project_service_create_project_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_private_labeling_setting import BetaProjectServicePrivateLabelingSetting +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceCreateProjectRequest(BaseModel): + """ + BetaProjectServiceCreateProjectRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the organization the project belongs to.", alias="organizationId") + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the project.") + name: StrictStr = Field(description="Name of the project.") + project_role_assertion: Optional[StrictBool] = Field(default=None, description="Enable this setting to have role information included in the user info endpoint. It is also dependent on your application settings to include it in tokens and other types.", alias="projectRoleAssertion") + authorization_required: Optional[StrictBool] = Field(default=None, description="When enabled ZITADEL will check if a user has an authorization to use this project assigned when login into an application of this project.", alias="authorizationRequired") + project_access_required: Optional[StrictBool] = Field(default=None, description="When enabled ZITADEL will check if the organization of the user, that is trying to log in, has access to this project (either owns the project or is granted).", alias="projectAccessRequired") + private_labeling_setting: Optional[BetaProjectServicePrivateLabelingSetting] = Field(default=None, alias="privateLabelingSetting") + __properties: ClassVar[List[str]] = ["organizationId", "id", "name", "projectRoleAssertion", "authorizationRequired", "projectAccessRequired", "privateLabelingSetting"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "id": obj.get("id"), + "name": obj.get("name"), + "projectRoleAssertion": obj.get("projectRoleAssertion"), + "authorizationRequired": obj.get("authorizationRequired"), + "projectAccessRequired": obj.get("projectAccessRequired"), + "privateLabelingSetting": obj.get("privateLabelingSetting") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_create_project_response.py b/zitadel_client/models/beta_project_service_create_project_response.py new file mode 100644 index 00000000..fc42a4bc --- /dev/null +++ b/zitadel_client/models/beta_project_service_create_project_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceCreateProjectResponse(BaseModel): + """ + BetaProjectServiceCreateProjectResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created project.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["id", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceCreateProjectResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_deactivate_project_grant_request.py b/zitadel_client/models/beta_project_service_deactivate_project_grant_request.py new file mode 100644 index 00000000..a3ab627c --- /dev/null +++ b/zitadel_client/models/beta_project_service_deactivate_project_grant_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeactivateProjectGrantRequest(BaseModel): + """ + BetaProjectServiceDeactivateProjectGrantRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + granted_organization_id: StrictStr = Field(description="Organization the project is granted to.", alias="grantedOrganizationId") + __properties: ClassVar[List[str]] = ["projectId", "grantedOrganizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectGrantRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectGrantRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "grantedOrganizationId": obj.get("grantedOrganizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_deactivate_project_grant_response.py b/zitadel_client/models/beta_project_service_deactivate_project_grant_response.py new file mode 100644 index 00000000..79c3011b --- /dev/null +++ b/zitadel_client/models/beta_project_service_deactivate_project_grant_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeactivateProjectGrantResponse(BaseModel): + """ + BetaProjectServiceDeactivateProjectGrantResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectGrantResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectGrantResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_deactivate_project_request.py b/zitadel_client/models/beta_project_service_deactivate_project_request.py new file mode 100644 index 00000000..f3a6d929 --- /dev/null +++ b/zitadel_client/models/beta_project_service_deactivate_project_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeactivateProjectRequest(BaseModel): + """ + BetaProjectServiceDeactivateProjectRequest + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the project.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_deactivate_project_response.py b/zitadel_client/models/beta_project_service_deactivate_project_response.py new file mode 100644 index 00000000..2ccc5bbc --- /dev/null +++ b/zitadel_client/models/beta_project_service_deactivate_project_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeactivateProjectResponse(BaseModel): + """ + BetaProjectServiceDeactivateProjectResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeactivateProjectResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_delete_project_grant_request.py b/zitadel_client/models/beta_project_service_delete_project_grant_request.py new file mode 100644 index 00000000..b85c065f --- /dev/null +++ b/zitadel_client/models/beta_project_service_delete_project_grant_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeleteProjectGrantRequest(BaseModel): + """ + BetaProjectServiceDeleteProjectGrantRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + granted_organization_id: StrictStr = Field(description="Organization the project is granted to.", alias="grantedOrganizationId") + __properties: ClassVar[List[str]] = ["projectId", "grantedOrganizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectGrantRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectGrantRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "grantedOrganizationId": obj.get("grantedOrganizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_delete_project_grant_response.py b/zitadel_client/models/beta_project_service_delete_project_grant_response.py new file mode 100644 index 00000000..9214120b --- /dev/null +++ b/zitadel_client/models/beta_project_service_delete_project_grant_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeleteProjectGrantResponse(BaseModel): + """ + BetaProjectServiceDeleteProjectGrantResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectGrantResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectGrantResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_delete_project_request.py b/zitadel_client/models/beta_project_service_delete_project_request.py new file mode 100644 index 00000000..6bd11572 --- /dev/null +++ b/zitadel_client/models/beta_project_service_delete_project_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeleteProjectRequest(BaseModel): + """ + BetaProjectServiceDeleteProjectRequest + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the project.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_delete_project_response.py b/zitadel_client/models/beta_project_service_delete_project_response.py new file mode 100644 index 00000000..9e1c7f44 --- /dev/null +++ b/zitadel_client/models/beta_project_service_delete_project_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceDeleteProjectResponse(BaseModel): + """ + BetaProjectServiceDeleteProjectResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceDeleteProjectResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_get_project_request.py b/zitadel_client/models/beta_project_service_get_project_request.py new file mode 100644 index 00000000..15e27946 --- /dev/null +++ b/zitadel_client/models/beta_project_service_get_project_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceGetProjectRequest(BaseModel): + """ + BetaProjectServiceGetProjectRequest + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the project.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceGetProjectRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceGetProjectRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_get_project_response.py b/zitadel_client/models/beta_project_service_get_project_response.py new file mode 100644 index 00000000..8a84a75f --- /dev/null +++ b/zitadel_client/models/beta_project_service_get_project_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_project import BetaProjectServiceProject +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceGetProjectResponse(BaseModel): + """ + BetaProjectServiceGetProjectResponse + """ # noqa: E501 + project: Optional[BetaProjectServiceProject] = None + __properties: ClassVar[List[str]] = ["project"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceGetProjectResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of project + if self.project: + _dict['project'] = self.project.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceGetProjectResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "project": BetaProjectServiceProject.from_dict(obj["project"]) if obj.get("project") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_granted_project_state.py b/zitadel_client/models/beta_project_service_granted_project_state.py new file mode 100644 index 00000000..d788b91b --- /dev/null +++ b/zitadel_client/models/beta_project_service_granted_project_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServiceGrantedProjectState(str, Enum): + """ + BetaProjectServiceGrantedProjectState + """ + + """ + allowed enum values + """ + GRANTED_PROJECT_STATE_UNSPECIFIED = 'GRANTED_PROJECT_STATE_UNSPECIFIED' + GRANTED_PROJECT_STATE_ACTIVE = 'GRANTED_PROJECT_STATE_ACTIVE' + GRANTED_PROJECT_STATE_INACTIVE = 'GRANTED_PROJECT_STATE_INACTIVE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServiceGrantedProjectState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_id_filter.py b/zitadel_client/models/beta_project_service_id_filter.py new file mode 100644 index 00000000..ccc07600 --- /dev/null +++ b/zitadel_client/models/beta_project_service_id_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceIDFilter(BaseModel): + """ + BetaProjectServiceIDFilter + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Only return resources that belong to this id.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceIDFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceIDFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_protobuf_any.py b/zitadel_client/models/beta_project_service_in_ids_filter.py similarity index 84% rename from zitadel_client/models/identity_provider_service_protobuf_any.py rename to zitadel_client/models/beta_project_service_in_ids_filter.py index 82dbc75a..ccb5fff2 100644 --- a/zitadel_client/models/identity_provider_service_protobuf_any.py +++ b/zitadel_client/models/beta_project_service_in_ids_filter.py @@ -22,11 +22,12 @@ from typing import Optional, Set from typing_extensions import Self -class IdentityProviderServiceProtobufAny(BaseModel): +class BetaProjectServiceInIDsFilter(BaseModel): """ - IdentityProviderServiceProtobufAny + BetaProjectServiceInIDsFilter """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + ids: Optional[List[StrictStr]] = Field(default=None, description="Defines the ids to query for.") + __properties: ClassVar[List[str]] = ["ids"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of IdentityProviderServiceProtobufAny from a JSON string""" + """Create an instance of BetaProjectServiceInIDsFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of IdentityProviderServiceProtobufAny from a dict""" + """Create an instance of BetaProjectServiceInIDsFilter from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "ids": obj.get("ids") }) return _obj diff --git a/zitadel_client/models/beta_project_service_list_project_grants_request.py b/zitadel_client/models/beta_project_service_list_project_grants_request.py new file mode 100644 index 00000000..6acccab5 --- /dev/null +++ b/zitadel_client/models/beta_project_service_list_project_grants_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_pagination_request import BetaProjectServicePaginationRequest +from zitadel_client.models.beta_project_service_project_grant_field_name import BetaProjectServiceProjectGrantFieldName +from zitadel_client.models.beta_project_service_project_grant_search_filter import BetaProjectServiceProjectGrantSearchFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceListProjectGrantsRequest(BaseModel): + """ + BetaProjectServiceListProjectGrantsRequest + """ # noqa: E501 + pagination: Optional[BetaProjectServicePaginationRequest] = None + sorting_column: Optional[BetaProjectServiceProjectGrantFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaProjectServiceProjectGrantSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectGrantsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectGrantsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaProjectServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaProjectServiceProjectGrantSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_list_project_grants_response.py b/zitadel_client/models/beta_project_service_list_project_grants_response.py new file mode 100644 index 00000000..c9e14d03 --- /dev/null +++ b/zitadel_client/models/beta_project_service_list_project_grants_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_pagination_response import BetaProjectServicePaginationResponse +from zitadel_client.models.beta_project_service_project_grant import BetaProjectServiceProjectGrant +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceListProjectGrantsResponse(BaseModel): + """ + BetaProjectServiceListProjectGrantsResponse + """ # noqa: E501 + pagination: Optional[BetaProjectServicePaginationResponse] = None + project_grants: Optional[List[BetaProjectServiceProjectGrant]] = Field(default=None, alias="projectGrants") + __properties: ClassVar[List[str]] = ["pagination", "projectGrants"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectGrantsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in project_grants (list) + _items = [] + if self.project_grants: + for _item_project_grants in self.project_grants: + if _item_project_grants: + _items.append(_item_project_grants.to_dict()) + _dict['projectGrants'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectGrantsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaProjectServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "projectGrants": [BetaProjectServiceProjectGrant.from_dict(_item) for _item in obj["projectGrants"]] if obj.get("projectGrants") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_list_project_roles_request.py b/zitadel_client/models/beta_project_service_list_project_roles_request.py new file mode 100644 index 00000000..e4bc66ef --- /dev/null +++ b/zitadel_client/models/beta_project_service_list_project_roles_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_pagination_request import BetaProjectServicePaginationRequest +from zitadel_client.models.beta_project_service_project_role_field_name import BetaProjectServiceProjectRoleFieldName +from zitadel_client.models.beta_project_service_project_role_search_filter import BetaProjectServiceProjectRoleSearchFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceListProjectRolesRequest(BaseModel): + """ + BetaProjectServiceListProjectRolesRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + pagination: Optional[BetaProjectServicePaginationRequest] = None + sorting_column: Optional[BetaProjectServiceProjectRoleFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaProjectServiceProjectRoleSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["projectId", "pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectRolesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectRolesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "pagination": BetaProjectServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaProjectServiceProjectRoleSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_list_project_roles_response.py b/zitadel_client/models/beta_project_service_list_project_roles_response.py new file mode 100644 index 00000000..1bc4f7ef --- /dev/null +++ b/zitadel_client/models/beta_project_service_list_project_roles_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_pagination_response import BetaProjectServicePaginationResponse +from zitadel_client.models.beta_project_service_project_role import BetaProjectServiceProjectRole +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceListProjectRolesResponse(BaseModel): + """ + BetaProjectServiceListProjectRolesResponse + """ # noqa: E501 + pagination: Optional[BetaProjectServicePaginationResponse] = None + project_roles: Optional[List[BetaProjectServiceProjectRole]] = Field(default=None, alias="projectRoles") + __properties: ClassVar[List[str]] = ["pagination", "projectRoles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectRolesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in project_roles (list) + _items = [] + if self.project_roles: + for _item_project_roles in self.project_roles: + if _item_project_roles: + _items.append(_item_project_roles.to_dict()) + _dict['projectRoles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectRolesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaProjectServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "projectRoles": [BetaProjectServiceProjectRole.from_dict(_item) for _item in obj["projectRoles"]] if obj.get("projectRoles") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_list_projects_request.py b/zitadel_client/models/beta_project_service_list_projects_request.py new file mode 100644 index 00000000..c5e923cf --- /dev/null +++ b/zitadel_client/models/beta_project_service_list_projects_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_pagination_request import BetaProjectServicePaginationRequest +from zitadel_client.models.beta_project_service_project_field_name import BetaProjectServiceProjectFieldName +from zitadel_client.models.beta_project_service_project_search_filter import BetaProjectServiceProjectSearchFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceListProjectsRequest(BaseModel): + """ + BetaProjectServiceListProjectsRequest + """ # noqa: E501 + pagination: Optional[BetaProjectServicePaginationRequest] = None + sorting_column: Optional[BetaProjectServiceProjectFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[BetaProjectServiceProjectSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaProjectServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [BetaProjectServiceProjectSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_list_projects_response.py b/zitadel_client/models/beta_project_service_list_projects_response.py new file mode 100644 index 00000000..9ed6f4c6 --- /dev/null +++ b/zitadel_client/models/beta_project_service_list_projects_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_pagination_response import BetaProjectServicePaginationResponse +from zitadel_client.models.beta_project_service_project import BetaProjectServiceProject +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceListProjectsResponse(BaseModel): + """ + BetaProjectServiceListProjectsResponse + """ # noqa: E501 + pagination: Optional[BetaProjectServicePaginationResponse] = None + projects: Optional[List[BetaProjectServiceProject]] = None + __properties: ClassVar[List[str]] = ["pagination", "projects"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in projects (list) + _items = [] + if self.projects: + for _item_projects in self.projects: + if _item_projects: + _items.append(_item_projects.to_dict()) + _dict['projects'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceListProjectsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": BetaProjectServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "projects": [BetaProjectServiceProject.from_dict(_item) for _item in obj["projects"]] if obj.get("projects") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_pagination_request.py b/zitadel_client/models/beta_project_service_pagination_request.py new file mode 100644 index 00000000..f69c7d24 --- /dev/null +++ b/zitadel_client/models/beta_project_service_pagination_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServicePaginationRequest(BaseModel): + """ + BetaProjectServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServicePaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServicePaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_pagination_response.py b/zitadel_client/models/beta_project_service_pagination_response.py new file mode 100644 index 00000000..7d8142f4 --- /dev/null +++ b/zitadel_client/models/beta_project_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServicePaginationResponse(BaseModel): + """ + BetaProjectServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_private_labeling_setting.py b/zitadel_client/models/beta_project_service_private_labeling_setting.py new file mode 100644 index 00000000..a4eae95a --- /dev/null +++ b/zitadel_client/models/beta_project_service_private_labeling_setting.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServicePrivateLabelingSetting(str, Enum): + """ + BetaProjectServicePrivateLabelingSetting + """ + + """ + allowed enum values + """ + PRIVATE_LABELING_SETTING_UNSPECIFIED = 'PRIVATE_LABELING_SETTING_UNSPECIFIED' + PRIVATE_LABELING_SETTING_ENFORCE_PROJECT_RESOURCE_OWNER_POLICY = 'PRIVATE_LABELING_SETTING_ENFORCE_PROJECT_RESOURCE_OWNER_POLICY' + PRIVATE_LABELING_SETTING_ALLOW_LOGIN_USER_RESOURCE_OWNER_POLICY = 'PRIVATE_LABELING_SETTING_ALLOW_LOGIN_USER_RESOURCE_OWNER_POLICY' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServicePrivateLabelingSetting from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_project.py b/zitadel_client/models/beta_project_service_project.py new file mode 100644 index 00000000..e813c7f7 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_granted_project_state import BetaProjectServiceGrantedProjectState +from zitadel_client.models.beta_project_service_private_labeling_setting import BetaProjectServicePrivateLabelingSetting +from zitadel_client.models.beta_project_service_project_state import BetaProjectServiceProjectState +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProject(BaseModel): + """ + BetaProjectServiceProject + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the project.") + organization_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the organization the project belongs to.", alias="organizationId") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + name: Optional[StrictStr] = Field(default=None, description="The name of the project.") + state: Optional[BetaProjectServiceProjectState] = None + project_role_assertion: Optional[StrictBool] = Field(default=None, description="Describes if the roles of the user should be added to the token.", alias="projectRoleAssertion") + authorization_required: Optional[StrictBool] = Field(default=None, description="When enabled ZITADEL will check if a user has an authorization to use this project assigned when login into an application of this project.", alias="authorizationRequired") + project_access_required: Optional[StrictBool] = Field(default=None, description="When enabled ZITADEL will check if the organization of the user, that is trying to log in, has access to this project (either owns the project or is granted).", alias="projectAccessRequired") + private_labeling_setting: Optional[BetaProjectServicePrivateLabelingSetting] = Field(default=None, alias="privateLabelingSetting") + granted_organization_id: Optional[StrictStr] = Field(default=None, description="The ID of the organization the project is granted to.", alias="grantedOrganizationId") + granted_organization_name: Optional[StrictStr] = Field(default=None, description="The name of the organization the project is granted to.", alias="grantedOrganizationName") + granted_state: Optional[BetaProjectServiceGrantedProjectState] = Field(default=None, alias="grantedState") + __properties: ClassVar[List[str]] = ["id", "organizationId", "creationDate", "changeDate", "name", "state", "projectRoleAssertion", "authorizationRequired", "projectAccessRequired", "privateLabelingSetting", "grantedOrganizationId", "grantedOrganizationName", "grantedState"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if granted_organization_id (nullable) is None + # and model_fields_set contains the field + if self.granted_organization_id is None and "granted_organization_id" in self.model_fields_set: + _dict['grantedOrganizationId'] = None + + # set to None if granted_organization_name (nullable) is None + # and model_fields_set contains the field + if self.granted_organization_name is None and "granted_organization_name" in self.model_fields_set: + _dict['grantedOrganizationName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "organizationId": obj.get("organizationId"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "name": obj.get("name"), + "state": obj.get("state"), + "projectRoleAssertion": obj.get("projectRoleAssertion"), + "authorizationRequired": obj.get("authorizationRequired"), + "projectAccessRequired": obj.get("projectAccessRequired"), + "privateLabelingSetting": obj.get("privateLabelingSetting"), + "grantedOrganizationId": obj.get("grantedOrganizationId"), + "grantedOrganizationName": obj.get("grantedOrganizationName"), + "grantedState": obj.get("grantedState") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_field_name.py b/zitadel_client/models/beta_project_service_project_field_name.py new file mode 100644 index 00000000..a9d8c4c9 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_field_name.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServiceProjectFieldName(str, Enum): + """ + BetaProjectServiceProjectFieldName + """ + + """ + allowed enum values + """ + PROJECT_FIELD_NAME_UNSPECIFIED = 'PROJECT_FIELD_NAME_UNSPECIFIED' + PROJECT_FIELD_NAME_ID = 'PROJECT_FIELD_NAME_ID' + PROJECT_FIELD_NAME_CREATION_DATE = 'PROJECT_FIELD_NAME_CREATION_DATE' + PROJECT_FIELD_NAME_CHANGE_DATE = 'PROJECT_FIELD_NAME_CHANGE_DATE' + PROJECT_FIELD_NAME_NAME = 'PROJECT_FIELD_NAME_NAME' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServiceProjectFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_project_grant.py b/zitadel_client/models/beta_project_service_project_grant.py new file mode 100644 index 00000000..da383ea2 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_grant.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_project_service_project_grant_state import BetaProjectServiceProjectGrantState +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectGrant(BaseModel): + """ + BetaProjectServiceProjectGrant + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the organization which granted the project to the granted_organization_id.", alias="organizationId") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + granted_organization_id: Optional[StrictStr] = Field(default=None, description="The ID of the organization the project is granted to.", alias="grantedOrganizationId") + granted_organization_name: Optional[StrictStr] = Field(default=None, description="The name of the organization the project is granted to.", alias="grantedOrganizationName") + granted_role_keys: Optional[List[StrictStr]] = Field(default=None, description="The roles of the granted project.", alias="grantedRoleKeys") + project_id: Optional[StrictStr] = Field(default=None, description="The ID of the granted project.", alias="projectId") + project_name: Optional[StrictStr] = Field(default=None, description="The name of the granted project.", alias="projectName") + state: Optional[BetaProjectServiceProjectGrantState] = None + __properties: ClassVar[List[str]] = ["organizationId", "creationDate", "changeDate", "grantedOrganizationId", "grantedOrganizationName", "grantedRoleKeys", "projectId", "projectName", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectGrant from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectGrant from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "grantedOrganizationId": obj.get("grantedOrganizationId"), + "grantedOrganizationName": obj.get("grantedOrganizationName"), + "grantedRoleKeys": obj.get("grantedRoleKeys"), + "projectId": obj.get("projectId"), + "projectName": obj.get("projectName"), + "state": obj.get("state") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_grant_field_name.py b/zitadel_client/models/beta_project_service_project_grant_field_name.py new file mode 100644 index 00000000..96f740ff --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_grant_field_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServiceProjectGrantFieldName(str, Enum): + """ + BetaProjectServiceProjectGrantFieldName + """ + + """ + allowed enum values + """ + PROJECT_GRANT_FIELD_NAME_UNSPECIFIED = 'PROJECT_GRANT_FIELD_NAME_UNSPECIFIED' + PROJECT_GRANT_FIELD_NAME_PROJECT_ID = 'PROJECT_GRANT_FIELD_NAME_PROJECT_ID' + PROJECT_GRANT_FIELD_NAME_CREATION_DATE = 'PROJECT_GRANT_FIELD_NAME_CREATION_DATE' + PROJECT_GRANT_FIELD_NAME_CHANGE_DATE = 'PROJECT_GRANT_FIELD_NAME_CHANGE_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServiceProjectGrantFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_project_grant_search_filter.py b/zitadel_client/models/beta_project_service_project_grant_search_filter.py new file mode 100644 index 00000000..9e1e2cea --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_grant_search_filter.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_id_filter import BetaProjectServiceIDFilter +from zitadel_client.models.beta_project_service_in_ids_filter import BetaProjectServiceInIDsFilter +from zitadel_client.models.beta_project_service_project_name_filter import BetaProjectServiceProjectNameFilter +from zitadel_client.models.beta_project_service_project_role_key_filter import BetaProjectServiceProjectRoleKeyFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectGrantSearchFilter(BaseModel): + """ + BetaProjectServiceProjectGrantSearchFilter + """ # noqa: E501 + in_project_ids_filter: Optional[BetaProjectServiceInIDsFilter] = Field(default=None, alias="inProjectIdsFilter") + project_grant_resource_owner_filter: Optional[BetaProjectServiceIDFilter] = Field(default=None, alias="projectGrantResourceOwnerFilter") + project_name_filter: Optional[BetaProjectServiceProjectNameFilter] = Field(default=None, alias="projectNameFilter") + project_resource_owner_filter: Optional[BetaProjectServiceIDFilter] = Field(default=None, alias="projectResourceOwnerFilter") + role_key_filter: Optional[BetaProjectServiceProjectRoleKeyFilter] = Field(default=None, alias="roleKeyFilter") + __properties: ClassVar[List[str]] = ["inProjectIdsFilter", "projectGrantResourceOwnerFilter", "projectNameFilter", "projectResourceOwnerFilter", "roleKeyFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectGrantSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_project_ids_filter + if self.in_project_ids_filter: + _dict['inProjectIdsFilter'] = self.in_project_ids_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_grant_resource_owner_filter + if self.project_grant_resource_owner_filter: + _dict['projectGrantResourceOwnerFilter'] = self.project_grant_resource_owner_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_name_filter + if self.project_name_filter: + _dict['projectNameFilter'] = self.project_name_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_resource_owner_filter + if self.project_resource_owner_filter: + _dict['projectResourceOwnerFilter'] = self.project_resource_owner_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of role_key_filter + if self.role_key_filter: + _dict['roleKeyFilter'] = self.role_key_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectGrantSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inProjectIdsFilter": BetaProjectServiceInIDsFilter.from_dict(obj["inProjectIdsFilter"]) if obj.get("inProjectIdsFilter") is not None else None, + "projectGrantResourceOwnerFilter": BetaProjectServiceIDFilter.from_dict(obj["projectGrantResourceOwnerFilter"]) if obj.get("projectGrantResourceOwnerFilter") is not None else None, + "projectNameFilter": BetaProjectServiceProjectNameFilter.from_dict(obj["projectNameFilter"]) if obj.get("projectNameFilter") is not None else None, + "projectResourceOwnerFilter": BetaProjectServiceIDFilter.from_dict(obj["projectResourceOwnerFilter"]) if obj.get("projectResourceOwnerFilter") is not None else None, + "roleKeyFilter": BetaProjectServiceProjectRoleKeyFilter.from_dict(obj["roleKeyFilter"]) if obj.get("roleKeyFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_grant_state.py b/zitadel_client/models/beta_project_service_project_grant_state.py new file mode 100644 index 00000000..f1524333 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_grant_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServiceProjectGrantState(str, Enum): + """ + BetaProjectServiceProjectGrantState + """ + + """ + allowed enum values + """ + PROJECT_GRANT_STATE_UNSPECIFIED = 'PROJECT_GRANT_STATE_UNSPECIFIED' + PROJECT_GRANT_STATE_ACTIVE = 'PROJECT_GRANT_STATE_ACTIVE' + PROJECT_GRANT_STATE_INACTIVE = 'PROJECT_GRANT_STATE_INACTIVE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServiceProjectGrantState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_project_name_filter.py b/zitadel_client/models/beta_project_service_project_name_filter.py new file mode 100644 index 00000000..3930d475 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_text_filter_method import BetaProjectServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectNameFilter(BaseModel): + """ + BetaProjectServiceProjectNameFilter + """ # noqa: E501 + project_name: Optional[StrictStr] = Field(default=None, description="Defines the name of the project to query for.", alias="projectName") + method: Optional[BetaProjectServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["projectName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectName": obj.get("projectName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_role.py b/zitadel_client/models/beta_project_service_project_role.py new file mode 100644 index 00000000..74798c8d --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_role.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectRole(BaseModel): + """ + BetaProjectServiceProjectRole + """ # noqa: E501 + project_id: Optional[StrictStr] = Field(default=None, description="ID of the project.", alias="projectId") + key: Optional[StrictStr] = Field(default=None, description="Key of the project role.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + display_name: Optional[StrictStr] = Field(default=None, description="Display name of the project role.", alias="displayName") + group: Optional[StrictStr] = Field(default=None, description="Group of the project role.") + __properties: ClassVar[List[str]] = ["projectId", "key", "creationDate", "changeDate", "displayName", "group"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "key": obj.get("key"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "displayName": obj.get("displayName"), + "group": obj.get("group") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_role_display_name_filter.py b/zitadel_client/models/beta_project_service_project_role_display_name_filter.py new file mode 100644 index 00000000..33819783 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_role_display_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_text_filter_method import BetaProjectServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectRoleDisplayNameFilter(BaseModel): + """ + BetaProjectServiceProjectRoleDisplayNameFilter + """ # noqa: E501 + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + method: Optional[BetaProjectServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["displayName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRoleDisplayNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRoleDisplayNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayName": obj.get("displayName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_role_field_name.py b/zitadel_client/models/beta_project_service_project_role_field_name.py new file mode 100644 index 00000000..af9c098e --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_role_field_name.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServiceProjectRoleFieldName(str, Enum): + """ + BetaProjectServiceProjectRoleFieldName + """ + + """ + allowed enum values + """ + PROJECT_ROLE_FIELD_NAME_UNSPECIFIED = 'PROJECT_ROLE_FIELD_NAME_UNSPECIFIED' + PROJECT_ROLE_FIELD_NAME_KEY = 'PROJECT_ROLE_FIELD_NAME_KEY' + PROJECT_ROLE_FIELD_NAME_CREATION_DATE = 'PROJECT_ROLE_FIELD_NAME_CREATION_DATE' + PROJECT_ROLE_FIELD_NAME_CHANGE_DATE = 'PROJECT_ROLE_FIELD_NAME_CHANGE_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServiceProjectRoleFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_project_role_key_filter.py b/zitadel_client/models/beta_project_service_project_role_key_filter.py new file mode 100644 index 00000000..28e04be4 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_role_key_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_text_filter_method import BetaProjectServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectRoleKeyFilter(BaseModel): + """ + BetaProjectServiceProjectRoleKeyFilter + """ # noqa: E501 + key: Optional[StrictStr] = None + method: Optional[BetaProjectServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["key", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRoleKeyFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRoleKeyFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_role_search_filter.py b/zitadel_client/models/beta_project_service_project_role_search_filter.py new file mode 100644 index 00000000..d9e00379 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_role_search_filter.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_project_role_display_name_filter import BetaProjectServiceProjectRoleDisplayNameFilter +from zitadel_client.models.beta_project_service_project_role_key_filter import BetaProjectServiceProjectRoleKeyFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectRoleSearchFilter(BaseModel): + """ + BetaProjectServiceProjectRoleSearchFilter + """ # noqa: E501 + display_name_filter: Optional[BetaProjectServiceProjectRoleDisplayNameFilter] = Field(default=None, alias="displayNameFilter") + role_key_filter: Optional[BetaProjectServiceProjectRoleKeyFilter] = Field(default=None, alias="roleKeyFilter") + __properties: ClassVar[List[str]] = ["displayNameFilter", "roleKeyFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRoleSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of display_name_filter + if self.display_name_filter: + _dict['displayNameFilter'] = self.display_name_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of role_key_filter + if self.role_key_filter: + _dict['roleKeyFilter'] = self.role_key_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectRoleSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayNameFilter": BetaProjectServiceProjectRoleDisplayNameFilter.from_dict(obj["displayNameFilter"]) if obj.get("displayNameFilter") is not None else None, + "roleKeyFilter": BetaProjectServiceProjectRoleKeyFilter.from_dict(obj["roleKeyFilter"]) if obj.get("roleKeyFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_search_filter.py b/zitadel_client/models/beta_project_service_project_search_filter.py new file mode 100644 index 00000000..ae85dedd --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_search_filter.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_id_filter import BetaProjectServiceIDFilter +from zitadel_client.models.beta_project_service_in_ids_filter import BetaProjectServiceInIDsFilter +from zitadel_client.models.beta_project_service_project_name_filter import BetaProjectServiceProjectNameFilter +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceProjectSearchFilter(BaseModel): + """ + BetaProjectServiceProjectSearchFilter + """ # noqa: E501 + in_project_ids_filter: Optional[BetaProjectServiceInIDsFilter] = Field(default=None, alias="inProjectIdsFilter") + project_grant_resource_owner_filter: Optional[BetaProjectServiceIDFilter] = Field(default=None, alias="projectGrantResourceOwnerFilter") + project_name_filter: Optional[BetaProjectServiceProjectNameFilter] = Field(default=None, alias="projectNameFilter") + project_organization_id_filter: Optional[BetaProjectServiceIDFilter] = Field(default=None, alias="projectOrganizationIdFilter") + project_resource_owner_filter: Optional[BetaProjectServiceIDFilter] = Field(default=None, alias="projectResourceOwnerFilter") + __properties: ClassVar[List[str]] = ["inProjectIdsFilter", "projectGrantResourceOwnerFilter", "projectNameFilter", "projectOrganizationIdFilter", "projectResourceOwnerFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of in_project_ids_filter + if self.in_project_ids_filter: + _dict['inProjectIdsFilter'] = self.in_project_ids_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_grant_resource_owner_filter + if self.project_grant_resource_owner_filter: + _dict['projectGrantResourceOwnerFilter'] = self.project_grant_resource_owner_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_name_filter + if self.project_name_filter: + _dict['projectNameFilter'] = self.project_name_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_organization_id_filter + if self.project_organization_id_filter: + _dict['projectOrganizationIdFilter'] = self.project_organization_id_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of project_resource_owner_filter + if self.project_resource_owner_filter: + _dict['projectResourceOwnerFilter'] = self.project_resource_owner_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceProjectSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inProjectIdsFilter": BetaProjectServiceInIDsFilter.from_dict(obj["inProjectIdsFilter"]) if obj.get("inProjectIdsFilter") is not None else None, + "projectGrantResourceOwnerFilter": BetaProjectServiceIDFilter.from_dict(obj["projectGrantResourceOwnerFilter"]) if obj.get("projectGrantResourceOwnerFilter") is not None else None, + "projectNameFilter": BetaProjectServiceProjectNameFilter.from_dict(obj["projectNameFilter"]) if obj.get("projectNameFilter") is not None else None, + "projectOrganizationIdFilter": BetaProjectServiceIDFilter.from_dict(obj["projectOrganizationIdFilter"]) if obj.get("projectOrganizationIdFilter") is not None else None, + "projectResourceOwnerFilter": BetaProjectServiceIDFilter.from_dict(obj["projectResourceOwnerFilter"]) if obj.get("projectResourceOwnerFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_project_state.py b/zitadel_client/models/beta_project_service_project_state.py new file mode 100644 index 00000000..45bdc717 --- /dev/null +++ b/zitadel_client/models/beta_project_service_project_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServiceProjectState(str, Enum): + """ + BetaProjectServiceProjectState + """ + + """ + allowed enum values + """ + PROJECT_STATE_UNSPECIFIED = 'PROJECT_STATE_UNSPECIFIED' + PROJECT_STATE_ACTIVE = 'PROJECT_STATE_ACTIVE' + PROJECT_STATE_INACTIVE = 'PROJECT_STATE_INACTIVE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServiceProjectState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_remove_project_role_request.py b/zitadel_client/models/beta_project_service_remove_project_role_request.py new file mode 100644 index 00000000..0ee2cbac --- /dev/null +++ b/zitadel_client/models/beta_project_service_remove_project_role_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceRemoveProjectRoleRequest(BaseModel): + """ + BetaProjectServiceRemoveProjectRoleRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + role_key: StrictStr = Field(description="The key is the only relevant attribute for ZITADEL regarding the authorization checks.", alias="roleKey") + __properties: ClassVar[List[str]] = ["projectId", "roleKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceRemoveProjectRoleRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceRemoveProjectRoleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "roleKey": obj.get("roleKey") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_remove_project_role_response.py b/zitadel_client/models/beta_project_service_remove_project_role_response.py new file mode 100644 index 00000000..8dc4137f --- /dev/null +++ b/zitadel_client/models/beta_project_service_remove_project_role_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceRemoveProjectRoleResponse(BaseModel): + """ + BetaProjectServiceRemoveProjectRoleResponse + """ # noqa: E501 + removal_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="removalDate") + __properties: ClassVar[List[str]] = ["removalDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceRemoveProjectRoleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceRemoveProjectRoleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "removalDate": obj.get("removalDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_text_filter_method.py b/zitadel_client/models/beta_project_service_text_filter_method.py new file mode 100644 index 00000000..e97a61ee --- /dev/null +++ b/zitadel_client/models/beta_project_service_text_filter_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaProjectServiceTextFilterMethod(str, Enum): + """ + BetaProjectServiceTextFilterMethod + """ + + """ + allowed enum values + """ + TEXT_FILTER_METHOD_EQUALS = 'TEXT_FILTER_METHOD_EQUALS' + TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE = 'TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE' + TEXT_FILTER_METHOD_STARTS_WITH = 'TEXT_FILTER_METHOD_STARTS_WITH' + TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_FILTER_METHOD_CONTAINS = 'TEXT_FILTER_METHOD_CONTAINS' + TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE' + TEXT_FILTER_METHOD_ENDS_WITH = 'TEXT_FILTER_METHOD_ENDS_WITH' + TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaProjectServiceTextFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_project_service_update_project_grant_request.py b/zitadel_client/models/beta_project_service_update_project_grant_request.py new file mode 100644 index 00000000..47ed9f7a --- /dev/null +++ b/zitadel_client/models/beta_project_service_update_project_grant_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceUpdateProjectGrantRequest(BaseModel): + """ + BetaProjectServiceUpdateProjectGrantRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + granted_organization_id: StrictStr = Field(description="Organization the project is granted to.", alias="grantedOrganizationId") + role_keys: Optional[List[StrictStr]] = Field(default=None, description="Keys of the role available for the project grant.", alias="roleKeys") + __properties: ClassVar[List[str]] = ["projectId", "grantedOrganizationId", "roleKeys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectGrantRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectGrantRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "grantedOrganizationId": obj.get("grantedOrganizationId"), + "roleKeys": obj.get("roleKeys") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_update_project_grant_response.py b/zitadel_client/models/beta_project_service_update_project_grant_response.py new file mode 100644 index 00000000..b844328a --- /dev/null +++ b/zitadel_client/models/beta_project_service_update_project_grant_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceUpdateProjectGrantResponse(BaseModel): + """ + BetaProjectServiceUpdateProjectGrantResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectGrantResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectGrantResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_update_project_request.py b/zitadel_client/models/beta_project_service_update_project_request.py new file mode 100644 index 00000000..f443f267 --- /dev/null +++ b/zitadel_client/models/beta_project_service_update_project_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_project_service_private_labeling_setting import BetaProjectServicePrivateLabelingSetting +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceUpdateProjectRequest(BaseModel): + """ + BetaProjectServiceUpdateProjectRequest + """ # noqa: E501 + id: StrictStr + name: Optional[StrictStr] = Field(default=None, description="Name of the project.") + project_role_assertion: Optional[StrictBool] = Field(default=None, description="Enable this setting to have role information included in the user info endpoint. It is also dependent on your application settings to include it in tokens and other types.", alias="projectRoleAssertion") + project_role_check: Optional[StrictBool] = Field(default=None, description="When enabled ZITADEL will check if a user has a role of this project assigned when login into an application of this project.", alias="projectRoleCheck") + has_project_check: Optional[StrictBool] = Field(default=None, description="When enabled ZITADEL will check if the organization of the user, that is trying to log in, has a grant to this project.", alias="hasProjectCheck") + private_labeling_setting: Optional[BetaProjectServicePrivateLabelingSetting] = Field(default=None, alias="privateLabelingSetting") + __properties: ClassVar[List[str]] = ["id", "name", "projectRoleAssertion", "projectRoleCheck", "hasProjectCheck", "privateLabelingSetting"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if project_role_assertion (nullable) is None + # and model_fields_set contains the field + if self.project_role_assertion is None and "project_role_assertion" in self.model_fields_set: + _dict['projectRoleAssertion'] = None + + # set to None if project_role_check (nullable) is None + # and model_fields_set contains the field + if self.project_role_check is None and "project_role_check" in self.model_fields_set: + _dict['projectRoleCheck'] = None + + # set to None if has_project_check (nullable) is None + # and model_fields_set contains the field + if self.has_project_check is None and "has_project_check" in self.model_fields_set: + _dict['hasProjectCheck'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "projectRoleAssertion": obj.get("projectRoleAssertion"), + "projectRoleCheck": obj.get("projectRoleCheck"), + "hasProjectCheck": obj.get("hasProjectCheck"), + "privateLabelingSetting": obj.get("privateLabelingSetting") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_update_project_response.py b/zitadel_client/models/beta_project_service_update_project_response.py new file mode 100644 index 00000000..afca6892 --- /dev/null +++ b/zitadel_client/models/beta_project_service_update_project_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceUpdateProjectResponse(BaseModel): + """ + BetaProjectServiceUpdateProjectResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_update_project_role_request.py b/zitadel_client/models/beta_project_service_update_project_role_request.py new file mode 100644 index 00000000..13a858fc --- /dev/null +++ b/zitadel_client/models/beta_project_service_update_project_role_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceUpdateProjectRoleRequest(BaseModel): + """ + BetaProjectServiceUpdateProjectRoleRequest + """ # noqa: E501 + project_id: StrictStr = Field(description="ID of the project.", alias="projectId") + role_key: StrictStr = Field(description="The key is the only relevant attribute for ZITADEL regarding the authorization checks.", alias="roleKey") + display_name: Optional[StrictStr] = Field(description="Name displayed for the role.", alias="displayName") + group: Optional[StrictStr] = Field(default=None, description="The group is only used for display purposes. That you have better handling, like giving all the roles from a group to a user.") + __properties: ClassVar[List[str]] = ["projectId", "roleKey", "displayName", "group"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectRoleRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if group (nullable) is None + # and model_fields_set contains the field + if self.group is None and "group" in self.model_fields_set: + _dict['group'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectRoleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "roleKey": obj.get("roleKey"), + "displayName": obj.get("displayName"), + "group": obj.get("group") + }) + return _obj + + diff --git a/zitadel_client/models/beta_project_service_update_project_role_response.py b/zitadel_client/models/beta_project_service_update_project_role_response.py new file mode 100644 index 00000000..d4755df7 --- /dev/null +++ b/zitadel_client/models/beta_project_service_update_project_role_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaProjectServiceUpdateProjectRoleResponse(BaseModel): + """ + BetaProjectServiceUpdateProjectRoleResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectRoleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaProjectServiceUpdateProjectRoleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_any.py b/zitadel_client/models/beta_session_service_any.py new file mode 100644 index 00000000..dbfaa313 --- /dev/null +++ b/zitadel_client/models/beta_session_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_session_service_challenges.py b/zitadel_client/models/beta_session_service_challenges.py new file mode 100644 index 00000000..3e022d72 --- /dev/null +++ b/zitadel_client/models/beta_session_service_challenges.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_web_auth_n import BetaSessionServiceWebAuthN +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceChallenges(BaseModel): + """ + BetaSessionServiceChallenges + """ # noqa: E501 + web_auth_n: Optional[BetaSessionServiceWebAuthN] = Field(default=None, alias="webAuthN") + otp_sms: Optional[StrictStr] = Field(default=None, alias="otpSms") + otp_email: Optional[StrictStr] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["webAuthN", "otpSms", "otpEmail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceChallenges from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of web_auth_n + if self.web_auth_n: + _dict['webAuthN'] = self.web_auth_n.to_dict() + # set to None if otp_sms (nullable) is None + # and model_fields_set contains the field + if self.otp_sms is None and "otp_sms" in self.model_fields_set: + _dict['otpSms'] = None + + # set to None if otp_email (nullable) is None + # and model_fields_set contains the field + if self.otp_email is None and "otp_email" in self.model_fields_set: + _dict['otpEmail'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceChallenges from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "webAuthN": BetaSessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "otpSms": obj.get("otpSms"), + "otpEmail": obj.get("otpEmail") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_idp_intent.py b/zitadel_client/models/beta_session_service_check_idp_intent.py new file mode 100644 index 00000000..2ffe5e9d --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_idp_intent.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckIDPIntent(BaseModel): + """ + BetaSessionServiceCheckIDPIntent + """ # noqa: E501 + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckIDPIntent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckIDPIntent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), + "idpIntentToken": obj.get("idpIntentToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_otp.py b/zitadel_client/models/beta_session_service_check_otp.py new file mode 100644 index 00000000..b926879c --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_otp.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckOTP(BaseModel): + """ + BetaSessionServiceCheckOTP + """ # noqa: E501 + code: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckOTP from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckOTP from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_password.py b/zitadel_client/models/beta_session_service_check_password.py new file mode 100644 index 00000000..e38521fa --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_password.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckPassword(BaseModel): + """ + BetaSessionServiceCheckPassword + """ # noqa: E501 + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_totp.py b/zitadel_client/models/beta_session_service_check_totp.py new file mode 100644 index 00000000..bcb9631a --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_totp.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckTOTP(BaseModel): + """ + BetaSessionServiceCheckTOTP + """ # noqa: E501 + code: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckTOTP from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckTOTP from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_check_user.py b/zitadel_client/models/beta_session_service_check_user.py new file mode 100644 index 00000000..2c2e8d8a --- /dev/null +++ b/zitadel_client/models/beta_session_service_check_user.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCheckUser(BaseModel): + """ + BetaSessionServiceCheckUser + """ # noqa: E501 + login_name: Optional[StrictStr] = Field(default=None, alias="loginName") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["loginName", "userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCheckUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginName": obj.get("loginName"), + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_target_name_filter.py b/zitadel_client/models/beta_session_service_check_web_auth_n.py similarity index 70% rename from zitadel_client/models/action_service_beta_target_name_filter.py rename to zitadel_client/models/beta_session_service_check_web_auth_n.py index 20ed7475..b33565ad 100644 --- a/zitadel_client/models/action_service_beta_target_name_filter.py +++ b/zitadel_client/models/beta_session_service_check_web_auth_n.py @@ -18,18 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.action_service_beta_text_filter_method import ActionServiceBetaTextFilterMethod +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaTargetNameFilter(BaseModel): +class BetaSessionServiceCheckWebAuthN(BaseModel): """ - ActionServiceBetaTargetNameFilter + BetaSessionServiceCheckWebAuthN """ # noqa: E501 - target_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="Defines the name of the target to query for.", alias="targetName") - method: Optional[ActionServiceBetaTextFilterMethod] = ActionServiceBetaTextFilterMethod.TEXT_FILTER_METHOD_EQUALS + credential_assertion_data: Dict[str, Any] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="credentialAssertionData") + __properties: ClassVar[List[str]] = ["credentialAssertionData"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetNameFilter from a JSON string""" + """Create an instance of BetaSessionServiceCheckWebAuthN from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaTargetNameFilter from a dict""" + """Create an instance of BetaSessionServiceCheckWebAuthN from a dict""" if obj is None: return None @@ -82,8 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "targetName": obj.get("targetName"), - "method": obj.get("method") if obj.get("method") is not None else ActionServiceBetaTextFilterMethod.TEXT_FILTER_METHOD_EQUALS + "credentialAssertionData": obj.get("credentialAssertionData") }) return _obj diff --git a/zitadel_client/models/beta_session_service_checks.py b/zitadel_client/models/beta_session_service_checks.py new file mode 100644 index 00000000..ceebf812 --- /dev/null +++ b/zitadel_client/models/beta_session_service_checks.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_check_idp_intent import BetaSessionServiceCheckIDPIntent +from zitadel_client.models.beta_session_service_check_otp import BetaSessionServiceCheckOTP +from zitadel_client.models.beta_session_service_check_password import BetaSessionServiceCheckPassword +from zitadel_client.models.beta_session_service_check_totp import BetaSessionServiceCheckTOTP +from zitadel_client.models.beta_session_service_check_user import BetaSessionServiceCheckUser +from zitadel_client.models.beta_session_service_check_web_auth_n import BetaSessionServiceCheckWebAuthN +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceChecks(BaseModel): + """ + BetaSessionServiceChecks + """ # noqa: E501 + user: Optional[BetaSessionServiceCheckUser] = None + password: Optional[BetaSessionServiceCheckPassword] = None + web_auth_n: Optional[BetaSessionServiceCheckWebAuthN] = Field(default=None, alias="webAuthN") + idp_intent: Optional[BetaSessionServiceCheckIDPIntent] = Field(default=None, alias="idpIntent") + totp: Optional[BetaSessionServiceCheckTOTP] = None + otp_sms: Optional[BetaSessionServiceCheckOTP] = Field(default=None, alias="otpSms") + otp_email: Optional[BetaSessionServiceCheckOTP] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["user", "password", "webAuthN", "idpIntent", "totp", "otpSms", "otpEmail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceChecks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # override the default output from pydantic by calling `to_dict()` of web_auth_n + if self.web_auth_n: + _dict['webAuthN'] = self.web_auth_n.to_dict() + # override the default output from pydantic by calling `to_dict()` of idp_intent + if self.idp_intent: + _dict['idpIntent'] = self.idp_intent.to_dict() + # override the default output from pydantic by calling `to_dict()` of totp + if self.totp: + _dict['totp'] = self.totp.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_sms + if self.otp_sms: + _dict['otpSms'] = self.otp_sms.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_email + if self.otp_email: + _dict['otpEmail'] = self.otp_email.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceChecks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": BetaSessionServiceCheckUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "password": BetaSessionServiceCheckPassword.from_dict(obj["password"]) if obj.get("password") is not None else None, + "webAuthN": BetaSessionServiceCheckWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "idpIntent": BetaSessionServiceCheckIDPIntent.from_dict(obj["idpIntent"]) if obj.get("idpIntent") is not None else None, + "totp": BetaSessionServiceCheckTOTP.from_dict(obj["totp"]) if obj.get("totp") is not None else None, + "otpSms": BetaSessionServiceCheckOTP.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": BetaSessionServiceCheckOTP.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_connect_error.py b/zitadel_client/models/beta_session_service_connect_error.py new file mode 100644 index 00000000..58afc25d --- /dev/null +++ b/zitadel_client/models/beta_session_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_session_service_any import BetaSessionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaSessionServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaSessionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_session_service_create_session_request.py b/zitadel_client/models/beta_session_service_create_session_request.py new file mode 100644 index 00000000..e05541c2 --- /dev/null +++ b/zitadel_client/models/beta_session_service_create_session_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_session_service_checks import BetaSessionServiceChecks +from zitadel_client.models.beta_session_service_request_challenges import BetaSessionServiceRequestChallenges +from zitadel_client.models.beta_session_service_user_agent import BetaSessionServiceUserAgent +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCreateSessionRequest(BaseModel): + """ + BetaSessionServiceCreateSessionRequest + """ # noqa: E501 + checks: Optional[BetaSessionServiceChecks] = None + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None + challenges: Optional[BetaSessionServiceRequestChallenges] = None + user_agent: Optional[BetaSessionServiceUserAgent] = Field(default=None, alias="userAgent") + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + __properties: ClassVar[List[str]] = ["checks", "metadata", "challenges", "userAgent", "lifetime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of checks + if self.checks: + _dict['checks'] = self.checks.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_agent + if self.user_agent: + _dict['userAgent'] = self.user_agent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checks": BetaSessionServiceChecks.from_dict(obj["checks"]) if obj.get("checks") is not None else None, + "metadata": obj.get("metadata"), + "challenges": BetaSessionServiceRequestChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None, + "userAgent": BetaSessionServiceUserAgent.from_dict(obj["userAgent"]) if obj.get("userAgent") is not None else None, + "lifetime": obj.get("lifetime") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_create_session_response.py b/zitadel_client/models/beta_session_service_create_session_response.py new file mode 100644 index 00000000..f39ce444 --- /dev/null +++ b/zitadel_client/models/beta_session_service_create_session_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_challenges import BetaSessionServiceChallenges +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCreateSessionResponse(BaseModel): + """ + BetaSessionServiceCreateSessionResponse + """ # noqa: E501 + details: Optional[BetaSessionServiceDetails] = None + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + challenges: Optional[BetaSessionServiceChallenges] = None + __properties: ClassVar[List[str]] = ["details", "sessionId", "sessionToken", "challenges"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreateSessionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSessionServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken"), + "challenges": BetaSessionServiceChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_creation_date_query.py b/zitadel_client/models/beta_session_service_creation_date_query.py new file mode 100644 index 00000000..b21c2909 --- /dev/null +++ b/zitadel_client/models/beta_session_service_creation_date_query.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_timestamp_query_method import BetaSessionServiceTimestampQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceCreationDateQuery(BaseModel): + """ + BetaSessionServiceCreationDateQuery + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + method: Optional[BetaSessionServiceTimestampQueryMethod] = None + __properties: ClassVar[List[str]] = ["creationDate", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreationDateQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceCreationDateQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_delete_session_request.py b/zitadel_client/models/beta_session_service_delete_session_request.py new file mode 100644 index 00000000..c098d5ff --- /dev/null +++ b/zitadel_client/models/beta_session_service_delete_session_request.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceDeleteSessionRequest(BaseModel): + """ + BetaSessionServiceDeleteSessionRequest + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_delete_session_response.py b/zitadel_client/models/beta_session_service_delete_session_response.py new file mode 100644 index 00000000..10543f04 --- /dev/null +++ b/zitadel_client/models/beta_session_service_delete_session_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceDeleteSessionResponse(BaseModel): + """ + BetaSessionServiceDeleteSessionResponse + """ # noqa: E501 + details: Optional[BetaSessionServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceDeleteSessionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSessionServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_details.py b/zitadel_client/models/beta_session_service_details.py new file mode 100644 index 00000000..e523f0b0 --- /dev/null +++ b/zitadel_client/models/beta_session_service_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceDetails(BaseModel): + """ + BetaSessionServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_factors.py b/zitadel_client/models/beta_session_service_factors.py new file mode 100644 index 00000000..044d7b7d --- /dev/null +++ b/zitadel_client/models/beta_session_service_factors.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_intent_factor import BetaSessionServiceIntentFactor +from zitadel_client.models.beta_session_service_otp_factor import BetaSessionServiceOTPFactor +from zitadel_client.models.beta_session_service_password_factor import BetaSessionServicePasswordFactor +from zitadel_client.models.beta_session_service_totp_factor import BetaSessionServiceTOTPFactor +from zitadel_client.models.beta_session_service_user_factor import BetaSessionServiceUserFactor +from zitadel_client.models.beta_session_service_web_auth_n_factor import BetaSessionServiceWebAuthNFactor +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceFactors(BaseModel): + """ + BetaSessionServiceFactors + """ # noqa: E501 + user: Optional[BetaSessionServiceUserFactor] = None + password: Optional[BetaSessionServicePasswordFactor] = None + web_auth_n: Optional[BetaSessionServiceWebAuthNFactor] = Field(default=None, alias="webAuthN") + intent: Optional[BetaSessionServiceIntentFactor] = None + totp: Optional[BetaSessionServiceTOTPFactor] = None + otp_sms: Optional[BetaSessionServiceOTPFactor] = Field(default=None, alias="otpSms") + otp_email: Optional[BetaSessionServiceOTPFactor] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["user", "password", "webAuthN", "intent", "totp", "otpSms", "otpEmail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceFactors from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # override the default output from pydantic by calling `to_dict()` of web_auth_n + if self.web_auth_n: + _dict['webAuthN'] = self.web_auth_n.to_dict() + # override the default output from pydantic by calling `to_dict()` of intent + if self.intent: + _dict['intent'] = self.intent.to_dict() + # override the default output from pydantic by calling `to_dict()` of totp + if self.totp: + _dict['totp'] = self.totp.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_sms + if self.otp_sms: + _dict['otpSms'] = self.otp_sms.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_email + if self.otp_email: + _dict['otpEmail'] = self.otp_email.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceFactors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": BetaSessionServiceUserFactor.from_dict(obj["user"]) if obj.get("user") is not None else None, + "password": BetaSessionServicePasswordFactor.from_dict(obj["password"]) if obj.get("password") is not None else None, + "webAuthN": BetaSessionServiceWebAuthNFactor.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "intent": BetaSessionServiceIntentFactor.from_dict(obj["intent"]) if obj.get("intent") is not None else None, + "totp": BetaSessionServiceTOTPFactor.from_dict(obj["totp"]) if obj.get("totp") is not None else None, + "otpSms": BetaSessionServiceOTPFactor.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": BetaSessionServiceOTPFactor.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_get_session_request.py b/zitadel_client/models/beta_session_service_get_session_request.py new file mode 100644 index 00000000..48e00893 --- /dev/null +++ b/zitadel_client/models/beta_session_service_get_session_request.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceGetSessionRequest(BaseModel): + """ + BetaSessionServiceGetSessionRequest + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_get_session_response.py b/zitadel_client/models/beta_session_service_get_session_response.py new file mode 100644 index 00000000..55100257 --- /dev/null +++ b/zitadel_client/models/beta_session_service_get_session_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_session import BetaSessionServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceGetSessionResponse(BaseModel): + """ + BetaSessionServiceGetSessionResponse + """ # noqa: E501 + session: Optional[BetaSessionServiceSession] = None + __properties: ClassVar[List[str]] = ["session"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceGetSessionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "session": BetaSessionServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_header_values.py b/zitadel_client/models/beta_session_service_header_values.py new file mode 100644 index 00000000..b8f9dcb8 --- /dev/null +++ b/zitadel_client/models/beta_session_service_header_values.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceHeaderValues(BaseModel): + """ + A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme. + """ # noqa: E501 + values: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceHeaderValues from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceHeaderValues from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "values": obj.get("values") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_ids_query.py b/zitadel_client/models/beta_session_service_ids_query.py new file mode 100644 index 00000000..b785c324 --- /dev/null +++ b/zitadel_client/models/beta_session_service_ids_query.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceIDsQuery(BaseModel): + """ + BetaSessionServiceIDsQuery + """ # noqa: E501 + ids: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceIDsQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceIDsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ids": obj.get("ids") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_intent_factor.py b/zitadel_client/models/beta_session_service_intent_factor.py new file mode 100644 index 00000000..a4ae1245 --- /dev/null +++ b/zitadel_client/models/beta_session_service_intent_factor.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceIntentFactor(BaseModel): + """ + BetaSessionServiceIntentFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceIntentFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceIntentFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_details.py b/zitadel_client/models/beta_session_service_list_details.py new file mode 100644 index 00000000..66d4dde7 --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_details.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListDetails(BaseModel): + """ + BetaSessionServiceListDetails + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "processedSequence": obj.get("processedSequence"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_query.py b/zitadel_client/models/beta_session_service_list_query.py new file mode 100644 index 00000000..d662ef8c --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_query.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListQuery(BaseModel): + """ + BetaSessionServiceListQuery + """ # noqa: E501 + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_sessions_request.py b/zitadel_client/models/beta_session_service_list_sessions_request.py new file mode 100644 index 00000000..6450c324 --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_sessions_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_session_service_list_query import BetaSessionServiceListQuery +from zitadel_client.models.beta_session_service_search_query import BetaSessionServiceSearchQuery +from zitadel_client.models.beta_session_service_session_field_name import BetaSessionServiceSessionFieldName +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListSessionsRequest(BaseModel): + """ + BetaSessionServiceListSessionsRequest + """ # noqa: E501 + query: Optional[BetaSessionServiceListQuery] = None + queries: Optional[List[BetaSessionServiceSearchQuery]] = None + sorting_column: Optional[BetaSessionServiceSessionFieldName] = Field(default=None, alias="sortingColumn") + __properties: ClassVar[List[str]] = ["query", "queries", "sortingColumn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) + _items = [] + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "query": BetaSessionServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, + "queries": [BetaSessionServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None, + "sortingColumn": obj.get("sortingColumn") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_list_sessions_response.py b/zitadel_client/models/beta_session_service_list_sessions_response.py new file mode 100644 index 00000000..4f48535c --- /dev/null +++ b/zitadel_client/models/beta_session_service_list_sessions_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_session_service_list_details import BetaSessionServiceListDetails +from zitadel_client.models.beta_session_service_session import BetaSessionServiceSession +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceListSessionsResponse(BaseModel): + """ + BetaSessionServiceListSessionsResponse + """ # noqa: E501 + details: Optional[BetaSessionServiceListDetails] = None + sessions: Optional[List[BetaSessionServiceSession]] = None + __properties: ClassVar[List[str]] = ["details", "sessions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in sessions (list) + _items = [] + if self.sessions: + for _item_sessions in self.sessions: + if _item_sessions: + _items.append(_item_sessions.to_dict()) + _dict['sessions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceListSessionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSessionServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sessions": [BetaSessionServiceSession.from_dict(_item) for _item in obj["sessions"]] if obj.get("sessions") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_otp_email.py b/zitadel_client/models/beta_session_service_otp_email.py new file mode 100644 index 00000000..8682dfd3 --- /dev/null +++ b/zitadel_client/models/beta_session_service_otp_email.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_send_code import BetaSessionServiceSendCode +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceOTPEmail(BaseModel): + """ + BetaSessionServiceOTPEmail + """ # noqa: E501 + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[BetaSessionServiceSendCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["returnCode", "sendCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceOTPEmail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceOTPEmail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode"), + "sendCode": BetaSessionServiceSendCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_otp_factor.py b/zitadel_client/models/beta_session_service_otp_factor.py new file mode 100644 index 00000000..4b451cf6 --- /dev/null +++ b/zitadel_client/models/beta_session_service_otp_factor.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceOTPFactor(BaseModel): + """ + BetaSessionServiceOTPFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceOTPFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceOTPFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_request_challenges_otpsms.py b/zitadel_client/models/beta_session_service_otpsms.py similarity index 87% rename from zitadel_client/models/session_service_request_challenges_otpsms.py rename to zitadel_client/models/beta_session_service_otpsms.py index 1d969cd5..9b0a62d1 100644 --- a/zitadel_client/models/session_service_request_challenges_otpsms.py +++ b/zitadel_client/models/beta_session_service_otpsms.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class SessionServiceRequestChallengesOTPSMS(BaseModel): +class BetaSessionServiceOTPSMS(BaseModel): """ - SessionServiceRequestChallengesOTPSMS + BetaSessionServiceOTPSMS """ # noqa: E501 return_code: Optional[StrictBool] = Field(default=None, alias="returnCode") + __properties: ClassVar[List[str]] = ["returnCode"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPSMS from a JSON string""" + """Create an instance of BetaSessionServiceOTPSMS from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPSMS from a dict""" + """Create an instance of BetaSessionServiceOTPSMS from a dict""" if obj is None: return None diff --git a/zitadel_client/models/beta_session_service_password_factor.py b/zitadel_client/models/beta_session_service_password_factor.py new file mode 100644 index 00000000..c7aba1f8 --- /dev/null +++ b/zitadel_client/models/beta_session_service_password_factor.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServicePasswordFactor(BaseModel): + """ + BetaSessionServicePasswordFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServicePasswordFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServicePasswordFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_request_challenges.py b/zitadel_client/models/beta_session_service_request_challenges.py new file mode 100644 index 00000000..03004a16 --- /dev/null +++ b/zitadel_client/models/beta_session_service_request_challenges.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_otp_email import BetaSessionServiceOTPEmail +from zitadel_client.models.beta_session_service_otpsms import BetaSessionServiceOTPSMS +from zitadel_client.models.beta_session_service_web_auth_n import BetaSessionServiceWebAuthN +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceRequestChallenges(BaseModel): + """ + BetaSessionServiceRequestChallenges + """ # noqa: E501 + web_auth_n: Optional[BetaSessionServiceWebAuthN] = Field(default=None, alias="webAuthN") + otp_sms: Optional[BetaSessionServiceOTPSMS] = Field(default=None, alias="otpSms") + otp_email: Optional[BetaSessionServiceOTPEmail] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["webAuthN", "otpSms", "otpEmail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceRequestChallenges from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of web_auth_n + if self.web_auth_n: + _dict['webAuthN'] = self.web_auth_n.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_sms + if self.otp_sms: + _dict['otpSms'] = self.otp_sms.to_dict() + # override the default output from pydantic by calling `to_dict()` of otp_email + if self.otp_email: + _dict['otpEmail'] = self.otp_email.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceRequestChallenges from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "webAuthN": BetaSessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "otpSms": BetaSessionServiceOTPSMS.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": BetaSessionServiceOTPEmail.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_search_query.py b/zitadel_client/models/beta_session_service_search_query.py new file mode 100644 index 00000000..7967aafa --- /dev/null +++ b/zitadel_client/models/beta_session_service_search_query.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_creation_date_query import BetaSessionServiceCreationDateQuery +from zitadel_client.models.beta_session_service_ids_query import BetaSessionServiceIDsQuery +from zitadel_client.models.beta_session_service_user_id_query import BetaSessionServiceUserIDQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSearchQuery(BaseModel): + """ + BetaSessionServiceSearchQuery + """ # noqa: E501 + creation_date_query: Optional[BetaSessionServiceCreationDateQuery] = Field(default=None, alias="creationDateQuery") + ids_query: Optional[BetaSessionServiceIDsQuery] = Field(default=None, alias="idsQuery") + user_id_query: Optional[BetaSessionServiceUserIDQuery] = Field(default=None, alias="userIdQuery") + __properties: ClassVar[List[str]] = ["creationDateQuery", "idsQuery", "userIdQuery"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSearchQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of creation_date_query + if self.creation_date_query: + _dict['creationDateQuery'] = self.creation_date_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of ids_query + if self.ids_query: + _dict['idsQuery'] = self.ids_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_id_query + if self.user_id_query: + _dict['userIdQuery'] = self.user_id_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSearchQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDateQuery": BetaSessionServiceCreationDateQuery.from_dict(obj["creationDateQuery"]) if obj.get("creationDateQuery") is not None else None, + "idsQuery": BetaSessionServiceIDsQuery.from_dict(obj["idsQuery"]) if obj.get("idsQuery") is not None else None, + "userIdQuery": BetaSessionServiceUserIDQuery.from_dict(obj["userIdQuery"]) if obj.get("userIdQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_send_code.py b/zitadel_client/models/beta_session_service_send_code.py new file mode 100644 index 00000000..272627c8 --- /dev/null +++ b/zitadel_client/models/beta_session_service_send_code.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSendCode(BaseModel): + """ + BetaSessionServiceSendCode + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSendCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSendCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_session.py b/zitadel_client/models/beta_session_service_session.py new file mode 100644 index 00000000..cf95f8b5 --- /dev/null +++ b/zitadel_client/models/beta_session_service_session.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_session_service_factors import BetaSessionServiceFactors +from zitadel_client.models.beta_session_service_user_agent import BetaSessionServiceUserAgent +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSession(BaseModel): + """ + BetaSessionServiceSession + """ # noqa: E501 + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + sequence: Optional[Any] = None + factors: Optional[BetaSessionServiceFactors] = None + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None + user_agent: Optional[BetaSessionServiceUserAgent] = Field(default=None, alias="userAgent") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "sequence", "factors", "metadata", "userAgent", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of factors + if self.factors: + _dict['factors'] = self.factors.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_agent + if self.user_agent: + _dict['userAgent'] = self.user_agent.to_dict() + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "sequence": obj.get("sequence"), + "factors": BetaSessionServiceFactors.from_dict(obj["factors"]) if obj.get("factors") is not None else None, + "metadata": obj.get("metadata"), + "userAgent": BetaSessionServiceUserAgent.from_dict(obj["userAgent"]) if obj.get("userAgent") is not None else None, + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_session_field_name.py b/zitadel_client/models/beta_session_service_session_field_name.py new file mode 100644 index 00000000..b505a861 --- /dev/null +++ b/zitadel_client/models/beta_session_service_session_field_name.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSessionServiceSessionFieldName(str, Enum): + """ + BetaSessionServiceSessionFieldName + """ + + """ + allowed enum values + """ + SESSION_FIELD_NAME_UNSPECIFIED = 'SESSION_FIELD_NAME_UNSPECIFIED' + SESSION_FIELD_NAME_CREATION_DATE = 'SESSION_FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSessionServiceSessionFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_session_service_set_session_request.py b/zitadel_client/models/beta_session_service_set_session_request.py new file mode 100644 index 00000000..511ed24c --- /dev/null +++ b/zitadel_client/models/beta_session_service_set_session_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_session_service_checks import BetaSessionServiceChecks +from zitadel_client.models.beta_session_service_request_challenges import BetaSessionServiceRequestChallenges +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSetSessionRequest(BaseModel): + """ + BetaSessionServiceSetSessionRequest + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + checks: Optional[BetaSessionServiceChecks] = None + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None + challenges: Optional[BetaSessionServiceRequestChallenges] = None + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken", "checks", "metadata", "challenges", "lifetime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSetSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of checks + if self.checks: + _dict['checks'] = self.checks.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSetSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken"), + "checks": BetaSessionServiceChecks.from_dict(obj["checks"]) if obj.get("checks") is not None else None, + "metadata": obj.get("metadata"), + "challenges": BetaSessionServiceRequestChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None, + "lifetime": obj.get("lifetime") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_set_session_response.py b/zitadel_client/models/beta_session_service_set_session_response.py new file mode 100644 index 00000000..dd7139d1 --- /dev/null +++ b/zitadel_client/models/beta_session_service_set_session_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_challenges import BetaSessionServiceChallenges +from zitadel_client.models.beta_session_service_details import BetaSessionServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceSetSessionResponse(BaseModel): + """ + BetaSessionServiceSetSessionResponse + """ # noqa: E501 + details: Optional[BetaSessionServiceDetails] = None + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + challenges: Optional[BetaSessionServiceChallenges] = None + __properties: ClassVar[List[str]] = ["details", "sessionToken", "challenges"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceSetSessionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of challenges + if self.challenges: + _dict['challenges'] = self.challenges.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceSetSessionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSessionServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sessionToken": obj.get("sessionToken"), + "challenges": BetaSessionServiceChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_timestamp_query_method.py b/zitadel_client/models/beta_session_service_timestamp_query_method.py new file mode 100644 index 00000000..ec32c4d4 --- /dev/null +++ b/zitadel_client/models/beta_session_service_timestamp_query_method.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSessionServiceTimestampQueryMethod(str, Enum): + """ + BetaSessionServiceTimestampQueryMethod + """ + + """ + allowed enum values + """ + TIMESTAMP_QUERY_METHOD_EQUALS = 'TIMESTAMP_QUERY_METHOD_EQUALS' + TIMESTAMP_QUERY_METHOD_GREATER = 'TIMESTAMP_QUERY_METHOD_GREATER' + TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS = 'TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS' + TIMESTAMP_QUERY_METHOD_LESS = 'TIMESTAMP_QUERY_METHOD_LESS' + TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS = 'TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSessionServiceTimestampQueryMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_session_service_totp_factor.py b/zitadel_client/models/beta_session_service_totp_factor.py new file mode 100644 index 00000000..aa2556df --- /dev/null +++ b/zitadel_client/models/beta_session_service_totp_factor.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceTOTPFactor(BaseModel): + """ + BetaSessionServiceTOTPFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceTOTPFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceTOTPFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_agent.py b/zitadel_client/models/beta_session_service_user_agent.py new file mode 100644 index 00000000..83f0823a --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_agent.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_session_service_header_values import BetaSessionServiceHeaderValues +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceUserAgent(BaseModel): + """ + BetaSessionServiceUserAgent + """ # noqa: E501 + fingerprint_id: Optional[StrictStr] = Field(default=None, alias="fingerprintId") + ip: Optional[StrictStr] = None + description: Optional[StrictStr] = None + header: Optional[Dict[str, BetaSessionServiceHeaderValues]] = None + __properties: ClassVar[List[str]] = ["fingerprintId", "ip", "description", "header"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserAgent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in header (dict) + _field_dict = {} + if self.header: + for _key_header in self.header: + if self.header[_key_header]: + _field_dict[_key_header] = self.header[_key_header].to_dict() + _dict['header'] = _field_dict + # set to None if fingerprint_id (nullable) is None + # and model_fields_set contains the field + if self.fingerprint_id is None and "fingerprint_id" in self.model_fields_set: + _dict['fingerprintId'] = None + + # set to None if ip (nullable) is None + # and model_fields_set contains the field + if self.ip is None and "ip" in self.model_fields_set: + _dict['ip'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserAgent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fingerprintId": obj.get("fingerprintId"), + "ip": obj.get("ip"), + "description": obj.get("description"), + "header": dict( + (_k, BetaSessionServiceHeaderValues.from_dict(_v)) + for _k, _v in obj["header"].items() + ) + if obj.get("header") is not None + else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_factor.py b/zitadel_client/models/beta_session_service_user_factor.py new file mode 100644 index 00000000..589cefc7 --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_factor.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceUserFactor(BaseModel): + """ + BetaSessionServiceUserFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + id: Optional[StrictStr] = None + login_name: Optional[StrictStr] = Field(default=None, alias="loginName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["verifiedAt", "id", "loginName", "displayName", "organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt"), + "id": obj.get("id"), + "loginName": obj.get("loginName"), + "displayName": obj.get("displayName"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_id_query.py b/zitadel_client/models/beta_session_service_user_id_query.py new file mode 100644 index 00000000..22ab6218 --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_id_query.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceUserIDQuery(BaseModel): + """ + BetaSessionServiceUserIDQuery + """ # noqa: E501 + id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserIDQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceUserIDQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_user_verification_requirement.py b/zitadel_client/models/beta_session_service_user_verification_requirement.py new file mode 100644 index 00000000..85911e47 --- /dev/null +++ b/zitadel_client/models/beta_session_service_user_verification_requirement.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSessionServiceUserVerificationRequirement(str, Enum): + """ + BetaSessionServiceUserVerificationRequirement + """ + + """ + allowed enum values + """ + USER_VERIFICATION_REQUIREMENT_UNSPECIFIED = 'USER_VERIFICATION_REQUIREMENT_UNSPECIFIED' + USER_VERIFICATION_REQUIREMENT_REQUIRED = 'USER_VERIFICATION_REQUIREMENT_REQUIRED' + USER_VERIFICATION_REQUIREMENT_PREFERRED = 'USER_VERIFICATION_REQUIREMENT_PREFERRED' + USER_VERIFICATION_REQUIREMENT_DISCOURAGED = 'USER_VERIFICATION_REQUIREMENT_DISCOURAGED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSessionServiceUserVerificationRequirement from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_session_service_web_auth_n.py b/zitadel_client/models/beta_session_service_web_auth_n.py new file mode 100644 index 00000000..75f40072 --- /dev/null +++ b/zitadel_client/models/beta_session_service_web_auth_n.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from zitadel_client.models.beta_session_service_user_verification_requirement import BetaSessionServiceUserVerificationRequirement +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceWebAuthN(BaseModel): + """ + BetaSessionServiceWebAuthN + """ # noqa: E501 + domain: StrictStr + user_verification_requirement: BetaSessionServiceUserVerificationRequirement = Field(alias="userVerificationRequirement") + __properties: ClassVar[List[str]] = ["domain", "userVerificationRequirement"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthN from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthN from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "userVerificationRequirement": obj.get("userVerificationRequirement") + }) + return _obj + + diff --git a/zitadel_client/models/beta_session_service_web_auth_n_factor.py b/zitadel_client/models/beta_session_service_web_auth_n_factor.py new file mode 100644 index 00000000..1a304427 --- /dev/null +++ b/zitadel_client/models/beta_session_service_web_auth_n_factor.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSessionServiceWebAuthNFactor(BaseModel): + """ + BetaSessionServiceWebAuthNFactor + """ # noqa: E501 + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + user_verified: Optional[StrictBool] = Field(default=None, alias="userVerified") + __properties: ClassVar[List[str]] = ["verifiedAt", "userVerified"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthNFactor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSessionServiceWebAuthNFactor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verifiedAt": obj.get("verifiedAt"), + "userVerified": obj.get("userVerified") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_any.py b/zitadel_client/models/beta_settings_service_any.py new file mode 100644 index 00000000..69b7e94d --- /dev/null +++ b/zitadel_client/models/beta_settings_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_branding_settings.py b/zitadel_client/models/beta_settings_service_branding_settings.py new file mode 100644 index 00000000..acd22f2d --- /dev/null +++ b/zitadel_client/models/beta_settings_service_branding_settings.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from zitadel_client.models.beta_settings_service_theme import BetaSettingsServiceTheme +from zitadel_client.models.beta_settings_service_theme_mode import BetaSettingsServiceThemeMode +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceBrandingSettings(BaseModel): + """ + BetaSettingsServiceBrandingSettings + """ # noqa: E501 + light_theme: Optional[BetaSettingsServiceTheme] = Field(default=None, alias="lightTheme") + dark_theme: Optional[BetaSettingsServiceTheme] = Field(default=None, alias="darkTheme") + font_url: Optional[StrictStr] = Field(default=None, alias="fontUrl") + hide_login_name_suffix: Optional[StrictBool] = Field(default=None, description="hides the org suffix on the login form if the scope \\\"urn:zitadel:iam:org:domain:primary:{domainname}\\\" is set", alias="hideLoginNameSuffix") + disable_watermark: Optional[StrictBool] = Field(default=None, alias="disableWatermark") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + theme_mode: Optional[BetaSettingsServiceThemeMode] = Field(default=None, alias="themeMode") + __properties: ClassVar[List[str]] = ["lightTheme", "darkTheme", "fontUrl", "hideLoginNameSuffix", "disableWatermark", "resourceOwnerType", "themeMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceBrandingSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of light_theme + if self.light_theme: + _dict['lightTheme'] = self.light_theme.to_dict() + # override the default output from pydantic by calling `to_dict()` of dark_theme + if self.dark_theme: + _dict['darkTheme'] = self.dark_theme.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceBrandingSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lightTheme": BetaSettingsServiceTheme.from_dict(obj["lightTheme"]) if obj.get("lightTheme") is not None else None, + "darkTheme": BetaSettingsServiceTheme.from_dict(obj["darkTheme"]) if obj.get("darkTheme") is not None else None, + "fontUrl": obj.get("fontUrl"), + "hideLoginNameSuffix": obj.get("hideLoginNameSuffix"), + "disableWatermark": obj.get("disableWatermark"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "themeMode": obj.get("themeMode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_connect_error.py b/zitadel_client/models/beta_settings_service_connect_error.py new file mode 100644 index 00000000..d30f7fab --- /dev/null +++ b/zitadel_client/models/beta_settings_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_settings_service_any import BetaSettingsServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaSettingsServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaSettingsServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_details.py b/zitadel_client/models/beta_settings_service_details.py new file mode 100644 index 00000000..fb17cee9 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceDetails(BaseModel): + """ + BetaSettingsServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_domain_settings.py b/zitadel_client/models/beta_settings_service_domain_settings.py new file mode 100644 index 00000000..d690851b --- /dev/null +++ b/zitadel_client/models/beta_settings_service_domain_settings.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceDomainSettings(BaseModel): + """ + BetaSettingsServiceDomainSettings + """ # noqa: E501 + login_name_includes_domain: Optional[StrictBool] = Field(default=None, alias="loginNameIncludesDomain") + require_org_domain_verification: Optional[StrictBool] = Field(default=None, alias="requireOrgDomainVerification") + smtp_sender_address_matches_instance_domain: Optional[StrictBool] = Field(default=None, alias="smtpSenderAddressMatchesInstanceDomain") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + __properties: ClassVar[List[str]] = ["loginNameIncludesDomain", "requireOrgDomainVerification", "smtpSenderAddressMatchesInstanceDomain", "resourceOwnerType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceDomainSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceDomainSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginNameIncludesDomain": obj.get("loginNameIncludesDomain"), + "requireOrgDomainVerification": obj.get("requireOrgDomainVerification"), + "smtpSenderAddressMatchesInstanceDomain": obj.get("smtpSenderAddressMatchesInstanceDomain"), + "resourceOwnerType": obj.get("resourceOwnerType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_embedded_iframe_settings.py b/zitadel_client/models/beta_settings_service_embedded_iframe_settings.py new file mode 100644 index 00000000..2029fd43 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_embedded_iframe_settings.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceEmbeddedIframeSettings(BaseModel): + """ + BetaSettingsServiceEmbeddedIframeSettings + """ # noqa: E501 + enabled: Optional[StrictBool] = None + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") + __properties: ClassVar[List[str]] = ["enabled", "allowedOrigins"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceEmbeddedIframeSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceEmbeddedIframeSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "allowedOrigins": obj.get("allowedOrigins") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_active_identity_providers_request.py b/zitadel_client/models/beta_settings_service_get_active_identity_providers_request.py new file mode 100644 index 00000000..9077b557 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_active_identity_providers_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetActiveIdentityProvidersRequest(BaseModel): + """ + BetaSettingsServiceGetActiveIdentityProvidersRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_active_identity_providers_response.py b/zitadel_client/models/beta_settings_service_get_active_identity_providers_response.py new file mode 100644 index 00000000..b0c3fd60 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_active_identity_providers_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_settings_service_identity_provider import BetaSettingsServiceIdentityProvider +from zitadel_client.models.beta_settings_service_list_details import BetaSettingsServiceListDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetActiveIdentityProvidersResponse(BaseModel): + """ + BetaSettingsServiceGetActiveIdentityProvidersResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceListDetails] = None + identity_providers: Optional[List[BetaSettingsServiceIdentityProvider]] = Field(default=None, alias="identityProviders") + __properties: ClassVar[List[str]] = ["details", "identityProviders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in identity_providers (list) + _items = [] + if self.identity_providers: + for _item_identity_providers in self.identity_providers: + if _item_identity_providers: + _items.append(_item_identity_providers.to_dict()) + _dict['identityProviders'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetActiveIdentityProvidersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "identityProviders": [BetaSettingsServiceIdentityProvider.from_dict(_item) for _item in obj["identityProviders"]] if obj.get("identityProviders") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_branding_settings_request.py b/zitadel_client/models/beta_settings_service_get_branding_settings_request.py new file mode 100644 index 00000000..fa571aec --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_branding_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetBrandingSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetBrandingSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_branding_settings_response.py b/zitadel_client/models/beta_settings_service_get_branding_settings_response.py new file mode 100644 index 00000000..413bf187 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_branding_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_branding_settings import BetaSettingsServiceBrandingSettings +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetBrandingSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetBrandingSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceBrandingSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetBrandingSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceBrandingSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_domain_settings_request.py b/zitadel_client/models/beta_settings_service_get_domain_settings_request.py new file mode 100644 index 00000000..814f84af --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_domain_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetDomainSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetDomainSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_domain_settings_response.py b/zitadel_client/models/beta_settings_service_get_domain_settings_response.py new file mode 100644 index 00000000..dc014ed6 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_domain_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_domain_settings import BetaSettingsServiceDomainSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetDomainSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetDomainSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceDomainSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetDomainSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceDomainSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_general_settings_response.py b/zitadel_client/models/beta_settings_service_get_general_settings_response.py new file mode 100644 index 00000000..aee49f46 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_general_settings_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetGeneralSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetGeneralSettingsResponse + """ # noqa: E501 + default_org_id: Optional[StrictStr] = Field(default=None, alias="defaultOrgId") + default_language: Optional[StrictStr] = Field(default=None, alias="defaultLanguage") + supported_languages: Optional[List[StrictStr]] = Field(default=None, alias="supportedLanguages") + __properties: ClassVar[List[str]] = ["defaultOrgId", "defaultLanguage", "supportedLanguages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetGeneralSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetGeneralSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultOrgId": obj.get("defaultOrgId"), + "defaultLanguage": obj.get("defaultLanguage"), + "supportedLanguages": obj.get("supportedLanguages") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_request.py b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_request.py new file mode 100644 index 00000000..f266804f --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLegalAndSupportSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetLegalAndSupportSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_response.py b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_response.py new file mode 100644 index 00000000..928fb938 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_legal_and_support_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_legal_and_support_settings import BetaSettingsServiceLegalAndSupportSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLegalAndSupportSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetLegalAndSupportSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceLegalAndSupportSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLegalAndSupportSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceLegalAndSupportSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_lockout_settings_request.py b/zitadel_client/models/beta_settings_service_get_lockout_settings_request.py new file mode 100644 index 00000000..92a7f57e --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_lockout_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLockoutSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetLockoutSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_lockout_settings_response.py b/zitadel_client/models/beta_settings_service_get_lockout_settings_response.py new file mode 100644 index 00000000..b9d18782 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_lockout_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_lockout_settings import BetaSettingsServiceLockoutSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLockoutSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetLockoutSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceLockoutSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLockoutSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceLockoutSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_login_settings_request.py b/zitadel_client/models/beta_settings_service_get_login_settings_request.py new file mode 100644 index 00000000..0c80f920 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_login_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLoginSettingsRequest(BaseModel): + """ + BetaSettingsServiceGetLoginSettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_login_settings_response.py b/zitadel_client/models/beta_settings_service_get_login_settings_response.py new file mode 100644 index 00000000..aed04eec --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_login_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_login_settings import BetaSettingsServiceLoginSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetLoginSettingsResponse(BaseModel): + """ + BetaSettingsServiceGetLoginSettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceLoginSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetLoginSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceLoginSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_password_complexity_settings_request.py b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_request.py new file mode 100644 index 00000000..91aba49a --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetPasswordComplexitySettingsRequest(BaseModel): + """ + BetaSettingsServiceGetPasswordComplexitySettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_password_complexity_settings_response.py b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_response.py new file mode 100644 index 00000000..40811fc3 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_password_complexity_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_password_complexity_settings import BetaSettingsServicePasswordComplexitySettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetPasswordComplexitySettingsResponse(BaseModel): + """ + BetaSettingsServiceGetPasswordComplexitySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServicePasswordComplexitySettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordComplexitySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServicePasswordComplexitySettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_password_expiry_settings_request.py b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_request.py new file mode 100644 index 00000000..f07def44 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_request_context import BetaSettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetPasswordExpirySettingsRequest(BaseModel): + """ + BetaSettingsServiceGetPasswordExpirySettingsRequest + """ # noqa: E501 + ctx: Optional[BetaSettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": BetaSettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_password_expiry_settings_response.py b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_response.py new file mode 100644 index 00000000..b711f2a0 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_password_expiry_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_password_expiry_settings import BetaSettingsServicePasswordExpirySettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetPasswordExpirySettingsResponse(BaseModel): + """ + BetaSettingsServiceGetPasswordExpirySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServicePasswordExpirySettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetPasswordExpirySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServicePasswordExpirySettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_get_security_settings_response.py b/zitadel_client/models/beta_settings_service_get_security_settings_response.py new file mode 100644 index 00000000..c0b99b96 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_get_security_settings_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from zitadel_client.models.beta_settings_service_security_settings import BetaSettingsServiceSecuritySettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceGetSecuritySettingsResponse(BaseModel): + """ + BetaSettingsServiceGetSecuritySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + settings: Optional[BetaSettingsServiceSecuritySettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetSecuritySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceGetSecuritySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "settings": BetaSettingsServiceSecuritySettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_identity_provider.py b/zitadel_client/models/beta_settings_service_identity_provider.py new file mode 100644 index 00000000..c0e9fdb6 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_identity_provider.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_identity_provider_type import BetaSettingsServiceIdentityProviderType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceIdentityProvider(BaseModel): + """ + BetaSettingsServiceIdentityProvider + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + type: Optional[BetaSettingsServiceIdentityProviderType] = None + __properties: ClassVar[List[str]] = ["id", "name", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceIdentityProvider from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceIdentityProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_identity_provider_type.py b/zitadel_client/models/beta_settings_service_identity_provider_type.py new file mode 100644 index 00000000..e461055e --- /dev/null +++ b/zitadel_client/models/beta_settings_service_identity_provider_type.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceIdentityProviderType(str, Enum): + """ + BetaSettingsServiceIdentityProviderType + """ + + """ + allowed enum values + """ + IDENTITY_PROVIDER_TYPE_UNSPECIFIED = 'IDENTITY_PROVIDER_TYPE_UNSPECIFIED' + IDENTITY_PROVIDER_TYPE_OIDC = 'IDENTITY_PROVIDER_TYPE_OIDC' + IDENTITY_PROVIDER_TYPE_JWT = 'IDENTITY_PROVIDER_TYPE_JWT' + IDENTITY_PROVIDER_TYPE_LDAP = 'IDENTITY_PROVIDER_TYPE_LDAP' + IDENTITY_PROVIDER_TYPE_OAUTH = 'IDENTITY_PROVIDER_TYPE_OAUTH' + IDENTITY_PROVIDER_TYPE_AZURE_AD = 'IDENTITY_PROVIDER_TYPE_AZURE_AD' + IDENTITY_PROVIDER_TYPE_GITHUB = 'IDENTITY_PROVIDER_TYPE_GITHUB' + IDENTITY_PROVIDER_TYPE_GITHUB_ES = 'IDENTITY_PROVIDER_TYPE_GITHUB_ES' + IDENTITY_PROVIDER_TYPE_GITLAB = 'IDENTITY_PROVIDER_TYPE_GITLAB' + IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED = 'IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED' + IDENTITY_PROVIDER_TYPE_GOOGLE = 'IDENTITY_PROVIDER_TYPE_GOOGLE' + IDENTITY_PROVIDER_TYPE_SAML = 'IDENTITY_PROVIDER_TYPE_SAML' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceIdentityProviderType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_legal_and_support_settings.py b/zitadel_client/models/beta_settings_service_legal_and_support_settings.py new file mode 100644 index 00000000..4d404bb7 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_legal_and_support_settings.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceLegalAndSupportSettings(BaseModel): + """ + BetaSettingsServiceLegalAndSupportSettings + """ # noqa: E501 + tos_link: Optional[StrictStr] = Field(default=None, alias="tosLink") + privacy_policy_link: Optional[StrictStr] = Field(default=None, alias="privacyPolicyLink") + help_link: Optional[StrictStr] = Field(default=None, alias="helpLink") + support_email: Optional[StrictStr] = Field(default=None, alias="supportEmail") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + docs_link: Optional[StrictStr] = Field(default=None, alias="docsLink") + custom_link: Optional[StrictStr] = Field(default=None, alias="customLink") + custom_link_text: Optional[StrictStr] = Field(default=None, alias="customLinkText") + __properties: ClassVar[List[str]] = ["tosLink", "privacyPolicyLink", "helpLink", "supportEmail", "resourceOwnerType", "docsLink", "customLink", "customLinkText"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLegalAndSupportSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLegalAndSupportSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tosLink": obj.get("tosLink"), + "privacyPolicyLink": obj.get("privacyPolicyLink"), + "helpLink": obj.get("helpLink"), + "supportEmail": obj.get("supportEmail"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "docsLink": obj.get("docsLink"), + "customLink": obj.get("customLink"), + "customLinkText": obj.get("customLinkText") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_list_details.py b/zitadel_client/models/beta_settings_service_list_details.py new file mode 100644 index 00000000..86875fa8 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_list_details.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceListDetails(BaseModel): + """ + BetaSettingsServiceListDetails + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceListDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceListDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "processedSequence": obj.get("processedSequence"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_lockout_settings.py b/zitadel_client/models/beta_settings_service_lockout_settings.py new file mode 100644 index 00000000..6e8cc3c5 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_lockout_settings.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceLockoutSettings(BaseModel): + """ + BetaSettingsServiceLockoutSettings + """ # noqa: E501 + max_password_attempts: Optional[Any] = Field(default=None, alias="maxPasswordAttempts") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + max_otp_attempts: Optional[Any] = Field(default=None, alias="maxOtpAttempts") + __properties: ClassVar[List[str]] = ["maxPasswordAttempts", "resourceOwnerType", "maxOtpAttempts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLockoutSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if max_password_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_password_attempts is None and "max_password_attempts" in self.model_fields_set: + _dict['maxPasswordAttempts'] = None + + # set to None if max_otp_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_otp_attempts is None and "max_otp_attempts" in self.model_fields_set: + _dict['maxOtpAttempts'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLockoutSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maxPasswordAttempts": obj.get("maxPasswordAttempts"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "maxOtpAttempts": obj.get("maxOtpAttempts") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_login_settings.py b/zitadel_client/models/beta_settings_service_login_settings.py new file mode 100644 index 00000000..e957d2cf --- /dev/null +++ b/zitadel_client/models/beta_settings_service_login_settings.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_settings_service_multi_factor_type import BetaSettingsServiceMultiFactorType +from zitadel_client.models.beta_settings_service_passkeys_type import BetaSettingsServicePasskeysType +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from zitadel_client.models.beta_settings_service_second_factor_type import BetaSettingsServiceSecondFactorType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceLoginSettings(BaseModel): + """ + BetaSettingsServiceLoginSettings + """ # noqa: E501 + allow_username_password: Optional[StrictBool] = Field(default=None, alias="allowUsernamePassword") + allow_register: Optional[StrictBool] = Field(default=None, alias="allowRegister") + allow_external_idp: Optional[StrictBool] = Field(default=None, alias="allowExternalIdp") + force_mfa: Optional[StrictBool] = Field(default=None, alias="forceMfa") + passkeys_type: Optional[BetaSettingsServicePasskeysType] = Field(default=None, alias="passkeysType") + hide_password_reset: Optional[StrictBool] = Field(default=None, alias="hidePasswordReset") + ignore_unknown_usernames: Optional[StrictBool] = Field(default=None, alias="ignoreUnknownUsernames") + default_redirect_uri: Optional[StrictStr] = Field(default=None, alias="defaultRedirectUri") + password_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="passwordCheckLifetime") + external_login_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="externalLoginCheckLifetime") + mfa_init_skip_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="mfaInitSkipLifetime") + second_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="secondFactorCheckLifetime") + multi_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="multiFactorCheckLifetime") + second_factors: Optional[List[BetaSettingsServiceSecondFactorType]] = Field(default=None, alias="secondFactors") + multi_factors: Optional[List[BetaSettingsServiceMultiFactorType]] = Field(default=None, alias="multiFactors") + allow_domain_discovery: Optional[StrictBool] = Field(default=None, description="If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success.", alias="allowDomainDiscovery") + disable_login_with_email: Optional[StrictBool] = Field(default=None, alias="disableLoginWithEmail") + disable_login_with_phone: Optional[StrictBool] = Field(default=None, alias="disableLoginWithPhone") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + force_mfa_local_only: Optional[StrictBool] = Field(default=None, alias="forceMfaLocalOnly") + __properties: ClassVar[List[str]] = ["allowUsernamePassword", "allowRegister", "allowExternalIdp", "forceMfa", "passkeysType", "hidePasswordReset", "ignoreUnknownUsernames", "defaultRedirectUri", "passwordCheckLifetime", "externalLoginCheckLifetime", "mfaInitSkipLifetime", "secondFactorCheckLifetime", "multiFactorCheckLifetime", "secondFactors", "multiFactors", "allowDomainDiscovery", "disableLoginWithEmail", "disableLoginWithPhone", "resourceOwnerType", "forceMfaLocalOnly"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLoginSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceLoginSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowUsernamePassword": obj.get("allowUsernamePassword"), + "allowRegister": obj.get("allowRegister"), + "allowExternalIdp": obj.get("allowExternalIdp"), + "forceMfa": obj.get("forceMfa"), + "passkeysType": obj.get("passkeysType"), + "hidePasswordReset": obj.get("hidePasswordReset"), + "ignoreUnknownUsernames": obj.get("ignoreUnknownUsernames"), + "defaultRedirectUri": obj.get("defaultRedirectUri"), + "passwordCheckLifetime": obj.get("passwordCheckLifetime"), + "externalLoginCheckLifetime": obj.get("externalLoginCheckLifetime"), + "mfaInitSkipLifetime": obj.get("mfaInitSkipLifetime"), + "secondFactorCheckLifetime": obj.get("secondFactorCheckLifetime"), + "multiFactorCheckLifetime": obj.get("multiFactorCheckLifetime"), + "secondFactors": obj.get("secondFactors"), + "multiFactors": obj.get("multiFactors"), + "allowDomainDiscovery": obj.get("allowDomainDiscovery"), + "disableLoginWithEmail": obj.get("disableLoginWithEmail"), + "disableLoginWithPhone": obj.get("disableLoginWithPhone"), + "resourceOwnerType": obj.get("resourceOwnerType"), + "forceMfaLocalOnly": obj.get("forceMfaLocalOnly") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_multi_factor_type.py b/zitadel_client/models/beta_settings_service_multi_factor_type.py new file mode 100644 index 00000000..57a3e77d --- /dev/null +++ b/zitadel_client/models/beta_settings_service_multi_factor_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceMultiFactorType(str, Enum): + """ + BetaSettingsServiceMultiFactorType + """ + + """ + allowed enum values + """ + MULTI_FACTOR_TYPE_UNSPECIFIED = 'MULTI_FACTOR_TYPE_UNSPECIFIED' + MULTI_FACTOR_TYPE_U2_F_WITH_VERIFICATION = 'MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceMultiFactorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_passkeys_type.py b/zitadel_client/models/beta_settings_service_passkeys_type.py new file mode 100644 index 00000000..4d3a86f5 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_passkeys_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServicePasskeysType(str, Enum): + """ + BetaSettingsServicePasskeysType + """ + + """ + allowed enum values + """ + PASSKEYS_TYPE_NOT_ALLOWED = 'PASSKEYS_TYPE_NOT_ALLOWED' + PASSKEYS_TYPE_ALLOWED = 'PASSKEYS_TYPE_ALLOWED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServicePasskeysType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_password_complexity_settings.py b/zitadel_client/models/beta_settings_service_password_complexity_settings.py new file mode 100644 index 00000000..92465149 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_password_complexity_settings.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServicePasswordComplexitySettings(BaseModel): + """ + BetaSettingsServicePasswordComplexitySettings + """ # noqa: E501 + min_length: Optional[Any] = Field(default=None, alias="minLength") + requires_uppercase: Optional[StrictBool] = Field(default=None, alias="requiresUppercase") + requires_lowercase: Optional[StrictBool] = Field(default=None, alias="requiresLowercase") + requires_number: Optional[StrictBool] = Field(default=None, alias="requiresNumber") + requires_symbol: Optional[StrictBool] = Field(default=None, alias="requiresSymbol") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + __properties: ClassVar[List[str]] = ["minLength", "requiresUppercase", "requiresLowercase", "requiresNumber", "requiresSymbol", "resourceOwnerType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServicePasswordComplexitySettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['minLength'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServicePasswordComplexitySettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "minLength": obj.get("minLength"), + "requiresUppercase": obj.get("requiresUppercase"), + "requiresLowercase": obj.get("requiresLowercase"), + "requiresNumber": obj.get("requiresNumber"), + "requiresSymbol": obj.get("requiresSymbol"), + "resourceOwnerType": obj.get("resourceOwnerType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_password_expiry_settings.py b/zitadel_client/models/beta_settings_service_password_expiry_settings.py new file mode 100644 index 00000000..b13bb374 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_password_expiry_settings.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_resource_owner_type import BetaSettingsServiceResourceOwnerType +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServicePasswordExpirySettings(BaseModel): + """ + BetaSettingsServicePasswordExpirySettings + """ # noqa: E501 + max_age_days: Optional[Any] = Field(default=None, description="Amount of days after which a password will expire. The user will be forced to change the password on the following authentication.", alias="maxAgeDays") + expire_warn_days: Optional[Any] = Field(default=None, description="Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user.", alias="expireWarnDays") + resource_owner_type: Optional[BetaSettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + __properties: ClassVar[List[str]] = ["maxAgeDays", "expireWarnDays", "resourceOwnerType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServicePasswordExpirySettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if max_age_days (nullable) is None + # and model_fields_set contains the field + if self.max_age_days is None and "max_age_days" in self.model_fields_set: + _dict['maxAgeDays'] = None + + # set to None if expire_warn_days (nullable) is None + # and model_fields_set contains the field + if self.expire_warn_days is None and "expire_warn_days" in self.model_fields_set: + _dict['expireWarnDays'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServicePasswordExpirySettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maxAgeDays": obj.get("maxAgeDays"), + "expireWarnDays": obj.get("expireWarnDays"), + "resourceOwnerType": obj.get("resourceOwnerType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_request_context.py b/zitadel_client/models/beta_settings_service_request_context.py new file mode 100644 index 00000000..3d265c08 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_request_context.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceRequestContext(BaseModel): + """ + BetaSettingsServiceRequestContext + """ # noqa: E501 + instance: Optional[StrictBool] = None + org_id: Optional[StrictStr] = Field(default=None, alias="orgId") + __properties: ClassVar[List[str]] = ["instance", "orgId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceRequestContext from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceRequestContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance": obj.get("instance"), + "orgId": obj.get("orgId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_resource_owner_type.py b/zitadel_client/models/beta_settings_service_resource_owner_type.py new file mode 100644 index 00000000..dd22fd3b --- /dev/null +++ b/zitadel_client/models/beta_settings_service_resource_owner_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceResourceOwnerType(str, Enum): + """ + BetaSettingsServiceResourceOwnerType + """ + + """ + allowed enum values + """ + RESOURCE_OWNER_TYPE_UNSPECIFIED = 'RESOURCE_OWNER_TYPE_UNSPECIFIED' + RESOURCE_OWNER_TYPE_INSTANCE = 'RESOURCE_OWNER_TYPE_INSTANCE' + RESOURCE_OWNER_TYPE_ORG = 'RESOURCE_OWNER_TYPE_ORG' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceResourceOwnerType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_second_factor_type.py b/zitadel_client/models/beta_settings_service_second_factor_type.py new file mode 100644 index 00000000..8532a98a --- /dev/null +++ b/zitadel_client/models/beta_settings_service_second_factor_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceSecondFactorType(str, Enum): + """ + BetaSettingsServiceSecondFactorType + """ + + """ + allowed enum values + """ + SECOND_FACTOR_TYPE_UNSPECIFIED = 'SECOND_FACTOR_TYPE_UNSPECIFIED' + SECOND_FACTOR_TYPE_OTP = 'SECOND_FACTOR_TYPE_OTP' + SECOND_FACTOR_TYPE_U2_F = 'SECOND_FACTOR_TYPE_U2F' + SECOND_FACTOR_TYPE_OTP_EMAIL = 'SECOND_FACTOR_TYPE_OTP_EMAIL' + SECOND_FACTOR_TYPE_OTP_SMS = 'SECOND_FACTOR_TYPE_OTP_SMS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceSecondFactorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_settings_service_security_settings.py b/zitadel_client/models/beta_settings_service_security_settings.py new file mode 100644 index 00000000..b1b1dc3c --- /dev/null +++ b/zitadel_client/models/beta_settings_service_security_settings.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_embedded_iframe_settings import BetaSettingsServiceEmbeddedIframeSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceSecuritySettings(BaseModel): + """ + BetaSettingsServiceSecuritySettings + """ # noqa: E501 + embedded_iframe: Optional[BetaSettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") + __properties: ClassVar[List[str]] = ["embeddedIframe", "enableImpersonation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSecuritySettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of embedded_iframe + if self.embedded_iframe: + _dict['embeddedIframe'] = self.embedded_iframe.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSecuritySettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "embeddedIframe": BetaSettingsServiceEmbeddedIframeSettings.from_dict(obj["embeddedIframe"]) if obj.get("embeddedIframe") is not None else None, + "enableImpersonation": obj.get("enableImpersonation") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_set_security_settings_request.py b/zitadel_client/models/beta_settings_service_set_security_settings_request.py new file mode 100644 index 00000000..5fddcabc --- /dev/null +++ b/zitadel_client/models/beta_settings_service_set_security_settings_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_embedded_iframe_settings import BetaSettingsServiceEmbeddedIframeSettings +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceSetSecuritySettingsRequest(BaseModel): + """ + BetaSettingsServiceSetSecuritySettingsRequest + """ # noqa: E501 + embedded_iframe: Optional[BetaSettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") + __properties: ClassVar[List[str]] = ["embeddedIframe", "enableImpersonation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of embedded_iframe + if self.embedded_iframe: + _dict['embeddedIframe'] = self.embedded_iframe.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "embeddedIframe": BetaSettingsServiceEmbeddedIframeSettings.from_dict(obj["embeddedIframe"]) if obj.get("embeddedIframe") is not None else None, + "enableImpersonation": obj.get("enableImpersonation") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_set_security_settings_response.py b/zitadel_client/models/beta_settings_service_set_security_settings_response.py new file mode 100644 index 00000000..6c37ffae --- /dev/null +++ b/zitadel_client/models/beta_settings_service_set_security_settings_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_settings_service_details import BetaSettingsServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceSetSecuritySettingsResponse(BaseModel): + """ + BetaSettingsServiceSetSecuritySettingsResponse + """ # noqa: E501 + details: Optional[BetaSettingsServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceSetSecuritySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaSettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_theme.py b/zitadel_client/models/beta_settings_service_theme.py new file mode 100644 index 00000000..608e621a --- /dev/null +++ b/zitadel_client/models/beta_settings_service_theme.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaSettingsServiceTheme(BaseModel): + """ + BetaSettingsServiceTheme + """ # noqa: E501 + primary_color: Optional[StrictStr] = Field(default=None, description="hex value for primary color", alias="primaryColor") + background_color: Optional[StrictStr] = Field(default=None, description="hex value for background color", alias="backgroundColor") + warn_color: Optional[StrictStr] = Field(default=None, description="hex value for warning color", alias="warnColor") + font_color: Optional[StrictStr] = Field(default=None, description="hex value for font color", alias="fontColor") + logo_url: Optional[StrictStr] = Field(default=None, description="url where the logo is served", alias="logoUrl") + icon_url: Optional[StrictStr] = Field(default=None, description="url where the icon is served", alias="iconUrl") + __properties: ClassVar[List[str]] = ["primaryColor", "backgroundColor", "warnColor", "fontColor", "logoUrl", "iconUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaSettingsServiceTheme from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaSettingsServiceTheme from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "primaryColor": obj.get("primaryColor"), + "backgroundColor": obj.get("backgroundColor"), + "warnColor": obj.get("warnColor"), + "fontColor": obj.get("fontColor"), + "logoUrl": obj.get("logoUrl"), + "iconUrl": obj.get("iconUrl") + }) + return _obj + + diff --git a/zitadel_client/models/beta_settings_service_theme_mode.py b/zitadel_client/models/beta_settings_service_theme_mode.py new file mode 100644 index 00000000..0a1e8f03 --- /dev/null +++ b/zitadel_client/models/beta_settings_service_theme_mode.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaSettingsServiceThemeMode(str, Enum): + """ + BetaSettingsServiceThemeMode + """ + + """ + allowed enum values + """ + THEME_MODE_UNSPECIFIED = 'THEME_MODE_UNSPECIFIED' + THEME_MODE_AUTO = 'THEME_MODE_AUTO' + THEME_MODE_LIGHT = 'THEME_MODE_LIGHT' + THEME_MODE_DARK = 'THEME_MODE_DARK' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaSettingsServiceThemeMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_telemetry_service_any.py b/zitadel_client/models/beta_telemetry_service_any.py new file mode 100644 index 00000000..07f111bb --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_telemetry_service_connect_error.py b/zitadel_client/models/beta_telemetry_service_connect_error.py new file mode 100644 index 00000000..f6e7dced --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_telemetry_service_any import BetaTelemetryServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaTelemetryServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaTelemetryServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_telemetry_service_count_parent_type.py b/zitadel_client/models/beta_telemetry_service_count_parent_type.py new file mode 100644 index 00000000..08d394d6 --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_count_parent_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaTelemetryServiceCountParentType(str, Enum): + """ + BetaTelemetryServiceCountParentType + """ + + """ + allowed enum values + """ + COUNT_PARENT_TYPE_UNSPECIFIED = 'COUNT_PARENT_TYPE_UNSPECIFIED' + COUNT_PARENT_TYPE_INSTANCE = 'COUNT_PARENT_TYPE_INSTANCE' + COUNT_PARENT_TYPE_ORGANIZATION = 'COUNT_PARENT_TYPE_ORGANIZATION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaTelemetryServiceCountParentType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_telemetry_service_instance_information.py b/zitadel_client/models/beta_telemetry_service_instance_information.py new file mode 100644 index 00000000..12afd30d --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_instance_information.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceInstanceInformation(BaseModel): + """ + BetaTelemetryServiceInstanceInformation + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the instance.") + domains: Optional[List[StrictStr]] = Field(default=None, description="The custom domains (incl. generated ones) of the instance.") + created_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="createdAt") + __properties: ClassVar[List[str]] = ["id", "domains", "createdAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceInstanceInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceInstanceInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "domains": obj.get("domains"), + "createdAt": obj.get("createdAt") + }) + return _obj + + diff --git a/zitadel_client/models/beta_telemetry_service_report_base_information_request.py b/zitadel_client/models/beta_telemetry_service_report_base_information_request.py new file mode 100644 index 00000000..2bc61a5b --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_report_base_information_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_telemetry_service_instance_information import BetaTelemetryServiceInstanceInformation +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceReportBaseInformationRequest(BaseModel): + """ + BetaTelemetryServiceReportBaseInformationRequest + """ # noqa: E501 + system_id: Optional[StrictStr] = Field(default=None, description="The system ID is a unique identifier for the ZITADEL system.", alias="systemId") + version: Optional[StrictStr] = Field(default=None, description="The current version of the ZITADEL system.") + instances: Optional[List[BetaTelemetryServiceInstanceInformation]] = Field(default=None, description="A list of instances in the ZITADEL system and their information.") + __properties: ClassVar[List[str]] = ["systemId", "version", "instances"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportBaseInformationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item_instances in self.instances: + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportBaseInformationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "systemId": obj.get("systemId"), + "version": obj.get("version"), + "instances": [BetaTelemetryServiceInstanceInformation.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_telemetry_service_report_base_information_response.py b/zitadel_client/models/beta_telemetry_service_report_base_information_response.py new file mode 100644 index 00000000..1fe5c608 --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_report_base_information_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceReportBaseInformationResponse(BaseModel): + """ + BetaTelemetryServiceReportBaseInformationResponse + """ # noqa: E501 + report_id: Optional[StrictStr] = Field(default=None, description="The report ID is a unique identifier for the report. It is used to identify the report to be able to link it to the resource counts or other reports. Note that the report ID is only valid for the same system ID.", alias="reportId") + __properties: ClassVar[List[str]] = ["reportId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportBaseInformationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportBaseInformationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reportId": obj.get("reportId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_telemetry_service_report_resource_counts_request.py b/zitadel_client/models/beta_telemetry_service_report_resource_counts_request.py new file mode 100644 index 00000000..345b89c1 --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_report_resource_counts_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_telemetry_service_resource_count import BetaTelemetryServiceResourceCount +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceReportResourceCountsRequest(BaseModel): + """ + BetaTelemetryServiceReportResourceCountsRequest + """ # noqa: E501 + system_id: Optional[StrictStr] = Field(default=None, description="The system ID is a unique identifier for the ZITADEL system.", alias="systemId") + report_id: Optional[StrictStr] = Field(default=None, description="The previously returned report ID from the server to continue reporting. Note that the report ID is only valid for the same system ID.", alias="reportId") + resource_counts: Optional[List[BetaTelemetryServiceResourceCount]] = Field(default=None, description="A list of resource counts to report.", alias="resourceCounts") + __properties: ClassVar[List[str]] = ["systemId", "reportId", "resourceCounts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportResourceCountsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in resource_counts (list) + _items = [] + if self.resource_counts: + for _item_resource_counts in self.resource_counts: + if _item_resource_counts: + _items.append(_item_resource_counts.to_dict()) + _dict['resourceCounts'] = _items + # set to None if report_id (nullable) is None + # and model_fields_set contains the field + if self.report_id is None and "report_id" in self.model_fields_set: + _dict['reportId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportResourceCountsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "systemId": obj.get("systemId"), + "reportId": obj.get("reportId"), + "resourceCounts": [BetaTelemetryServiceResourceCount.from_dict(_item) for _item in obj["resourceCounts"]] if obj.get("resourceCounts") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_telemetry_service_report_resource_counts_response.py b/zitadel_client/models/beta_telemetry_service_report_resource_counts_response.py new file mode 100644 index 00000000..b6843ce3 --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_report_resource_counts_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceReportResourceCountsResponse(BaseModel): + """ + BetaTelemetryServiceReportResourceCountsResponse + """ # noqa: E501 + report_id: Optional[StrictStr] = Field(default=None, description="The report ID is a unique identifier for the report. It is used to identify the report in case of additional data / pagination. Note that the report ID is only valid for the same system ID.", alias="reportId") + __properties: ClassVar[List[str]] = ["reportId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportResourceCountsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceReportResourceCountsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reportId": obj.get("reportId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_telemetry_service_resource_count.py b/zitadel_client/models/beta_telemetry_service_resource_count.py new file mode 100644 index 00000000..144f178d --- /dev/null +++ b/zitadel_client/models/beta_telemetry_service_resource_count.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_telemetry_service_count_parent_type import BetaTelemetryServiceCountParentType +from typing import Optional, Set +from typing_extensions import Self + +class BetaTelemetryServiceResourceCount(BaseModel): + """ + BetaTelemetryServiceResourceCount + """ # noqa: E501 + instance_id: Optional[StrictStr] = Field(default=None, description="The ID of the instance for which the resource counts are reported.", alias="instanceId") + parent_type: Optional[BetaTelemetryServiceCountParentType] = Field(default=None, alias="parentType") + parent_id: Optional[StrictStr] = Field(default=None, description="The parent ID of the resource counts (e.g. organization or instance ID). For example, reporting the amount of users per organization would use `COUNT_PARENT_TYPE_ORGANIZATION` as parent type and the organization ID as parent ID.", alias="parentId") + resource_name: Optional[StrictStr] = Field(default=None, description="The resource counts to report, e.g. amount of `users`, `organizations`, etc.", alias="resourceName") + table_name: Optional[StrictStr] = Field(default=None, description="The name of the table in the database, which was used to calculate the counts. This can be used to deduplicate counts in case of multiple reports. For example, if the counts were calculated from the `users14` table, the table name would be `users14`, where there could also be a `users15` table reported at the same time as the system is rolling out a new version.", alias="tableName") + updated_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="updatedAt") + amount: Optional[StrictInt] = Field(default=None, description="The actual amount of the resource.") + __properties: ClassVar[List[str]] = ["instanceId", "parentType", "parentId", "resourceName", "tableName", "updatedAt", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceResourceCount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaTelemetryServiceResourceCount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "parentType": obj.get("parentType"), + "parentId": obj.get("parentId"), + "resourceName": obj.get("resourceName"), + "tableName": obj.get("tableName"), + "updatedAt": obj.get("updatedAt"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_access_token_type.py b/zitadel_client/models/beta_user_service_access_token_type.py new file mode 100644 index 00000000..147dec91 --- /dev/null +++ b/zitadel_client/models/beta_user_service_access_token_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceAccessTokenType(str, Enum): + """ + BetaUserServiceAccessTokenType + """ + + """ + allowed enum values + """ + ACCESS_TOKEN_TYPE_BEARER = 'ACCESS_TOKEN_TYPE_BEARER' + ACCESS_TOKEN_TYPE_JWT = 'ACCESS_TOKEN_TYPE_JWT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceAccessTokenType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_add_human_user_request.py b/zitadel_client/models/beta_user_service_add_human_user_request.py new file mode 100644 index 00000000..142e4be1 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_human_user_request.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_hashed_password import BetaUserServiceHashedPassword +from zitadel_client.models.beta_user_service_idp_link import BetaUserServiceIDPLink +from zitadel_client.models.beta_user_service_organization import BetaUserServiceOrganization +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from zitadel_client.models.beta_user_service_set_human_email import BetaUserServiceSetHumanEmail +from zitadel_client.models.beta_user_service_set_human_phone import BetaUserServiceSetHumanPhone +from zitadel_client.models.beta_user_service_set_human_profile import BetaUserServiceSetHumanProfile +from zitadel_client.models.beta_user_service_set_metadata_entry import BetaUserServiceSetMetadataEntry +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddHumanUserRequest(BaseModel): + """ + BetaUserServiceAddHumanUserRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") + username: Optional[StrictStr] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") + organization: Optional[BetaUserServiceOrganization] = None + profile: BetaUserServiceSetHumanProfile + email: BetaUserServiceSetHumanEmail + phone: Optional[BetaUserServiceSetHumanPhone] = None + metadata: Optional[List[BetaUserServiceSetMetadataEntry]] = None + idp_links: Optional[List[BetaUserServiceIDPLink]] = Field(default=None, alias="idpLinks") + totp_secret: Optional[StrictStr] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + hashed_password: Optional[BetaUserServiceHashedPassword] = Field(default=None, alias="hashedPassword") + password: Optional[BetaUserServicePassword] = None + __properties: ClassVar[List[str]] = ["userId", "username", "organization", "profile", "email", "phone", "metadata", "idpLinks", "totpSecret", "hashedPassword", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddHumanUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization + if self.organization: + _dict['organization'] = self.organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in idp_links (list) + _items = [] + if self.idp_links: + for _item_idp_links in self.idp_links: + if _item_idp_links: + _items.append(_item_idp_links.to_dict()) + _dict['idpLinks'] = _items + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if totp_secret (nullable) is None + # and model_fields_set contains the field + if self.totp_secret is None and "totp_secret" in self.model_fields_set: + _dict['totpSecret'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddHumanUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "username": obj.get("username"), + "organization": BetaUserServiceOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "profile": BetaUserServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "email": BetaUserServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "phone": BetaUserServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "metadata": [BetaUserServiceSetMetadataEntry.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, + "idpLinks": [BetaUserServiceIDPLink.from_dict(_item) for _item in obj["idpLinks"]] if obj.get("idpLinks") is not None else None, + "totpSecret": obj.get("totpSecret"), + "hashedPassword": BetaUserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, + "password": BetaUserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_human_user_response.py b/zitadel_client/models/beta_user_service_add_human_user_response.py new file mode 100644 index 00000000..4d7f5db6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_human_user_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddHumanUserResponse(BaseModel): + """ + BetaUserServiceAddHumanUserResponse + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + details: Optional[BetaUserServiceDetails] = None + email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + __properties: ClassVar[List[str]] = ["userId", "details", "emailCode", "phoneCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddHumanUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddHumanUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_idp_link_request.py b/zitadel_client/models/beta_user_service_add_idp_link_request.py new file mode 100644 index 00000000..ebf3ebf9 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_idp_link_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_idp_link import BetaUserServiceIDPLink +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddIDPLinkRequest(BaseModel): + """ + BetaUserServiceAddIDPLinkRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + idp_link: Optional[BetaUserServiceIDPLink] = Field(default=None, alias="idpLink") + __properties: ClassVar[List[str]] = ["userId", "idpLink"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of idp_link + if self.idp_link: + _dict['idpLink'] = self.idp_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "idpLink": BetaUserServiceIDPLink.from_dict(obj["idpLink"]) if obj.get("idpLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_idp_link_response.py b/zitadel_client/models/beta_user_service_add_idp_link_response.py new file mode 100644 index 00000000..fb1c97e0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_idp_link_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddIDPLinkResponse(BaseModel): + """ + BetaUserServiceAddIDPLinkResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddIDPLinkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otp_email_request.py b/zitadel_client/models/beta_user_service_add_otp_email_request.py new file mode 100644 index 00000000..ead3cd72 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otp_email_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPEmailRequest(BaseModel): + """ + BetaUserServiceAddOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otp_email_response.py b/zitadel_client/models/beta_user_service_add_otp_email_response.py new file mode 100644 index 00000000..bc4d83d6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otp_email_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPEmailResponse(BaseModel): + """ + BetaUserServiceAddOTPEmailResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPEmailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otpsms_request.py b/zitadel_client/models/beta_user_service_add_otpsms_request.py new file mode 100644 index 00000000..f8dcfb89 --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otpsms_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPSMSRequest(BaseModel): + """ + BetaUserServiceAddOTPSMSRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_add_otpsms_response.py b/zitadel_client/models/beta_user_service_add_otpsms_response.py new file mode 100644 index 00000000..d277034c --- /dev/null +++ b/zitadel_client/models/beta_user_service_add_otpsms_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAddOTPSMSResponse(BaseModel): + """ + BetaUserServiceAddOTPSMSResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAddOTPSMSResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/session_service_rpc_status.py b/zitadel_client/models/beta_user_service_and_query.py similarity index 71% rename from zitadel_client/models/session_service_rpc_status.py rename to zitadel_client/models/beta_user_service_and_query.py index 1b4c1621..b14a1c43 100644 --- a/zitadel_client/models/session_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_and_query.py @@ -17,19 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_protobuf_any import SessionServiceProtobufAny from typing import Optional, Set from typing_extensions import Self -class SessionServiceRpcStatus(BaseModel): +class BetaUserServiceAndQuery(BaseModel): """ - SessionServiceRpcStatus + Connect multiple sub-condition with and AND operator. """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[SessionServiceProtobufAny]] = None + queries: Optional[List[BetaUserServiceSearchQuery]] = None + __properties: ClassVar[List[str]] = ["queries"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceAndQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +68,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceAndQuery from a dict""" if obj is None: return None @@ -89,10 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [SessionServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "queries": [BetaUserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +# TODO: Rewrite to not use raise_errors +BetaUserServiceAndQuery.model_rebuild(raise_errors=False) diff --git a/zitadel_client/models/beta_user_service_any.py b/zitadel_client/models/beta_user_service_any.py new file mode 100644 index 00000000..ca515a77 --- /dev/null +++ b/zitadel_client/models/beta_user_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_user_service_authentication_method_type.py b/zitadel_client/models/beta_user_service_authentication_method_type.py new file mode 100644 index 00000000..7f0a2e2c --- /dev/null +++ b/zitadel_client/models/beta_user_service_authentication_method_type.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceAuthenticationMethodType(str, Enum): + """ + BetaUserServiceAuthenticationMethodType + """ + + """ + allowed enum values + """ + AUTHENTICATION_METHOD_TYPE_UNSPECIFIED = 'AUTHENTICATION_METHOD_TYPE_UNSPECIFIED' + AUTHENTICATION_METHOD_TYPE_PASSWORD = 'AUTHENTICATION_METHOD_TYPE_PASSWORD' + AUTHENTICATION_METHOD_TYPE_PASSKEY = 'AUTHENTICATION_METHOD_TYPE_PASSKEY' + AUTHENTICATION_METHOD_TYPE_IDP = 'AUTHENTICATION_METHOD_TYPE_IDP' + AUTHENTICATION_METHOD_TYPE_TOTP = 'AUTHENTICATION_METHOD_TYPE_TOTP' + AUTHENTICATION_METHOD_TYPE_U2_F = 'AUTHENTICATION_METHOD_TYPE_U2F' + AUTHENTICATION_METHOD_TYPE_OTP_SMS = 'AUTHENTICATION_METHOD_TYPE_OTP_SMS' + AUTHENTICATION_METHOD_TYPE_OTP_EMAIL = 'AUTHENTICATION_METHOD_TYPE_OTP_EMAIL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceAuthenticationMethodType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_connect_error.py b/zitadel_client/models/beta_user_service_connect_error.py new file mode 100644 index 00000000..035ad1ef --- /dev/null +++ b/zitadel_client/models/beta_user_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_any import BetaUserServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaUserServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaUserServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_user_service_create_passkey_registration_link_request.py b/zitadel_client/models/beta_user_service_create_passkey_registration_link_request.py new file mode 100644 index 00000000..e723b7ce --- /dev/null +++ b/zitadel_client/models/beta_user_service_create_passkey_registration_link_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_send_passkey_registration_link import BetaUserServiceSendPasskeyRegistrationLink +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceCreatePasskeyRegistrationLinkRequest(BaseModel): + """ + BetaUserServiceCreatePasskeyRegistrationLinkRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_link: Optional[BetaUserServiceSendPasskeyRegistrationLink] = Field(default=None, alias="sendLink") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendLink"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceCreatePasskeyRegistrationLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceCreatePasskeyRegistrationLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendLink": BetaUserServiceSendPasskeyRegistrationLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_create_passkey_registration_link_response.py b/zitadel_client/models/beta_user_service_create_passkey_registration_link_response.py new file mode 100644 index 00000000..6541a16a --- /dev/null +++ b/zitadel_client/models/beta_user_service_create_passkey_registration_link_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_passkey_registration_code import BetaUserServicePasskeyRegistrationCode +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceCreatePasskeyRegistrationLinkResponse(BaseModel): + """ + BetaUserServiceCreatePasskeyRegistrationLinkResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + code: Optional[BetaUserServicePasskeyRegistrationCode] = None + __properties: ClassVar[List[str]] = ["details", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceCreatePasskeyRegistrationLinkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of code + if self.code: + _dict['code'] = self.code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceCreatePasskeyRegistrationLinkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "code": BetaUserServicePasskeyRegistrationCode.from_dict(obj["code"]) if obj.get("code") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_deactivate_user_request.py b/zitadel_client/models/beta_user_service_deactivate_user_request.py new file mode 100644 index 00000000..cd70fab6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_deactivate_user_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDeactivateUserRequest(BaseModel): + """ + BetaUserServiceDeactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDeactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDeactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_delete_target_response.py b/zitadel_client/models/beta_user_service_deactivate_user_response.py similarity index 74% rename from zitadel_client/models/action_service_beta_delete_target_response.py rename to zitadel_client/models/beta_user_service_deactivate_user_response.py index d25a2fad..2d04c9a7 100644 --- a/zitadel_client/models/action_service_beta_delete_target_response.py +++ b/zitadel_client/models/beta_user_service_deactivate_user_response.py @@ -17,17 +17,18 @@ import re # noqa: F401 import json -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaDeleteTargetResponse(BaseModel): +class BetaUserServiceDeactivateUserResponse(BaseModel): """ - ActionServiceBetaDeleteTargetResponse + BetaUserServiceDeactivateUserResponse """ # noqa: E501 - deletion_date: Optional[datetime] = Field(default=None, description="The timestamp of the deletion of the target. Note that the deletion date is only guaranteed to be set if the deletion was successful during the request. In case the deletion occurred in a previous request, the deletion date might be empty.", alias="deletionDate") + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaDeleteTargetResponse from a JSON string""" + """Create an instance of BetaUserServiceDeactivateUserResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -68,11 +69,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaDeleteTargetResponse from a dict""" + """Create an instance of BetaUserServiceDeactivateUserResponse from a dict""" if obj is None: return None @@ -80,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "deletionDate": obj.get("deletionDate") + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_user_service_delete_user_request.py b/zitadel_client/models/beta_user_service_delete_user_request.py new file mode 100644 index 00000000..b8739fa3 --- /dev/null +++ b/zitadel_client/models/beta_user_service_delete_user_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDeleteUserRequest(BaseModel): + """ + BetaUserServiceDeleteUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_delete_user_response.py b/zitadel_client/models/beta_user_service_delete_user_response.py new file mode 100644 index 00000000..eccce4e0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_delete_user_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDeleteUserResponse(BaseModel): + """ + BetaUserServiceDeleteUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDeleteUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_details.py b/zitadel_client/models/beta_user_service_details.py new file mode 100644 index 00000000..d1d8d371 --- /dev/null +++ b/zitadel_client/models/beta_user_service_details.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDetails(BaseModel): + """ + BetaUserServiceDetails + """ # noqa: E501 + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sequence": obj.get("sequence"), + "changeDate": obj.get("changeDate"), + "resourceOwner": obj.get("resourceOwner"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_display_name_query.py b/zitadel_client/models/beta_user_service_display_name_query.py new file mode 100644 index 00000000..2d1a7b7d --- /dev/null +++ b/zitadel_client/models/beta_user_service_display_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceDisplayNameQuery(BaseModel): + """ + Query for users with a specific display name. + """ # noqa: E501 + display_name: StrictStr = Field(alias="displayName") + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["displayName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceDisplayNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceDisplayNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "displayName": obj.get("displayName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_email_query.py b/zitadel_client/models/beta_user_service_email_query.py new file mode 100644 index 00000000..cb15adcb --- /dev/null +++ b/zitadel_client/models/beta_user_service_email_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceEmailQuery(BaseModel): + """ + Query for users with a specific email. + """ # noqa: E501 + email_address: StrictStr = Field(alias="emailAddress") + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["emailAddress", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceEmailQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceEmailQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emailAddress": obj.get("emailAddress"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_first_name_query.py b/zitadel_client/models/beta_user_service_first_name_query.py new file mode 100644 index 00000000..103e2a6b --- /dev/null +++ b/zitadel_client/models/beta_user_service_first_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceFirstNameQuery(BaseModel): + """ + Query for users with a specific first name. + """ # noqa: E501 + first_name: StrictStr = Field(alias="firstName") + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["firstName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceFirstNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceFirstNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firstName": obj.get("firstName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_form_data.py b/zitadel_client/models/beta_user_service_form_data.py new file mode 100644 index 00000000..221bdc46 --- /dev/null +++ b/zitadel_client/models/beta_user_service_form_data.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceFormData(BaseModel): + """ + BetaUserServiceFormData + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="The URL to which the form should be submitted using the POST method.") + fields: Optional[Dict[str, StrictStr]] = Field(default=None, description="The form fields to be submitted. Each field is represented as a key-value pair, where the key is the field / input name and the value is the field / input value. All fields need to be submitted as is and as input type \"text\".") + __properties: ClassVar[List[str]] = ["url", "fields"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceFormData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceFormData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "fields": obj.get("fields") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_gender.py b/zitadel_client/models/beta_user_service_gender.py new file mode 100644 index 00000000..d3f0d14f --- /dev/null +++ b/zitadel_client/models/beta_user_service_gender.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceGender(str, Enum): + """ + BetaUserServiceGender + """ + + """ + allowed enum values + """ + GENDER_UNSPECIFIED = 'GENDER_UNSPECIFIED' + GENDER_FEMALE = 'GENDER_FEMALE' + GENDER_MALE = 'GENDER_MALE' + GENDER_DIVERSE = 'GENDER_DIVERSE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceGender from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_get_user_by_id_request.py b/zitadel_client/models/beta_user_service_get_user_by_id_request.py new file mode 100644 index 00000000..522230e2 --- /dev/null +++ b/zitadel_client/models/beta_user_service_get_user_by_id_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceGetUserByIDRequest(BaseModel): + """ + BetaUserServiceGetUserByIDRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceGetUserByIDRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceGetUserByIDRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_get_user_by_id_response.py b/zitadel_client/models/beta_user_service_get_user_by_id_response.py new file mode 100644 index 00000000..2bc4a4d7 --- /dev/null +++ b/zitadel_client/models/beta_user_service_get_user_by_id_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_user import BetaUserServiceUser +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceGetUserByIDResponse(BaseModel): + """ + BetaUserServiceGetUserByIDResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + user: Optional[BetaUserServiceUser] = None + __properties: ClassVar[List[str]] = ["details", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceGetUserByIDResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceGetUserByIDResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "user": BetaUserServiceUser.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_hashed_password.py b/zitadel_client/models/beta_user_service_hashed_password.py new file mode 100644 index 00000000..06cec56c --- /dev/null +++ b/zitadel_client/models/beta_user_service_hashed_password.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHashedPassword(BaseModel): + """ + BetaUserServiceHashedPassword + """ # noqa: E501 + hash: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["hash", "changeRequired"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHashedPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHashedPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_email.py b/zitadel_client/models/beta_user_service_human_email.py new file mode 100644 index 00000000..63cf2ce7 --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_email.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanEmail(BaseModel): + """ + BetaUserServiceHumanEmail + """ # noqa: E501 + email: Optional[StrictStr] = None + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + __properties: ClassVar[List[str]] = ["email", "isVerified"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanEmail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanEmail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "isVerified": obj.get("isVerified") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_phone.py b/zitadel_client/models/beta_user_service_human_phone.py new file mode 100644 index 00000000..eb0746bf --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_phone.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanPhone(BaseModel): + """ + BetaUserServiceHumanPhone + """ # noqa: E501 + phone: Optional[StrictStr] = None + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + __properties: ClassVar[List[str]] = ["phone", "isVerified"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanPhone from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanPhone from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phone": obj.get("phone"), + "isVerified": obj.get("isVerified") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_profile.py b/zitadel_client/models/beta_user_service_human_profile.py new file mode 100644 index 00000000..37c68954 --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_profile.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_gender import BetaUserServiceGender +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanProfile(BaseModel): + """ + BetaUserServiceHumanProfile + """ # noqa: E501 + given_name: Optional[StrictStr] = Field(default=None, alias="givenName") + family_name: Optional[StrictStr] = Field(default=None, alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[BetaUserServiceGender] = None + avatar_url: Optional[StrictStr] = Field(default=None, alias="avatarUrl") + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender", "avatarUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "givenName": obj.get("givenName"), + "familyName": obj.get("familyName"), + "nickName": obj.get("nickName"), + "displayName": obj.get("displayName"), + "preferredLanguage": obj.get("preferredLanguage"), + "gender": obj.get("gender"), + "avatarUrl": obj.get("avatarUrl") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_human_user.py b/zitadel_client/models/beta_user_service_human_user.py new file mode 100644 index 00000000..f7cdd73a --- /dev/null +++ b/zitadel_client/models/beta_user_service_human_user.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_human_email import BetaUserServiceHumanEmail +from zitadel_client.models.beta_user_service_human_phone import BetaUserServiceHumanPhone +from zitadel_client.models.beta_user_service_human_profile import BetaUserServiceHumanProfile +from zitadel_client.models.beta_user_service_user_state import BetaUserServiceUserState +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceHumanUser(BaseModel): + """ + BetaUserServiceHumanUser + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user.", alias="userId") + state: Optional[BetaUserServiceUserState] = None + username: Optional[StrictStr] = Field(default=None, description="Username of the user, which can be globally unique or unique on organization level.") + login_names: Optional[List[StrictStr]] = Field(default=None, description="Possible usable login names for the user.", alias="loginNames") + preferred_login_name: Optional[StrictStr] = Field(default=None, description="Preferred login name of the user.", alias="preferredLoginName") + profile: Optional[BetaUserServiceHumanProfile] = None + email: Optional[BetaUserServiceHumanEmail] = None + phone: Optional[BetaUserServiceHumanPhone] = None + password_change_required: Optional[StrictBool] = Field(default=None, description="User is required to change the used password on the next login.", alias="passwordChangeRequired") + password_changed: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="passwordChanged") + __properties: ClassVar[List[str]] = ["userId", "state", "username", "loginNames", "preferredLoginName", "profile", "email", "phone", "passwordChangeRequired", "passwordChanged"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceHumanUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "state": obj.get("state"), + "username": obj.get("username"), + "loginNames": obj.get("loginNames"), + "preferredLoginName": obj.get("preferredLoginName"), + "profile": BetaUserServiceHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "email": BetaUserServiceHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "phone": BetaUserServiceHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "passwordChangeRequired": obj.get("passwordChangeRequired"), + "passwordChanged": obj.get("passwordChanged") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idp_information.py b/zitadel_client/models/beta_user_service_idp_information.py new file mode 100644 index 00000000..fdcc298e --- /dev/null +++ b/zitadel_client/models/beta_user_service_idp_information.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_idpldap_access_information import BetaUserServiceIDPLDAPAccessInformation +from zitadel_client.models.beta_user_service_idpo_auth_access_information import BetaUserServiceIDPOAuthAccessInformation +from zitadel_client.models.beta_user_service_idpsaml_access_information import BetaUserServiceIDPSAMLAccessInformation +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPInformation(BaseModel): + """ + BetaUserServiceIDPInformation + """ # noqa: E501 + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") + raw_information: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="rawInformation") + ldap: Optional[BetaUserServiceIDPLDAPAccessInformation] = None + oauth: Optional[BetaUserServiceIDPOAuthAccessInformation] = None + saml: Optional[BetaUserServiceIDPSAMLAccessInformation] = None + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName", "rawInformation", "ldap", "oauth", "saml"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _dict['oauth'] = self.oauth.to_dict() + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpId": obj.get("idpId"), + "userId": obj.get("userId"), + "userName": obj.get("userName"), + "rawInformation": obj.get("rawInformation"), + "ldap": BetaUserServiceIDPLDAPAccessInformation.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, + "oauth": BetaUserServiceIDPOAuthAccessInformation.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, + "saml": BetaUserServiceIDPSAMLAccessInformation.from_dict(obj["saml"]) if obj.get("saml") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idp_intent.py b/zitadel_client/models/beta_user_service_idp_intent.py new file mode 100644 index 00000000..12730eed --- /dev/null +++ b/zitadel_client/models/beta_user_service_idp_intent.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPIntent(BaseModel): + """ + BetaUserServiceIDPIntent + """ # noqa: E501 + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken", "userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPIntent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPIntent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), + "idpIntentToken": obj.get("idpIntentToken"), + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idp_link.py b/zitadel_client/models/beta_user_service_idp_link.py new file mode 100644 index 00000000..340d7d6e --- /dev/null +++ b/zitadel_client/models/beta_user_service_idp_link.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPLink(BaseModel): + """ + BetaUserServiceIDPLink + """ # noqa: E501 + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpId": obj.get("idpId"), + "userId": obj.get("userId"), + "userName": obj.get("userName") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idpldap_access_information.py b/zitadel_client/models/beta_user_service_idpldap_access_information.py new file mode 100644 index 00000000..71cbdd43 --- /dev/null +++ b/zitadel_client/models/beta_user_service_idpldap_access_information.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPLDAPAccessInformation(BaseModel): + """ + BetaUserServiceIDPLDAPAccessInformation + """ # noqa: E501 + attributes: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.") + __properties: ClassVar[List[str]] = ["attributes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLDAPAccessInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPLDAPAccessInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "attributes": obj.get("attributes") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idpo_auth_access_information.py b/zitadel_client/models/beta_user_service_idpo_auth_access_information.py new file mode 100644 index 00000000..35977d51 --- /dev/null +++ b/zitadel_client/models/beta_user_service_idpo_auth_access_information.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPOAuthAccessInformation(BaseModel): + """ + BetaUserServiceIDPOAuthAccessInformation + """ # noqa: E501 + access_token: Optional[StrictStr] = Field(default=None, alias="accessToken") + id_token: Optional[StrictStr] = Field(default=None, alias="idToken") + __properties: ClassVar[List[str]] = ["accessToken", "idToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPOAuthAccessInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if id_token (nullable) is None + # and model_fields_set contains the field + if self.id_token is None and "id_token" in self.model_fields_set: + _dict['idToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPOAuthAccessInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accessToken": obj.get("accessToken"), + "idToken": obj.get("idToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_idpsaml_access_information.py b/zitadel_client/models/beta_user_service_idpsaml_access_information.py new file mode 100644 index 00000000..e60538b0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_idpsaml_access_information.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceIDPSAMLAccessInformation(BaseModel): + """ + BetaUserServiceIDPSAMLAccessInformation + """ # noqa: E501 + assertion: Optional[Union[StrictBytes, StrictStr]] = None + __properties: ClassVar[List[str]] = ["assertion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPSAMLAccessInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceIDPSAMLAccessInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assertion": obj.get("assertion") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_in_user_emails_query.py b/zitadel_client/models/beta_user_service_in_user_emails_query.py new file mode 100644 index 00000000..eb58bff6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_in_user_emails_query.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceInUserEmailsQuery(BaseModel): + """ + Query for users with email in list of emails. + """ # noqa: E501 + user_emails: Optional[List[StrictStr]] = Field(default=None, alias="userEmails") + __properties: ClassVar[List[str]] = ["userEmails"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceInUserEmailsQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceInUserEmailsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userEmails": obj.get("userEmails") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_protobuf_any.py b/zitadel_client/models/beta_user_service_in_user_id_query.py similarity index 84% rename from zitadel_client/models/action_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_in_user_id_query.py index 61fa28f2..b697f987 100644 --- a/zitadel_client/models/action_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_in_user_id_query.py @@ -22,11 +22,12 @@ from typing import Optional, Set from typing_extensions import Self -class ActionServiceProtobufAny(BaseModel): +class BetaUserServiceInUserIDQuery(BaseModel): """ - ActionServiceProtobufAny + Query for users with ID in list of IDs. """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_ids: Optional[List[StrictStr]] = Field(default=None, alias="userIds") + __properties: ClassVar[List[str]] = ["userIds"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceInUserIDQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceInUserIDQuery from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userIds": obj.get("userIds") }) return _obj diff --git a/zitadel_client/models/beta_user_service_last_name_query.py b/zitadel_client/models/beta_user_service_last_name_query.py new file mode 100644 index 00000000..d5363a8c --- /dev/null +++ b/zitadel_client/models/beta_user_service_last_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLastNameQuery(BaseModel): + """ + Query for users with a specific last name. + """ # noqa: E501 + last_name: StrictStr = Field(alias="lastName") + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["lastName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLastNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLastNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastName": obj.get("lastName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_ldap_credentials.py b/zitadel_client/models/beta_user_service_ldap_credentials.py new file mode 100644 index 00000000..5f1841b0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_ldap_credentials.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLDAPCredentials(BaseModel): + """ + BetaUserServiceLDAPCredentials + """ # noqa: E501 + username: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["username", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLDAPCredentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLDAPCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_list_authentication_method_types_request.py b/zitadel_client/models/beta_user_service_list_authentication_method_types_request.py new file mode 100644 index 00000000..3e67a7f7 --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_authentication_method_types_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListAuthenticationMethodTypesRequest(BaseModel): + """ + BetaUserServiceListAuthenticationMethodTypesRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListAuthenticationMethodTypesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListAuthenticationMethodTypesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_rpc_status.py b/zitadel_client/models/beta_user_service_list_authentication_method_types_response.py similarity index 67% rename from zitadel_client/models/feature_service_rpc_status.py rename to zitadel_client/models/beta_user_service_list_authentication_method_types_response.py index 2cd26f2b..220d5dfb 100644 --- a/zitadel_client/models/feature_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_list_authentication_method_types_response.py @@ -17,19 +17,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.feature_service_protobuf_any import FeatureServiceProtobufAny +from zitadel_client.models.beta_user_service_authentication_method_type import BetaUserServiceAuthenticationMethodType +from zitadel_client.models.beta_user_service_list_details import BetaUserServiceListDetails from typing import Optional, Set from typing_extensions import Self -class FeatureServiceRpcStatus(BaseModel): +class BetaUserServiceListAuthenticationMethodTypesResponse(BaseModel): """ - FeatureServiceRpcStatus + BetaUserServiceListAuthenticationMethodTypesResponse """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[FeatureServiceProtobufAny]] = None + details: Optional[BetaUserServiceListDetails] = None + auth_method_types: Optional[List[BetaUserServiceAuthenticationMethodType]] = Field(default=None, alias="authMethodTypes") + __properties: ClassVar[List[str]] = ["details", "authMethodTypes"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FeatureServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceListAuthenticationMethodTypesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +71,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of details if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + _dict['details'] = self.details.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FeatureServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceListAuthenticationMethodTypesResponse from a dict""" if obj is None: return None @@ -89,9 +86,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [FeatureServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "details": BetaUserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "authMethodTypes": obj.get("authMethodTypes") }) return _obj diff --git a/zitadel_client/models/beta_user_service_list_details.py b/zitadel_client/models/beta_user_service_list_details.py new file mode 100644 index 00000000..f6ab6f2d --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_details.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListDetails(BaseModel): + """ + BetaUserServiceListDetails + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "processedSequence": obj.get("processedSequence"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_list_query.py b/zitadel_client/models/beta_user_service_list_query.py new file mode 100644 index 00000000..3992d1d8 --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_query.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListQuery(BaseModel): + """ + BetaUserServiceListQuery + """ # noqa: E501 + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_list_users_request.py b/zitadel_client/models/beta_user_service_list_users_request.py new file mode 100644 index 00000000..595c7aeb --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_users_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_list_query import BetaUserServiceListQuery +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +from zitadel_client.models.beta_user_service_user_field_name import BetaUserServiceUserFieldName +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListUsersRequest(BaseModel): + """ + BetaUserServiceListUsersRequest + """ # noqa: E501 + query: Optional[BetaUserServiceListQuery] = None + sorting_column: Optional[BetaUserServiceUserFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[BetaUserServiceSearchQuery]] = Field(default=None, description="criteria the client is looking for") + __properties: ClassVar[List[str]] = ["query", "sortingColumn", "queries"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListUsersRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) + _items = [] + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListUsersRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "query": BetaUserServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "queries": [BetaUserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_list_users_response.py b/zitadel_client/models/beta_user_service_list_users_response.py new file mode 100644 index 00000000..af1d2abe --- /dev/null +++ b/zitadel_client/models/beta_user_service_list_users_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_list_details import BetaUserServiceListDetails +from zitadel_client.models.beta_user_service_user import BetaUserServiceUser +from zitadel_client.models.beta_user_service_user_field_name import BetaUserServiceUserFieldName +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceListUsersResponse(BaseModel): + """ + BetaUserServiceListUsersResponse + """ # noqa: E501 + details: Optional[BetaUserServiceListDetails] = None + sorting_column: Optional[BetaUserServiceUserFieldName] = Field(default=None, alias="sortingColumn") + result: Optional[List[BetaUserServiceUser]] = None + __properties: ClassVar[List[str]] = ["details", "sortingColumn", "result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceListUsersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in result (list) + _items = [] + if self.result: + for _item_result in self.result: + if _item_result: + _items.append(_item_result.to_dict()) + _dict['result'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceListUsersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "result": [BetaUserServiceUser.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_protobuf_any.py b/zitadel_client/models/beta_user_service_lock_user_request.py similarity index 85% rename from zitadel_client/models/organization_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_lock_user_request.py index 6abfad4a..8f35515c 100644 --- a/zitadel_client/models/organization_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_lock_user_request.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceProtobufAny(BaseModel): +class BetaUserServiceLockUserRequest(BaseModel): """ - OrganizationServiceProtobufAny + BetaUserServiceLockUserRequest """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceLockUserRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceLockUserRequest from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/beta_user_service_lock_user_response.py b/zitadel_client/models/beta_user_service_lock_user_response.py new file mode 100644 index 00000000..0c95b9b1 --- /dev/null +++ b/zitadel_client/models/beta_user_service_lock_user_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLockUserResponse(BaseModel): + """ + BetaUserServiceLockUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLockUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLockUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_login_name_query.py b/zitadel_client/models/beta_user_service_login_name_query.py new file mode 100644 index 00000000..d55f0a4f --- /dev/null +++ b/zitadel_client/models/beta_user_service_login_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceLoginNameQuery(BaseModel): + """ + Query for users with a specific state. + """ # noqa: E501 + login_name: StrictStr = Field(alias="loginName") + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["loginName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceLoginNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceLoginNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginName": obj.get("loginName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_machine_user.py b/zitadel_client/models/beta_user_service_machine_user.py new file mode 100644 index 00000000..182c65fc --- /dev/null +++ b/zitadel_client/models/beta_user_service_machine_user.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_access_token_type import BetaUserServiceAccessTokenType +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceMachineUser(BaseModel): + """ + BetaUserServiceMachineUser + """ # noqa: E501 + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + has_secret: Optional[StrictBool] = Field(default=None, alias="hasSecret") + access_token_type: Optional[BetaUserServiceAccessTokenType] = Field(default=None, alias="accessTokenType") + __properties: ClassVar[List[str]] = ["name", "description", "hasSecret", "accessTokenType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceMachineUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceMachineUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "hasSecret": obj.get("hasSecret"), + "accessTokenType": obj.get("accessTokenType") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_nick_name_query.py b/zitadel_client/models/beta_user_service_nick_name_query.py new file mode 100644 index 00000000..567de48a --- /dev/null +++ b/zitadel_client/models/beta_user_service_nick_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceNickNameQuery(BaseModel): + """ + Query for users with a specific nickname. + """ # noqa: E501 + nick_name: StrictStr = Field(alias="nickName") + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["nickName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceNickNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceNickNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nickName": obj.get("nickName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_not_query.py b/zitadel_client/models/beta_user_service_not_query.py new file mode 100644 index 00000000..658ac7ed --- /dev/null +++ b/zitadel_client/models/beta_user_service_not_query.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceNotQuery(BaseModel): + """ + Negate the sub-condition. + """ # noqa: E501 + query: Optional[BetaUserServiceSearchQuery] = None + __properties: ClassVar[List[str]] = ["query"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceNotQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceNotQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "query": BetaUserServiceSearchQuery.from_dict(obj["query"]) if obj.get("query") is not None else None + }) + return _obj + +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +# TODO: Rewrite to not use raise_errors +BetaUserServiceNotQuery.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/beta_user_service_notification_type.py b/zitadel_client/models/beta_user_service_notification_type.py new file mode 100644 index 00000000..e6178977 --- /dev/null +++ b/zitadel_client/models/beta_user_service_notification_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceNotificationType(str, Enum): + """ + BetaUserServiceNotificationType + """ + + """ + allowed enum values + """ + NOTIFICATION_TYPE_UNSPECIFIED = 'NOTIFICATION_TYPE_Unspecified' + NOTIFICATION_TYPE_EMAIL = 'NOTIFICATION_TYPE_Email' + NOTIFICATION_TYPE_SMS = 'NOTIFICATION_TYPE_SMS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceNotificationType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_rpc_status.py b/zitadel_client/models/beta_user_service_or_query.py similarity index 71% rename from zitadel_client/models/action_service_rpc_status.py rename to zitadel_client/models/beta_user_service_or_query.py index 06a47444..fba495d2 100644 --- a/zitadel_client/models/action_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_or_query.py @@ -17,19 +17,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.action_service_protobuf_any import ActionServiceProtobufAny from typing import Optional, Set from typing_extensions import Self -class ActionServiceRpcStatus(BaseModel): +class BetaUserServiceOrQuery(BaseModel): """ - ActionServiceRpcStatus + Connect multiple sub-condition with and OR operator. """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[ActionServiceProtobufAny]] = None + queries: Optional[List[BetaUserServiceSearchQuery]] = None + __properties: ClassVar[List[str]] = ["queries"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceOrQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +68,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) + # override the default output from pydantic by calling `to_dict()` of each item in queries (list) _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + if self.queries: + for _item_queries in self.queries: + if _item_queries: + _items.append(_item_queries.to_dict()) + _dict['queries'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceOrQuery from a dict""" if obj is None: return None @@ -89,10 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [ActionServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "queries": [BetaUserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj +from zitadel_client.models.beta_user_service_search_query import BetaUserServiceSearchQuery +# TODO: Rewrite to not use raise_errors +BetaUserServiceOrQuery.model_rebuild(raise_errors=False) diff --git a/zitadel_client/models/zitadelobjectv2_organization.py b/zitadel_client/models/beta_user_service_organization.py similarity index 85% rename from zitadel_client/models/zitadelobjectv2_organization.py rename to zitadel_client/models/beta_user_service_organization.py index aa0d7b48..dbbd7538 100644 --- a/zitadel_client/models/zitadelobjectv2_organization.py +++ b/zitadel_client/models/beta_user_service_organization.py @@ -18,16 +18,17 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class Zitadelobjectv2Organization(BaseModel): +class BetaUserServiceOrganization(BaseModel): """ - Zitadelobjectv2Organization + BetaUserServiceOrganization """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, alias="orgId") org_domain: Optional[StrictStr] = Field(default=None, alias="orgDomain") + org_id: Optional[StrictStr] = Field(default=None, alias="orgId") + __properties: ClassVar[List[str]] = ["orgDomain", "orgId"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Zitadelobjectv2Organization from a JSON string""" + """Create an instance of BetaUserServiceOrganization from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Zitadelobjectv2Organization from a dict""" + """Create an instance of BetaUserServiceOrganization from a dict""" if obj is None: return None @@ -80,8 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "orgDomain": obj.get("orgDomain") + "orgDomain": obj.get("orgDomain"), + "orgId": obj.get("orgId") }) return _obj diff --git a/zitadel_client/models/beta_user_service_organization_id_query.py b/zitadel_client/models/beta_user_service_organization_id_query.py new file mode 100644 index 00000000..f403d5a4 --- /dev/null +++ b/zitadel_client/models/beta_user_service_organization_id_query.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceOrganizationIdQuery(BaseModel): + """ + Query for users under a specific organization as resource owner. + """ # noqa: E501 + organization_id: StrictStr = Field(alias="organizationId") + __properties: ClassVar[List[str]] = ["organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceOrganizationIdQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceOrganizationIdQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_passkey_authenticator.py b/zitadel_client/models/beta_user_service_passkey_authenticator.py new file mode 100644 index 00000000..7740f1df --- /dev/null +++ b/zitadel_client/models/beta_user_service_passkey_authenticator.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServicePasskeyAuthenticator(str, Enum): + """ + BetaUserServicePasskeyAuthenticator + """ + + """ + allowed enum values + """ + PASSKEY_AUTHENTICATOR_UNSPECIFIED = 'PASSKEY_AUTHENTICATOR_UNSPECIFIED' + PASSKEY_AUTHENTICATOR_PLATFORM = 'PASSKEY_AUTHENTICATOR_PLATFORM' + PASSKEY_AUTHENTICATOR_CROSS_PLATFORM = 'PASSKEY_AUTHENTICATOR_CROSS_PLATFORM' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServicePasskeyAuthenticator from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_passkey_registration_code.py b/zitadel_client/models/beta_user_service_passkey_registration_code.py new file mode 100644 index 00000000..f9f6e5f0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_passkey_registration_code.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePasskeyRegistrationCode(BaseModel): + """ + BetaUserServicePasskeyRegistrationCode + """ # noqa: E501 + id: StrictStr + code: StrictStr + __properties: ClassVar[List[str]] = ["id", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePasskeyRegistrationCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePasskeyRegistrationCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_password.py b/zitadel_client/models/beta_user_service_password.py new file mode 100644 index 00000000..64dcc308 --- /dev/null +++ b/zitadel_client/models/beta_user_service_password.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePassword(BaseModel): + """ + BetaUserServicePassword + """ # noqa: E501 + password: StrictStr + change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["password", "changeRequired"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "changeRequired": obj.get("changeRequired") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_password_reset_request.py b/zitadel_client/models/beta_user_service_password_reset_request.py new file mode 100644 index 00000000..eba10910 --- /dev/null +++ b/zitadel_client/models/beta_user_service_password_reset_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_send_password_reset_link import BetaUserServiceSendPasswordResetLink +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePasswordResetRequest(BaseModel): + """ + BetaUserServicePasswordResetRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_link: Optional[BetaUserServiceSendPasswordResetLink] = Field(default=None, alias="sendLink") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendLink"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePasswordResetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePasswordResetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendLink": BetaUserServiceSendPasswordResetLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_password_reset_response.py b/zitadel_client/models/beta_user_service_password_reset_response.py new file mode 100644 index 00000000..be15c5d3 --- /dev/null +++ b/zitadel_client/models/beta_user_service_password_reset_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePasswordResetResponse(BaseModel): + """ + BetaUserServicePasswordResetResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the medium was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePasswordResetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePasswordResetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_phone_query.py b/zitadel_client/models/beta_user_service_phone_query.py new file mode 100644 index 00000000..0b64008b --- /dev/null +++ b/zitadel_client/models/beta_user_service_phone_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServicePhoneQuery(BaseModel): + """ + Query for users with a specific phone. + """ # noqa: E501 + number: StrictStr + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["number", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServicePhoneQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServicePhoneQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number": obj.get("number"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_reactivate_user_request.py b/zitadel_client/models/beta_user_service_reactivate_user_request.py new file mode 100644 index 00000000..0bcff180 --- /dev/null +++ b/zitadel_client/models/beta_user_service_reactivate_user_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceReactivateUserRequest(BaseModel): + """ + BetaUserServiceReactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_reactivate_user_response.py b/zitadel_client/models/beta_user_service_reactivate_user_response.py new file mode 100644 index 00000000..1161d382 --- /dev/null +++ b/zitadel_client/models/beta_user_service_reactivate_user_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceReactivateUserResponse(BaseModel): + """ + BetaUserServiceReactivateUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceReactivateUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_redirect_urls.py b/zitadel_client/models/beta_user_service_redirect_urls.py new file mode 100644 index 00000000..243ed829 --- /dev/null +++ b/zitadel_client/models/beta_user_service_redirect_urls.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRedirectURLs(BaseModel): + """ + BetaUserServiceRedirectURLs + """ # noqa: E501 + success_url: Optional[StrictStr] = Field(default=None, alias="successUrl") + failure_url: Optional[StrictStr] = Field(default=None, alias="failureUrl") + __properties: ClassVar[List[str]] = ["successUrl", "failureUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRedirectURLs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRedirectURLs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "successUrl": obj.get("successUrl"), + "failureUrl": obj.get("failureUrl") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_passkey_request.py b/zitadel_client/models/beta_user_service_register_passkey_request.py new file mode 100644 index 00000000..85de1f2d --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_passkey_request.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_passkey_authenticator import BetaUserServicePasskeyAuthenticator +from zitadel_client.models.beta_user_service_passkey_registration_code import BetaUserServicePasskeyRegistrationCode +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterPasskeyRequest(BaseModel): + """ + BetaUserServiceRegisterPasskeyRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + code: Optional[BetaUserServicePasskeyRegistrationCode] = None + authenticator: Optional[BetaUserServicePasskeyAuthenticator] = None + domain: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["userId", "code", "authenticator", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of code + if self.code: + _dict['code'] = self.code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "code": BetaUserServicePasskeyRegistrationCode.from_dict(obj["code"]) if obj.get("code") is not None else None, + "authenticator": obj.get("authenticator"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_passkey_response.py b/zitadel_client/models/beta_user_service_register_passkey_response.py new file mode 100644 index 00000000..e5b76943 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_passkey_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterPasskeyResponse(BaseModel): + """ + BetaUserServiceRegisterPasskeyResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + passkey_id: Optional[StrictStr] = Field(default=None, alias="passkeyId") + public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") + __properties: ClassVar[List[str]] = ["details", "passkeyId", "publicKeyCredentialCreationOptions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterPasskeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "passkeyId": obj.get("passkeyId"), + "publicKeyCredentialCreationOptions": obj.get("publicKeyCredentialCreationOptions") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_totp_request.py b/zitadel_client/models/beta_user_service_register_totp_request.py new file mode 100644 index 00000000..e9e68356 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_totp_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterTOTPRequest(BaseModel): + """ + BetaUserServiceRegisterTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_totp_response.py b/zitadel_client/models/beta_user_service_register_totp_response.py new file mode 100644 index 00000000..9cac8119 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_totp_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterTOTPResponse(BaseModel): + """ + BetaUserServiceRegisterTOTPResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + uri: Optional[StrictStr] = None + secret: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["details", "uri", "secret"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterTOTPResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "uri": obj.get("uri"), + "secret": obj.get("secret") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_u2_f_request.py b/zitadel_client/models/beta_user_service_register_u2_f_request.py new file mode 100644 index 00000000..afdb1877 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_u2_f_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterU2FRequest(BaseModel): + """ + BetaUserServiceRegisterU2FRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + domain: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["userId", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_register_u2_f_response.py b/zitadel_client/models/beta_user_service_register_u2_f_response.py new file mode 100644 index 00000000..b2fa77f0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_register_u2_f_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRegisterU2FResponse(BaseModel): + """ + BetaUserServiceRegisterU2FResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + u2f_id: Optional[StrictStr] = Field(default=None, alias="u2fId") + public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") + __properties: ClassVar[List[str]] = ["details", "u2fId", "publicKeyCredentialCreationOptions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRegisterU2FResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "u2fId": obj.get("u2fId"), + "publicKeyCredentialCreationOptions": obj.get("publicKeyCredentialCreationOptions") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otp_email_request.py b/zitadel_client/models/beta_user_service_remove_otp_email_request.py new file mode 100644 index 00000000..d0e6e91e --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otp_email_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPEmailRequest(BaseModel): + """ + BetaUserServiceRemoveOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otp_email_response.py b/zitadel_client/models/beta_user_service_remove_otp_email_response.py new file mode 100644 index 00000000..2a19adc9 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otp_email_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPEmailResponse(BaseModel): + """ + BetaUserServiceRemoveOTPEmailResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPEmailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otpsms_request.py b/zitadel_client/models/beta_user_service_remove_otpsms_request.py new file mode 100644 index 00000000..22f95545 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otpsms_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPSMSRequest(BaseModel): + """ + BetaUserServiceRemoveOTPSMSRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_otpsms_response.py b/zitadel_client/models/beta_user_service_remove_otpsms_response.py new file mode 100644 index 00000000..c0da6f9b --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_otpsms_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveOTPSMSResponse(BaseModel): + """ + BetaUserServiceRemoveOTPSMSResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveOTPSMSResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_phone_request.py b/zitadel_client/models/beta_user_service_remove_phone_request.py new file mode 100644 index 00000000..03190fd6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_phone_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemovePhoneRequest(BaseModel): + """ + BetaUserServiceRemovePhoneRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_phone_response.py b/zitadel_client/models/beta_user_service_remove_phone_response.py new file mode 100644 index 00000000..772ae8d1 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_phone_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemovePhoneResponse(BaseModel): + """ + BetaUserServiceRemovePhoneResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemovePhoneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_totp_request.py b/zitadel_client/models/beta_user_service_remove_totp_request.py new file mode 100644 index 00000000..d2ff1797 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_totp_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveTOTPRequest(BaseModel): + """ + BetaUserServiceRemoveTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_remove_totp_response.py b/zitadel_client/models/beta_user_service_remove_totp_response.py new file mode 100644 index 00000000..704396a9 --- /dev/null +++ b/zitadel_client/models/beta_user_service_remove_totp_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRemoveTOTPResponse(BaseModel): + """ + BetaUserServiceRemoveTOTPResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRemoveTOTPResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_resend_email_code_request.py b/zitadel_client/models/beta_user_service_resend_email_code_request.py new file mode 100644 index 00000000..b7b19500 --- /dev/null +++ b/zitadel_client/models/beta_user_service_resend_email_code_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_send_email_verification_code import BetaUserServiceSendEmailVerificationCode +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceResendEmailCodeRequest(BaseModel): + """ + BetaUserServiceResendEmailCodeRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[BetaUserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceResendEmailCodeRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceResendEmailCodeRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendCode": BetaUserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_resend_email_code_response.py b/zitadel_client/models/beta_user_service_resend_email_code_response.py new file mode 100644 index 00000000..69be68b6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_resend_email_code_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceResendEmailCodeResponse(BaseModel): + """ + BetaUserServiceResendEmailCodeResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceResendEmailCodeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceResendEmailCodeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_update_target_response.py b/zitadel_client/models/beta_user_service_resend_phone_code_request.py similarity index 75% rename from zitadel_client/models/action_service_beta_update_target_response.py rename to zitadel_client/models/beta_user_service_resend_phone_code_request.py index 0056e065..3bde521c 100644 --- a/zitadel_client/models/action_service_beta_update_target_response.py +++ b/zitadel_client/models/beta_user_service_resend_phone_code_request.py @@ -17,18 +17,19 @@ import re # noqa: F401 import json -from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self -class ActionServiceBetaUpdateTargetResponse(BaseModel): +class BetaUserServiceResendPhoneCodeRequest(BaseModel): """ - ActionServiceBetaUpdateTargetResponse + BetaUserServiceResendPhoneCodeRequest """ # noqa: E501 - change_date: Optional[datetime] = Field(default=None, description="The timestamp of the change of the target.", alias="changeDate") - signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + user_id: StrictStr = Field(alias="userId") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ActionServiceBetaUpdateTargetResponse from a JSON string""" + """Create an instance of BetaUserServiceResendPhoneCodeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ActionServiceBetaUpdateTargetResponse from a dict""" + """Create an instance of BetaUserServiceResendPhoneCodeRequest from a dict""" if obj is None: return None @@ -81,8 +82,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "changeDate": obj.get("changeDate"), - "signingKey": obj.get("signingKey") + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendCode": obj.get("sendCode") }) return _obj diff --git a/zitadel_client/models/beta_user_service_resend_phone_code_response.py b/zitadel_client/models/beta_user_service_resend_phone_code_response.py new file mode 100644 index 00000000..595e2017 --- /dev/null +++ b/zitadel_client/models/beta_user_service_resend_phone_code_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceResendPhoneCodeResponse(BaseModel): + """ + BetaUserServiceResendPhoneCodeResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceResendPhoneCodeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceResendPhoneCodeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_request.py b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_request.py new file mode 100644 index 00000000..4dfe9bcf --- /dev/null +++ b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRetrieveIdentityProviderIntentRequest(BaseModel): + """ + BetaUserServiceRetrieveIdentityProviderIntentRequest + """ # noqa: E501 + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), + "idpIntentToken": obj.get("idpIntentToken") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_response.py b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_response.py new file mode 100644 index 00000000..2d302629 --- /dev/null +++ b/zitadel_client/models/beta_user_service_retrieve_identity_provider_intent_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_idp_information import BetaUserServiceIDPInformation +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceRetrieveIdentityProviderIntentResponse(BaseModel): + """ + BetaUserServiceRetrieveIdentityProviderIntentResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + idp_information: Optional[BetaUserServiceIDPInformation] = Field(default=None, alias="idpInformation") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["details", "idpInformation", "userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of idp_information + if self.idp_information: + _dict['idpInformation'] = self.idp_information.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceRetrieveIdentityProviderIntentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "idpInformation": BetaUserServiceIDPInformation.from_dict(obj["idpInformation"]) if obj.get("idpInformation") is not None else None, + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_search_query.py b/zitadel_client/models/beta_user_service_search_query.py new file mode 100644 index 00000000..21cac2e5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_search_query.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_display_name_query import BetaUserServiceDisplayNameQuery +from zitadel_client.models.beta_user_service_email_query import BetaUserServiceEmailQuery +from zitadel_client.models.beta_user_service_first_name_query import BetaUserServiceFirstNameQuery +from zitadel_client.models.beta_user_service_in_user_emails_query import BetaUserServiceInUserEmailsQuery +from zitadel_client.models.beta_user_service_in_user_id_query import BetaUserServiceInUserIDQuery +from zitadel_client.models.beta_user_service_last_name_query import BetaUserServiceLastNameQuery +from zitadel_client.models.beta_user_service_login_name_query import BetaUserServiceLoginNameQuery +from zitadel_client.models.beta_user_service_nick_name_query import BetaUserServiceNickNameQuery +from zitadel_client.models.beta_user_service_organization_id_query import BetaUserServiceOrganizationIdQuery +from zitadel_client.models.beta_user_service_phone_query import BetaUserServicePhoneQuery +from zitadel_client.models.beta_user_service_state_query import BetaUserServiceStateQuery +from zitadel_client.models.beta_user_service_type_query import BetaUserServiceTypeQuery +from zitadel_client.models.beta_user_service_user_name_query import BetaUserServiceUserNameQuery +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSearchQuery(BaseModel): + """ + BetaUserServiceSearchQuery + """ # noqa: E501 + and_query: Optional[BetaUserServiceAndQuery] = Field(default=None, alias="andQuery") + display_name_query: Optional[BetaUserServiceDisplayNameQuery] = Field(default=None, alias="displayNameQuery") + email_query: Optional[BetaUserServiceEmailQuery] = Field(default=None, alias="emailQuery") + first_name_query: Optional[BetaUserServiceFirstNameQuery] = Field(default=None, alias="firstNameQuery") + in_user_emails_query: Optional[BetaUserServiceInUserEmailsQuery] = Field(default=None, alias="inUserEmailsQuery") + in_user_ids_query: Optional[BetaUserServiceInUserIDQuery] = Field(default=None, alias="inUserIdsQuery") + last_name_query: Optional[BetaUserServiceLastNameQuery] = Field(default=None, alias="lastNameQuery") + login_name_query: Optional[BetaUserServiceLoginNameQuery] = Field(default=None, alias="loginNameQuery") + nick_name_query: Optional[BetaUserServiceNickNameQuery] = Field(default=None, alias="nickNameQuery") + not_query: Optional[BetaUserServiceNotQuery] = Field(default=None, alias="notQuery") + or_query: Optional[BetaUserServiceOrQuery] = Field(default=None, alias="orQuery") + organization_id_query: Optional[BetaUserServiceOrganizationIdQuery] = Field(default=None, alias="organizationIdQuery") + phone_query: Optional[BetaUserServicePhoneQuery] = Field(default=None, alias="phoneQuery") + state_query: Optional[BetaUserServiceStateQuery] = Field(default=None, alias="stateQuery") + type_query: Optional[BetaUserServiceTypeQuery] = Field(default=None, alias="typeQuery") + user_name_query: Optional[BetaUserServiceUserNameQuery] = Field(default=None, alias="userNameQuery") + __properties: ClassVar[List[str]] = ["andQuery", "displayNameQuery", "emailQuery", "firstNameQuery", "inUserEmailsQuery", "inUserIdsQuery", "lastNameQuery", "loginNameQuery", "nickNameQuery", "notQuery", "orQuery", "organizationIdQuery", "phoneQuery", "stateQuery", "typeQuery", "userNameQuery"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSearchQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of and_query + if self.and_query: + _dict['andQuery'] = self.and_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of display_name_query + if self.display_name_query: + _dict['displayNameQuery'] = self.display_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of email_query + if self.email_query: + _dict['emailQuery'] = self.email_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of first_name_query + if self.first_name_query: + _dict['firstNameQuery'] = self.first_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of in_user_emails_query + if self.in_user_emails_query: + _dict['inUserEmailsQuery'] = self.in_user_emails_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of in_user_ids_query + if self.in_user_ids_query: + _dict['inUserIdsQuery'] = self.in_user_ids_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of last_name_query + if self.last_name_query: + _dict['lastNameQuery'] = self.last_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of login_name_query + if self.login_name_query: + _dict['loginNameQuery'] = self.login_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of nick_name_query + if self.nick_name_query: + _dict['nickNameQuery'] = self.nick_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of not_query + if self.not_query: + _dict['notQuery'] = self.not_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of or_query + if self.or_query: + _dict['orQuery'] = self.or_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of organization_id_query + if self.organization_id_query: + _dict['organizationIdQuery'] = self.organization_id_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone_query + if self.phone_query: + _dict['phoneQuery'] = self.phone_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of state_query + if self.state_query: + _dict['stateQuery'] = self.state_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of type_query + if self.type_query: + _dict['typeQuery'] = self.type_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_name_query + if self.user_name_query: + _dict['userNameQuery'] = self.user_name_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSearchQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "andQuery": BetaUserServiceAndQuery.from_dict(obj["andQuery"]) if obj.get("andQuery") is not None else None, + "displayNameQuery": BetaUserServiceDisplayNameQuery.from_dict(obj["displayNameQuery"]) if obj.get("displayNameQuery") is not None else None, + "emailQuery": BetaUserServiceEmailQuery.from_dict(obj["emailQuery"]) if obj.get("emailQuery") is not None else None, + "firstNameQuery": BetaUserServiceFirstNameQuery.from_dict(obj["firstNameQuery"]) if obj.get("firstNameQuery") is not None else None, + "inUserEmailsQuery": BetaUserServiceInUserEmailsQuery.from_dict(obj["inUserEmailsQuery"]) if obj.get("inUserEmailsQuery") is not None else None, + "inUserIdsQuery": BetaUserServiceInUserIDQuery.from_dict(obj["inUserIdsQuery"]) if obj.get("inUserIdsQuery") is not None else None, + "lastNameQuery": BetaUserServiceLastNameQuery.from_dict(obj["lastNameQuery"]) if obj.get("lastNameQuery") is not None else None, + "loginNameQuery": BetaUserServiceLoginNameQuery.from_dict(obj["loginNameQuery"]) if obj.get("loginNameQuery") is not None else None, + "nickNameQuery": BetaUserServiceNickNameQuery.from_dict(obj["nickNameQuery"]) if obj.get("nickNameQuery") is not None else None, + "notQuery": BetaUserServiceNotQuery.from_dict(obj["notQuery"]) if obj.get("notQuery") is not None else None, + "orQuery": BetaUserServiceOrQuery.from_dict(obj["orQuery"]) if obj.get("orQuery") is not None else None, + "organizationIdQuery": BetaUserServiceOrganizationIdQuery.from_dict(obj["organizationIdQuery"]) if obj.get("organizationIdQuery") is not None else None, + "phoneQuery": BetaUserServicePhoneQuery.from_dict(obj["phoneQuery"]) if obj.get("phoneQuery") is not None else None, + "stateQuery": BetaUserServiceStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None, + "typeQuery": BetaUserServiceTypeQuery.from_dict(obj["typeQuery"]) if obj.get("typeQuery") is not None else None, + "userNameQuery": BetaUserServiceUserNameQuery.from_dict(obj["userNameQuery"]) if obj.get("userNameQuery") is not None else None + }) + return _obj + +from zitadel_client.models.beta_user_service_and_query import BetaUserServiceAndQuery +from zitadel_client.models.beta_user_service_not_query import BetaUserServiceNotQuery +from zitadel_client.models.beta_user_service_or_query import BetaUserServiceOrQuery +# TODO: Rewrite to not use raise_errors +BetaUserServiceSearchQuery.model_rebuild(raise_errors=False) + diff --git a/zitadel_client/models/beta_user_service_send_email_verification_code.py b/zitadel_client/models/beta_user_service_send_email_verification_code.py new file mode 100644 index 00000000..3b652b3b --- /dev/null +++ b/zitadel_client/models/beta_user_service_send_email_verification_code.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSendEmailVerificationCode(BaseModel): + """ + BetaUserServiceSendEmailVerificationCode + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSendEmailVerificationCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSendEmailVerificationCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_send_passkey_registration_link.py b/zitadel_client/models/beta_user_service_send_passkey_registration_link.py new file mode 100644 index 00000000..4257e20e --- /dev/null +++ b/zitadel_client/models/beta_user_service_send_passkey_registration_link.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSendPasskeyRegistrationLink(BaseModel): + """ + BetaUserServiceSendPasskeyRegistrationLink + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasskeyRegistrationLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasskeyRegistrationLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_send_password_reset_link.py b/zitadel_client/models/beta_user_service_send_password_reset_link.py new file mode 100644 index 00000000..9363fe93 --- /dev/null +++ b/zitadel_client/models/beta_user_service_send_password_reset_link.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_notification_type import BetaUserServiceNotificationType +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSendPasswordResetLink(BaseModel): + """ + BetaUserServiceSendPasswordResetLink + """ # noqa: E501 + notification_type: Optional[BetaUserServiceNotificationType] = Field(default=None, alias="notificationType") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["notificationType", "urlTemplate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasswordResetLink from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSendPasswordResetLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "notificationType": obj.get("notificationType"), + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_rpc_status.py b/zitadel_client/models/beta_user_service_set_email_request.py similarity index 62% rename from zitadel_client/models/user_service_rpc_status.py rename to zitadel_client/models/beta_user_service_set_email_request.py index 7fde756c..ef622e88 100644 --- a/zitadel_client/models/user_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_set_email_request.py @@ -17,19 +17,22 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.user_service_protobuf_any import UserServiceProtobufAny +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_send_email_verification_code import BetaUserServiceSendEmailVerificationCode from typing import Optional, Set from typing_extensions import Self -class UserServiceRpcStatus(BaseModel): +class BetaUserServiceSetEmailRequest(BaseModel): """ - UserServiceRpcStatus + BetaUserServiceSetEmailRequest """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[UserServiceProtobufAny]] = None + user_id: StrictStr = Field(alias="userId") + email: StrictStr + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[BetaUserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "email", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceSetEmailRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +73,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceSetEmailRequest from a dict""" if obj is None: return None @@ -89,9 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [UserServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "userId": obj.get("userId"), + "email": obj.get("email"), + "isVerified": obj.get("isVerified"), + "returnCode": obj.get("returnCode"), + "sendCode": BetaUserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_user_service_set_email_response.py b/zitadel_client/models/beta_user_service_set_email_response.py new file mode 100644 index 00000000..0d602835 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_email_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetEmailResponse(BaseModel): + """ + BetaUserServiceSetEmailResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetEmailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetEmailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/saml_service_rpc_status.py b/zitadel_client/models/beta_user_service_set_human_email.py similarity index 64% rename from zitadel_client/models/saml_service_rpc_status.py rename to zitadel_client/models/beta_user_service_set_human_email.py index 813edfca..5063f8cf 100644 --- a/zitadel_client/models/saml_service_rpc_status.py +++ b/zitadel_client/models/beta_user_service_set_human_email.py @@ -17,19 +17,21 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.saml_service_protobuf_any import SAMLServiceProtobufAny +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_send_email_verification_code import BetaUserServiceSendEmailVerificationCode from typing import Optional, Set from typing_extensions import Self -class SAMLServiceRpcStatus(BaseModel): +class BetaUserServiceSetHumanEmail(BaseModel): """ - SAMLServiceRpcStatus + BetaUserServiceSetHumanEmail """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - details: Optional[List[SAMLServiceProtobufAny]] = None + email: StrictStr + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[BetaUserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["email", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SAMLServiceRpcStatus from a JSON string""" + """Create an instance of BetaUserServiceSetHumanEmail from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,18 +72,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in details (list) - _items = [] - if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) - _dict['details'] = _items + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SAMLServiceRpcStatus from a dict""" + """Create an instance of BetaUserServiceSetHumanEmail from a dict""" if obj is None: return None @@ -89,9 +87,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message"), - "details": [SAMLServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "email": obj.get("email"), + "isVerified": obj.get("isVerified"), + "returnCode": obj.get("returnCode"), + "sendCode": BetaUserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_user_service_set_human_phone.py b/zitadel_client/models/beta_user_service_set_human_phone.py new file mode 100644 index 00000000..276525f6 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_human_phone.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetHumanPhone(BaseModel): + """ + BetaUserServiceSetHumanPhone + """ # noqa: E501 + phone: Optional[StrictStr] = None + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["phone", "isVerified", "returnCode", "sendCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetHumanPhone from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetHumanPhone from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "phone": obj.get("phone"), + "isVerified": obj.get("isVerified"), + "returnCode": obj.get("returnCode"), + "sendCode": obj.get("sendCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_human_profile.py b/zitadel_client/models/beta_user_service_set_human_profile.py new file mode 100644 index 00000000..c747dddb --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_human_profile.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_gender import BetaUserServiceGender +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetHumanProfile(BaseModel): + """ + BetaUserServiceSetHumanProfile + """ # noqa: E501 + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[BetaUserServiceGender] = None + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetHumanProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetHumanProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "givenName": obj.get("givenName"), + "familyName": obj.get("familyName"), + "nickName": obj.get("nickName"), + "displayName": obj.get("displayName"), + "preferredLanguage": obj.get("preferredLanguage"), + "gender": obj.get("gender") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_metadata_entry.py b/zitadel_client/models/beta_user_service_set_metadata_entry.py new file mode 100644 index 00000000..bc06545c --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_metadata_entry.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetMetadataEntry(BaseModel): + """ + BetaUserServiceSetMetadataEntry + """ # noqa: E501 + key: StrictStr + value: Union[StrictBytes, StrictStr] + __properties: ClassVar[List[str]] = ["key", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetMetadataEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetMetadataEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_password.py b/zitadel_client/models/beta_user_service_set_password.py new file mode 100644 index 00000000..dcf4578c --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_password.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_hashed_password import BetaUserServiceHashedPassword +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPassword(BaseModel): + """ + BetaUserServiceSetPassword + """ # noqa: E501 + hashed_password: Optional[BetaUserServiceHashedPassword] = Field(default=None, alias="hashedPassword") + password: Optional[BetaUserServicePassword] = None + current_password: Optional[StrictStr] = Field(default=None, alias="currentPassword") + verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + __properties: ClassVar[List[str]] = ["hashedPassword", "password", "currentPassword", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPassword from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPassword from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hashedPassword": BetaUserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, + "password": BetaUserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, + "currentPassword": obj.get("currentPassword"), + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_password_request.py b/zitadel_client/models/beta_user_service_set_password_request.py new file mode 100644 index 00000000..069b63ce --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_password_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_password import BetaUserServicePassword +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPasswordRequest(BaseModel): + """ + BetaUserServiceSetPasswordRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + new_password: Optional[BetaUserServicePassword] = Field(default=None, alias="newPassword") + current_password: Optional[StrictStr] = Field(default=None, alias="currentPassword") + verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + __properties: ClassVar[List[str]] = ["userId", "newPassword", "currentPassword", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPasswordRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of new_password + if self.new_password: + _dict['newPassword'] = self.new_password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPasswordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "newPassword": BetaUserServicePassword.from_dict(obj["newPassword"]) if obj.get("newPassword") is not None else None, + "currentPassword": obj.get("currentPassword"), + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_password_response.py b/zitadel_client/models/beta_user_service_set_password_response.py new file mode 100644 index 00000000..f3735507 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_password_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPasswordResponse(BaseModel): + """ + BetaUserServiceSetPasswordResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPasswordResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPasswordResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_phone_request.py b/zitadel_client/models/beta_user_service_set_phone_request.py new file mode 100644 index 00000000..df326334 --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_phone_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPhoneRequest(BaseModel): + """ + BetaUserServiceSetPhoneRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + phone: StrictStr + is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "phone", "isVerified", "returnCode", "sendCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPhoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "phone": obj.get("phone"), + "isVerified": obj.get("isVerified"), + "returnCode": obj.get("returnCode"), + "sendCode": obj.get("sendCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_set_phone_response.py b/zitadel_client/models/beta_user_service_set_phone_response.py new file mode 100644 index 00000000..0f233cbb --- /dev/null +++ b/zitadel_client/models/beta_user_service_set_phone_response.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceSetPhoneResponse(BaseModel): + """ + BetaUserServiceSetPhoneResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPhoneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceSetPhoneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_start_identity_provider_intent_request.py b/zitadel_client/models/beta_user_service_start_identity_provider_intent_request.py new file mode 100644 index 00000000..f2f5d291 --- /dev/null +++ b/zitadel_client/models/beta_user_service_start_identity_provider_intent_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_ldap_credentials import BetaUserServiceLDAPCredentials +from zitadel_client.models.beta_user_service_redirect_urls import BetaUserServiceRedirectURLs +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceStartIdentityProviderIntentRequest(BaseModel): + """ + BetaUserServiceStartIdentityProviderIntentRequest + """ # noqa: E501 + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + ldap: Optional[BetaUserServiceLDAPCredentials] = None + urls: Optional[BetaUserServiceRedirectURLs] = None + __properties: ClassVar[List[str]] = ["idpId", "ldap", "urls"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceStartIdentityProviderIntentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + # override the default output from pydantic by calling `to_dict()` of urls + if self.urls: + _dict['urls'] = self.urls.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceStartIdentityProviderIntentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idpId": obj.get("idpId"), + "ldap": BetaUserServiceLDAPCredentials.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, + "urls": BetaUserServiceRedirectURLs.from_dict(obj["urls"]) if obj.get("urls") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_start_identity_provider_intent_response.py b/zitadel_client/models/beta_user_service_start_identity_provider_intent_response.py new file mode 100644 index 00000000..b1815e77 --- /dev/null +++ b/zitadel_client/models/beta_user_service_start_identity_provider_intent_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_form_data import BetaUserServiceFormData +from zitadel_client.models.beta_user_service_idp_intent import BetaUserServiceIDPIntent +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceStartIdentityProviderIntentResponse(BaseModel): + """ + BetaUserServiceStartIdentityProviderIntentResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + auth_url: Optional[StrictStr] = Field(default=None, description="URL to which the client should redirect", alias="authUrl") + form_data: Optional[BetaUserServiceFormData] = Field(default=None, alias="formData") + idp_intent: Optional[BetaUserServiceIDPIntent] = Field(default=None, alias="idpIntent") + post_form: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="POST call information Deprecated: Use form_data instead", alias="postForm") + __properties: ClassVar[List[str]] = ["details", "authUrl", "formData", "idpIntent", "postForm"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceStartIdentityProviderIntentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of form_data + if self.form_data: + _dict['formData'] = self.form_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of idp_intent + if self.idp_intent: + _dict['idpIntent'] = self.idp_intent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceStartIdentityProviderIntentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "authUrl": obj.get("authUrl"), + "formData": BetaUserServiceFormData.from_dict(obj["formData"]) if obj.get("formData") is not None else None, + "idpIntent": BetaUserServiceIDPIntent.from_dict(obj["idpIntent"]) if obj.get("idpIntent") is not None else None, + "postForm": obj.get("postForm") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_protobuf_any.py b/zitadel_client/models/beta_user_service_state_query.py similarity index 81% rename from zitadel_client/models/session_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_state_query.py index e62c32ef..b0134e89 100644 --- a/zitadel_client/models/session_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_state_query.py @@ -17,16 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict +from zitadel_client.models.beta_user_service_user_state import BetaUserServiceUserState from typing import Optional, Set from typing_extensions import Self -class SessionServiceProtobufAny(BaseModel): +class BetaUserServiceStateQuery(BaseModel): """ - SessionServiceProtobufAny + Query for users with a specific state. """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + state: BetaUserServiceUserState + __properties: ClassVar[List[str]] = ["state"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceStateQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceStateQuery from a dict""" if obj is None: return None @@ -79,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "state": obj.get("state") }) return _obj diff --git a/zitadel_client/models/beta_user_service_text_query_method.py b/zitadel_client/models/beta_user_service_text_query_method.py new file mode 100644 index 00000000..b8800590 --- /dev/null +++ b/zitadel_client/models/beta_user_service_text_query_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceTextQueryMethod(str, Enum): + """ + BetaUserServiceTextQueryMethod + """ + + """ + allowed enum values + """ + TEXT_QUERY_METHOD_EQUALS = 'TEXT_QUERY_METHOD_EQUALS' + TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE = 'TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE' + TEXT_QUERY_METHOD_STARTS_WITH = 'TEXT_QUERY_METHOD_STARTS_WITH' + TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_QUERY_METHOD_CONTAINS = 'TEXT_QUERY_METHOD_CONTAINS' + TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE' + TEXT_QUERY_METHOD_ENDS_WITH = 'TEXT_QUERY_METHOD_ENDS_WITH' + TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceTextQueryMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_type.py b/zitadel_client/models/beta_user_service_type.py new file mode 100644 index 00000000..6e9da096 --- /dev/null +++ b/zitadel_client/models/beta_user_service_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceType(str, Enum): + """ + BetaUserServiceType + """ + + """ + allowed enum values + """ + TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED' + TYPE_HUMAN = 'TYPE_HUMAN' + TYPE_MACHINE = 'TYPE_MACHINE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_protobuf_any.py b/zitadel_client/models/beta_user_service_type_query.py similarity index 82% rename from zitadel_client/models/web_key_service_protobuf_any.py rename to zitadel_client/models/beta_user_service_type_query.py index ac83c98a..3a076255 100644 --- a/zitadel_client/models/web_key_service_protobuf_any.py +++ b/zitadel_client/models/beta_user_service_type_query.py @@ -17,16 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict +from zitadel_client.models.beta_user_service_type import BetaUserServiceType from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceProtobufAny(BaseModel): +class BetaUserServiceTypeQuery(BaseModel): """ - WebKeyServiceProtobufAny + Query for users with a specific type. """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + type: BetaUserServiceType + __properties: ClassVar[List[str]] = ["type"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceProtobufAny from a JSON string""" + """Create an instance of BetaUserServiceTypeQuery from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceProtobufAny from a dict""" + """Create an instance of BetaUserServiceTypeQuery from a dict""" if obj is None: return None @@ -79,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "type": obj.get("type") }) return _obj diff --git a/zitadel_client/models/beta_user_service_unlock_user_request.py b/zitadel_client/models/beta_user_service_unlock_user_request.py new file mode 100644 index 00000000..9392451f --- /dev/null +++ b/zitadel_client/models/beta_user_service_unlock_user_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUnlockUserRequest(BaseModel): + """ + BetaUserServiceUnlockUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_unlock_user_response.py b/zitadel_client/models/beta_user_service_unlock_user_response.py new file mode 100644 index 00000000..f6e893ce --- /dev/null +++ b/zitadel_client/models/beta_user_service_unlock_user_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUnlockUserResponse(BaseModel): + """ + BetaUserServiceUnlockUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUnlockUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_update_human_user_request.py b/zitadel_client/models/beta_user_service_update_human_user_request.py new file mode 100644 index 00000000..c368fbf0 --- /dev/null +++ b/zitadel_client/models/beta_user_service_update_human_user_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_set_human_email import BetaUserServiceSetHumanEmail +from zitadel_client.models.beta_user_service_set_human_phone import BetaUserServiceSetHumanPhone +from zitadel_client.models.beta_user_service_set_human_profile import BetaUserServiceSetHumanProfile +from zitadel_client.models.beta_user_service_set_password import BetaUserServiceSetPassword +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUpdateHumanUserRequest(BaseModel): + """ + BetaUserServiceUpdateHumanUserRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + username: Optional[StrictStr] = None + profile: Optional[BetaUserServiceSetHumanProfile] = None + email: Optional[BetaUserServiceSetHumanEmail] = None + phone: Optional[BetaUserServiceSetHumanPhone] = None + password: Optional[BetaUserServiceSetPassword] = None + __properties: ClassVar[List[str]] = ["userId", "username", "profile", "email", "phone", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "username": obj.get("username"), + "profile": BetaUserServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "email": BetaUserServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "phone": BetaUserServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "password": BetaUserServiceSetPassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_update_human_user_response.py b/zitadel_client/models/beta_user_service_update_human_user_response.py new file mode 100644 index 00000000..0f330ab8 --- /dev/null +++ b/zitadel_client/models/beta_user_service_update_human_user_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUpdateHumanUserResponse(BaseModel): + """ + BetaUserServiceUpdateHumanUserResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + __properties: ClassVar[List[str]] = ["details", "emailCode", "phoneCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUpdateHumanUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_user.py b/zitadel_client/models/beta_user_service_user.py new file mode 100644 index 00000000..32ed13e9 --- /dev/null +++ b/zitadel_client/models/beta_user_service_user.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from zitadel_client.models.beta_user_service_human_user import BetaUserServiceHumanUser +from zitadel_client.models.beta_user_service_machine_user import BetaUserServiceMachineUser +from zitadel_client.models.beta_user_service_user_state import BetaUserServiceUserState +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUser(BaseModel): + """ + BetaUserServiceUser + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + details: Optional[BetaUserServiceDetails] = None + state: Optional[BetaUserServiceUserState] = None + username: Optional[StrictStr] = None + login_names: Optional[List[StrictStr]] = Field(default=None, alias="loginNames") + preferred_login_name: Optional[StrictStr] = Field(default=None, alias="preferredLoginName") + human: Optional[BetaUserServiceHumanUser] = None + machine: Optional[BetaUserServiceMachineUser] = None + __properties: ClassVar[List[str]] = ["userId", "details", "state", "username", "loginNames", "preferredLoginName", "human", "machine"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + # override the default output from pydantic by calling `to_dict()` of machine + if self.machine: + _dict['machine'] = self.machine.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "state": obj.get("state"), + "username": obj.get("username"), + "loginNames": obj.get("loginNames"), + "preferredLoginName": obj.get("preferredLoginName"), + "human": BetaUserServiceHumanUser.from_dict(obj["human"]) if obj.get("human") is not None else None, + "machine": BetaUserServiceMachineUser.from_dict(obj["machine"]) if obj.get("machine") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_user_field_name.py b/zitadel_client/models/beta_user_service_user_field_name.py new file mode 100644 index 00000000..13dd0fa1 --- /dev/null +++ b/zitadel_client/models/beta_user_service_user_field_name.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceUserFieldName(str, Enum): + """ + BetaUserServiceUserFieldName + """ + + """ + allowed enum values + """ + USER_FIELD_NAME_UNSPECIFIED = 'USER_FIELD_NAME_UNSPECIFIED' + USER_FIELD_NAME_USER_NAME = 'USER_FIELD_NAME_USER_NAME' + USER_FIELD_NAME_FIRST_NAME = 'USER_FIELD_NAME_FIRST_NAME' + USER_FIELD_NAME_LAST_NAME = 'USER_FIELD_NAME_LAST_NAME' + USER_FIELD_NAME_NICK_NAME = 'USER_FIELD_NAME_NICK_NAME' + USER_FIELD_NAME_DISPLAY_NAME = 'USER_FIELD_NAME_DISPLAY_NAME' + USER_FIELD_NAME_EMAIL = 'USER_FIELD_NAME_EMAIL' + USER_FIELD_NAME_STATE = 'USER_FIELD_NAME_STATE' + USER_FIELD_NAME_TYPE = 'USER_FIELD_NAME_TYPE' + USER_FIELD_NAME_CREATION_DATE = 'USER_FIELD_NAME_CREATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceUserFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_user_name_query.py b/zitadel_client/models/beta_user_service_user_name_query.py new file mode 100644 index 00000000..0c862a24 --- /dev/null +++ b/zitadel_client/models/beta_user_service_user_name_query.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_text_query_method import BetaUserServiceTextQueryMethod +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceUserNameQuery(BaseModel): + """ + Query for users with a specific user name. + """ # noqa: E501 + user_name: StrictStr = Field(alias="userName") + method: Optional[BetaUserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["userName", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceUserNameQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceUserNameQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userName": obj.get("userName"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_user_state.py b/zitadel_client/models/beta_user_service_user_state.py new file mode 100644 index 00000000..f18a7228 --- /dev/null +++ b/zitadel_client/models/beta_user_service_user_state.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class BetaUserServiceUserState(str, Enum): + """ + BetaUserServiceUserState + """ + + """ + allowed enum values + """ + USER_STATE_UNSPECIFIED = 'USER_STATE_UNSPECIFIED' + USER_STATE_ACTIVE = 'USER_STATE_ACTIVE' + USER_STATE_INACTIVE = 'USER_STATE_INACTIVE' + USER_STATE_DELETED = 'USER_STATE_DELETED' + USER_STATE_LOCKED = 'USER_STATE_LOCKED' + USER_STATE_INITIAL = 'USER_STATE_INITIAL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BetaUserServiceUserState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/beta_user_service_verify_email_request.py b/zitadel_client/models/beta_user_service_verify_email_request.py new file mode 100644 index 00000000..a6e9f6f2 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_email_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyEmailRequest(BaseModel): + """ + BetaUserServiceVerifyEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") + __properties: ClassVar[List[str]] = ["userId", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_email_response.py b/zitadel_client/models/beta_user_service_verify_email_response.py new file mode 100644 index 00000000..89ebe668 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_email_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyEmailResponse(BaseModel): + """ + BetaUserServiceVerifyEmailResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyEmailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_passkey_registration_request.py b/zitadel_client/models/beta_user_service_verify_passkey_registration_request.py new file mode 100644 index 00000000..daf9dcad --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_passkey_registration_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPasskeyRegistrationRequest(BaseModel): + """ + BetaUserServiceVerifyPasskeyRegistrationRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + passkey_id: StrictStr = Field(alias="passkeyId") + public_key_credential: Dict[str, Any] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + passkey_name: StrictStr = Field(alias="passkeyName") + __properties: ClassVar[List[str]] = ["userId", "passkeyId", "publicKeyCredential", "passkeyName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "passkeyId": obj.get("passkeyId"), + "publicKeyCredential": obj.get("publicKeyCredential"), + "passkeyName": obj.get("passkeyName") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_passkey_registration_response.py b/zitadel_client/models/beta_user_service_verify_passkey_registration_response.py new file mode 100644 index 00000000..9ff44cc5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_passkey_registration_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPasskeyRegistrationResponse(BaseModel): + """ + BetaUserServiceVerifyPasskeyRegistrationResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPasskeyRegistrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_phone_request.py b/zitadel_client/models/beta_user_service_verify_phone_request.py new file mode 100644 index 00000000..539db5b5 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_phone_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPhoneRequest(BaseModel): + """ + BetaUserServiceVerifyPhoneRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") + __properties: ClassVar[List[str]] = ["userId", "verificationCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "verificationCode": obj.get("verificationCode") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_phone_response.py b/zitadel_client/models/beta_user_service_verify_phone_response.py new file mode 100644 index 00000000..d2e97ea7 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_phone_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyPhoneResponse(BaseModel): + """ + BetaUserServiceVerifyPhoneResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyPhoneResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_totp_registration_request.py b/zitadel_client/models/beta_user_service_verify_totp_registration_request.py new file mode 100644 index 00000000..c9824905 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_totp_registration_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyTOTPRegistrationRequest(BaseModel): + """ + BetaUserServiceVerifyTOTPRegistrationRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + code: StrictStr + __properties: ClassVar[List[str]] = ["userId", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "code": obj.get("code") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_totp_registration_response.py b/zitadel_client/models/beta_user_service_verify_totp_registration_response.py new file mode 100644 index 00000000..4d5b2a26 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_totp_registration_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyTOTPRegistrationResponse(BaseModel): + """ + BetaUserServiceVerifyTOTPRegistrationResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyTOTPRegistrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_u2_f_registration_request.py b/zitadel_client/models/beta_user_service_verify_u2_f_registration_request.py new file mode 100644 index 00000000..45048b5a --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_u2_f_registration_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyU2FRegistrationRequest(BaseModel): + """ + BetaUserServiceVerifyU2FRegistrationRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + u2f_id: StrictStr = Field(alias="u2fId") + public_key_credential: Dict[str, Any] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + token_name: StrictStr = Field(alias="tokenName") + __properties: ClassVar[List[str]] = ["userId", "u2fId", "publicKeyCredential", "tokenName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "u2fId": obj.get("u2fId"), + "publicKeyCredential": obj.get("publicKeyCredential"), + "tokenName": obj.get("tokenName") + }) + return _obj + + diff --git a/zitadel_client/models/beta_user_service_verify_u2_f_registration_response.py b/zitadel_client/models/beta_user_service_verify_u2_f_registration_response.py new file mode 100644 index 00000000..26b36a51 --- /dev/null +++ b/zitadel_client/models/beta_user_service_verify_u2_f_registration_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_user_service_details import BetaUserServiceDetails +from typing import Optional, Set +from typing_extensions import Self + +class BetaUserServiceVerifyU2FRegistrationResponse(BaseModel): + """ + BetaUserServiceVerifyU2FRegistrationResponse + """ # noqa: E501 + details: Optional[BetaUserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaUserServiceVerifyU2FRegistrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "details": BetaUserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_activate_web_key_request.py b/zitadel_client/models/beta_web_key_service_activate_web_key_request.py new file mode 100644 index 00000000..3c125630 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_activate_web_key_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceActivateWebKeyRequest(BaseModel): + """ + BetaWebKeyServiceActivateWebKeyRequest + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_activate_web_key_response.py b/zitadel_client/models/beta_web_key_service_activate_web_key_response.py new file mode 100644 index 00000000..16d4615a --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_activate_web_key_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceActivateWebKeyResponse(BaseModel): + """ + BetaWebKeyServiceActivateWebKeyResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceActivateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_any.py b/zitadel_client/models/beta_web_key_service_any.py new file mode 100644 index 00000000..1a46b99a --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_connect_error.py b/zitadel_client/models/beta_web_key_service_connect_error.py new file mode 100644 index 00000000..236f723e --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.beta_web_key_service_any import BetaWebKeyServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[BetaWebKeyServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": BetaWebKeyServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_create_web_key_request.py b/zitadel_client/models/beta_web_key_service_create_web_key_request.py new file mode 100644 index 00000000..ae1d172c --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_create_web_key_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_web_key_service_ecdsa import BetaWebKeyServiceECDSA +from zitadel_client.models.beta_web_key_service_rsa import BetaWebKeyServiceRSA +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceCreateWebKeyRequest(BaseModel): + """ + BetaWebKeyServiceCreateWebKeyRequest + """ # noqa: E501 + ecdsa: Optional[BetaWebKeyServiceECDSA] = None + ed25519: Optional[Dict[str, Any]] = None + rsa: Optional[BetaWebKeyServiceRSA] = None + __properties: ClassVar[List[str]] = ["ecdsa", "ed25519", "rsa"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceCreateWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ecdsa + if self.ecdsa: + _dict['ecdsa'] = self.ecdsa.to_dict() + # override the default output from pydantic by calling `to_dict()` of rsa + if self.rsa: + _dict['rsa'] = self.rsa.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceCreateWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ecdsa": BetaWebKeyServiceECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, + "ed25519": obj.get("ed25519"), + "rsa": BetaWebKeyServiceRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_create_web_key_response.py b/zitadel_client/models/beta_web_key_service_create_web_key_response.py new file mode 100644 index 00000000..d2aece7f --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_create_web_key_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceCreateWebKeyResponse(BaseModel): + """ + BetaWebKeyServiceCreateWebKeyResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created key.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["id", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceCreateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceCreateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_delete_web_key_request.py b/zitadel_client/models/beta_web_key_service_delete_web_key_request.py new file mode 100644 index 00000000..222b5d4b --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_delete_web_key_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceDeleteWebKeyRequest(BaseModel): + """ + BetaWebKeyServiceDeleteWebKeyRequest + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/beta_web_key_service_delete_web_key_response.py b/zitadel_client/models/beta_web_key_service_delete_web_key_response.py new file mode 100644 index 00000000..7e8ea671 --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_delete_web_key_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceDeleteWebKeyResponse(BaseModel): + """ + BetaWebKeyServiceDeleteWebKeyResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceDeleteWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/saml_service_protobuf_any.py b/zitadel_client/models/beta_web_key_service_ecdsa.py similarity index 80% rename from zitadel_client/models/saml_service_protobuf_any.py rename to zitadel_client/models/beta_web_key_service_ecdsa.py index 4d5ede7f..5dd86d72 100644 --- a/zitadel_client/models/saml_service_protobuf_any.py +++ b/zitadel_client/models/beta_web_key_service_ecdsa.py @@ -17,16 +17,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_web_key_service_ecdsa_curve import BetaWebKeyServiceECDSACurve from typing import Optional, Set from typing_extensions import Self -class SAMLServiceProtobufAny(BaseModel): +class BetaWebKeyServiceECDSA(BaseModel): """ - SAMLServiceProtobufAny + BetaWebKeyServiceECDSA """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + curve: Optional[BetaWebKeyServiceECDSACurve] = None + __properties: ClassVar[List[str]] = ["curve"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SAMLServiceProtobufAny from a JSON string""" + """Create an instance of BetaWebKeyServiceECDSA from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SAMLServiceProtobufAny from a dict""" + """Create an instance of BetaWebKeyServiceECDSA from a dict""" if obj is None: return None @@ -79,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "curve": obj.get("curve") }) return _obj diff --git a/zitadel_client/models/web_key_service_beta_ecdsa_curve.py b/zitadel_client/models/beta_web_key_service_ecdsa_curve.py similarity index 86% rename from zitadel_client/models/web_key_service_beta_ecdsa_curve.py rename to zitadel_client/models/beta_web_key_service_ecdsa_curve.py index e4fd1855..b50166ec 100644 --- a/zitadel_client/models/web_key_service_beta_ecdsa_curve.py +++ b/zitadel_client/models/beta_web_key_service_ecdsa_curve.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaECDSACurve(str, Enum): +class BetaWebKeyServiceECDSACurve(str, Enum): """ - WebKeyServiceBetaECDSACurve + BetaWebKeyServiceECDSACurve """ """ @@ -33,7 +33,7 @@ class WebKeyServiceBetaECDSACurve(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaECDSACurve from a JSON string""" + """Create an instance of BetaWebKeyServiceECDSACurve from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/web_key_service_beta_list_web_keys_response.py b/zitadel_client/models/beta_web_key_service_list_web_keys_response.py similarity index 85% rename from zitadel_client/models/web_key_service_beta_list_web_keys_response.py rename to zitadel_client/models/beta_web_key_service_list_web_keys_response.py index ac899644..9677d8f8 100644 --- a/zitadel_client/models/web_key_service_beta_list_web_keys_response.py +++ b/zitadel_client/models/beta_web_key_service_list_web_keys_response.py @@ -19,15 +19,16 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_web_key import WebKeyServiceBetaWebKey +from zitadel_client.models.beta_web_key_service_web_key import BetaWebKeyServiceWebKey from typing import Optional, Set from typing_extensions import Self -class WebKeyServiceBetaListWebKeysResponse(BaseModel): +class BetaWebKeyServiceListWebKeysResponse(BaseModel): """ - WebKeyServiceBetaListWebKeysResponse + BetaWebKeyServiceListWebKeysResponse """ # noqa: E501 - web_keys: Optional[List[WebKeyServiceBetaWebKey]] = Field(default=None, alias="webKeys") + web_keys: Optional[List[BetaWebKeyServiceWebKey]] = Field(default=None, alias="webKeys") + __properties: ClassVar[List[str]] = ["webKeys"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaListWebKeysResponse from a JSON string""" + """Create an instance of BetaWebKeyServiceListWebKeysResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -79,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WebKeyServiceBetaListWebKeysResponse from a dict""" + """Create an instance of BetaWebKeyServiceListWebKeysResponse from a dict""" if obj is None: return None @@ -87,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "webKeys": [WebKeyServiceBetaWebKey.from_dict(_item) for _item in obj["webKeys"]] if obj.get("webKeys") is not None else None + "webKeys": [BetaWebKeyServiceWebKey.from_dict(_item) for _item in obj["webKeys"]] if obj.get("webKeys") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_web_key_service_rsa.py b/zitadel_client/models/beta_web_key_service_rsa.py new file mode 100644 index 00000000..7eafbaef --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_rsa.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_web_key_service_rsa_bits import BetaWebKeyServiceRSABits +from zitadel_client.models.beta_web_key_service_rsa_hasher import BetaWebKeyServiceRSAHasher +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceRSA(BaseModel): + """ + BetaWebKeyServiceRSA + """ # noqa: E501 + bits: Optional[BetaWebKeyServiceRSABits] = None + hasher: Optional[BetaWebKeyServiceRSAHasher] = None + __properties: ClassVar[List[str]] = ["bits", "hasher"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceRSA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceRSA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bits": obj.get("bits"), + "hasher": obj.get("hasher") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_rsa_bits.py b/zitadel_client/models/beta_web_key_service_rsa_bits.py similarity index 86% rename from zitadel_client/models/web_key_service_beta_rsa_bits.py rename to zitadel_client/models/beta_web_key_service_rsa_bits.py index d986bfb5..886e699f 100644 --- a/zitadel_client/models/web_key_service_beta_rsa_bits.py +++ b/zitadel_client/models/beta_web_key_service_rsa_bits.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaRSABits(str, Enum): +class BetaWebKeyServiceRSABits(str, Enum): """ - WebKeyServiceBetaRSABits + BetaWebKeyServiceRSABits """ """ @@ -33,7 +33,7 @@ class WebKeyServiceBetaRSABits(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaRSABits from a JSON string""" + """Create an instance of BetaWebKeyServiceRSABits from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/web_key_service_beta_rsa_hasher.py b/zitadel_client/models/beta_web_key_service_rsa_hasher.py similarity index 86% rename from zitadel_client/models/web_key_service_beta_rsa_hasher.py rename to zitadel_client/models/beta_web_key_service_rsa_hasher.py index a466300b..8aa9e1a5 100644 --- a/zitadel_client/models/web_key_service_beta_rsa_hasher.py +++ b/zitadel_client/models/beta_web_key_service_rsa_hasher.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaRSAHasher(str, Enum): +class BetaWebKeyServiceRSAHasher(str, Enum): """ - WebKeyServiceBetaRSAHasher + BetaWebKeyServiceRSAHasher """ """ @@ -33,7 +33,7 @@ class WebKeyServiceBetaRSAHasher(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaRSAHasher from a JSON string""" + """Create an instance of BetaWebKeyServiceRSAHasher from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/web_key_service_beta_state.py b/zitadel_client/models/beta_web_key_service_state.py similarity index 62% rename from zitadel_client/models/web_key_service_beta_state.py rename to zitadel_client/models/beta_web_key_service_state.py index 1d027f29..26f35960 100644 --- a/zitadel_client/models/web_key_service_beta_state.py +++ b/zitadel_client/models/beta_web_key_service_state.py @@ -18,9 +18,9 @@ from typing_extensions import Self -class WebKeyServiceBetaState(str, Enum): +class BetaWebKeyServiceState(str, Enum): """ - - STATE_INITIAL: A newly created key is in the initial state and published to the public key endpoint. - STATE_ACTIVE: The active key is used to sign tokens. Only one key can be active at a time. - STATE_INACTIVE: The inactive key is not used to sign tokens anymore, but still published to the public key endpoint. - STATE_REMOVED: The removed key is not used to sign tokens anymore and not published to the public key endpoint. + BetaWebKeyServiceState """ """ @@ -34,7 +34,7 @@ class WebKeyServiceBetaState(str, Enum): @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of WebKeyServiceBetaState from a JSON string""" + """Create an instance of BetaWebKeyServiceState from a JSON string""" return cls(json.loads(json_str)) diff --git a/zitadel_client/models/beta_web_key_service_web_key.py b/zitadel_client/models/beta_web_key_service_web_key.py new file mode 100644 index 00000000..e24dd6ab --- /dev/null +++ b/zitadel_client/models/beta_web_key_service_web_key.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.beta_web_key_service_ecdsa import BetaWebKeyServiceECDSA +from zitadel_client.models.beta_web_key_service_rsa import BetaWebKeyServiceRSA +from zitadel_client.models.beta_web_key_service_state import BetaWebKeyServiceState +from typing import Optional, Set +from typing_extensions import Self + +class BetaWebKeyServiceWebKey(BaseModel): + """ + BetaWebKeyServiceWebKey + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the key.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + state: Optional[BetaWebKeyServiceState] = None + ecdsa: Optional[BetaWebKeyServiceECDSA] = None + ed25519: Optional[Dict[str, Any]] = None + rsa: Optional[BetaWebKeyServiceRSA] = None + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "state", "ecdsa", "ed25519", "rsa"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceWebKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ecdsa + if self.ecdsa: + _dict['ecdsa'] = self.ecdsa.to_dict() + # override the default output from pydantic by calling `to_dict()` of rsa + if self.rsa: + _dict['rsa'] = self.rsa.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BetaWebKeyServiceWebKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "state": obj.get("state"), + "ecdsa": BetaWebKeyServiceECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, + "ed25519": obj.get("ed25519"), + "rsa": BetaWebKeyServiceRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_any.py b/zitadel_client/models/feature_service_any.py new file mode 100644 index 00000000..cc5185e0 --- /dev/null +++ b/zitadel_client/models/feature_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/feature_service_connect_error.py b/zitadel_client/models/feature_service_connect_error.py new file mode 100644 index 00000000..b0b75727 --- /dev/null +++ b/zitadel_client/models/feature_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.feature_service_any import FeatureServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[FeatureServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": FeatureServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/feature_service_details.py b/zitadel_client/models/feature_service_details.py index 55c30dc9..d6132907 100644 --- a/zitadel_client/models/feature_service_details.py +++ b/zitadel_client/models/feature_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class FeatureServiceDetails(BaseModel): """ FeatureServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/feature_service_feature_flag.py b/zitadel_client/models/feature_service_feature_flag.py index 8e847678..9a9c481d 100644 --- a/zitadel_client/models/feature_service_feature_flag.py +++ b/zitadel_client/models/feature_service_feature_flag.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_source import FeatureServiceSource from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,9 @@ class FeatureServiceFeatureFlag(BaseModel): """ FeatureFlag is a simple boolean Feature setting, without further payload. """ # noqa: E501 - enabled: Optional[StrictBool] = Field(default=None, description="Whether a feature is enabled.") - source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + enabled: Optional[StrictBool] = None + source: Optional[FeatureServiceSource] = None + __properties: ClassVar[List[str]] = ["enabled", "source"] model_config = ConfigDict( populate_by_name=True, @@ -82,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "enabled": obj.get("enabled"), - "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED + "source": obj.get("source") }) return _obj diff --git a/zitadel_client/models/feature_service_get_instance_features_request.py b/zitadel_client/models/feature_service_get_instance_features_request.py new file mode 100644 index 00000000..8851361a --- /dev/null +++ b/zitadel_client/models/feature_service_get_instance_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceGetInstanceFeaturesRequest(BaseModel): + """ + FeatureServiceGetInstanceFeaturesRequest + """ # noqa: E501 + inheritance: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["inheritance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceGetInstanceFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceGetInstanceFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_get_instance_features_response.py b/zitadel_client/models/feature_service_get_instance_features_response.py index 768c1c54..eaea36bf 100644 --- a/zitadel_client/models/feature_service_get_instance_features_response.py +++ b/zitadel_client/models/feature_service_get_instance_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from zitadel_client.models.feature_service_feature_flag import FeatureServiceFeatureFlag from zitadel_client.models.feature_service_improved_performance_feature_flag import FeatureServiceImprovedPerformanceFeatureFlag @@ -32,12 +32,9 @@ class FeatureServiceGetInstanceFeaturesResponse(BaseModel): """ # noqa: E501 details: Optional[FeatureServiceDetails] = None login_default_org: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="loginDefaultOrg") - oidc_trigger_introspection_projections: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="oidcTriggerIntrospectionProjections") - oidc_legacy_introspection: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="oidcLegacyIntrospection") user_schema: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="userSchema") oidc_token_exchange: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="oidcTokenExchange") improved_performance: Optional[FeatureServiceImprovedPerformanceFeatureFlag] = Field(default=None, alias="improvedPerformance") - web_key: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="webKey") debug_oidc_parent_error: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="debugOidcParentError") oidc_single_v1_session_termination: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="oidcSingleV1SessionTermination") disable_user_token_event: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="disableUserTokenEvent") @@ -45,6 +42,7 @@ class FeatureServiceGetInstanceFeaturesResponse(BaseModel): login_v2: Optional[FeatureServiceLoginV2FeatureFlag] = Field(default=None, alias="loginV2") permission_check_v2: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="permissionCheckV2") console_use_v2_user_api: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="consoleUseV2UserApi") + __properties: ClassVar[List[str]] = ["details", "loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "debugOidcParentError", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2", "consoleUseV2UserApi"] model_config = ConfigDict( populate_by_name=True, @@ -91,12 +89,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of login_default_org if self.login_default_org: _dict['loginDefaultOrg'] = self.login_default_org.to_dict() - # override the default output from pydantic by calling `to_dict()` of oidc_trigger_introspection_projections - if self.oidc_trigger_introspection_projections: - _dict['oidcTriggerIntrospectionProjections'] = self.oidc_trigger_introspection_projections.to_dict() - # override the default output from pydantic by calling `to_dict()` of oidc_legacy_introspection - if self.oidc_legacy_introspection: - _dict['oidcLegacyIntrospection'] = self.oidc_legacy_introspection.to_dict() # override the default output from pydantic by calling `to_dict()` of user_schema if self.user_schema: _dict['userSchema'] = self.user_schema.to_dict() @@ -106,9 +98,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of improved_performance if self.improved_performance: _dict['improvedPerformance'] = self.improved_performance.to_dict() - # override the default output from pydantic by calling `to_dict()` of web_key - if self.web_key: - _dict['webKey'] = self.web_key.to_dict() # override the default output from pydantic by calling `to_dict()` of debug_oidc_parent_error if self.debug_oidc_parent_error: _dict['debugOidcParentError'] = self.debug_oidc_parent_error.to_dict() @@ -144,12 +133,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "loginDefaultOrg": FeatureServiceFeatureFlag.from_dict(obj["loginDefaultOrg"]) if obj.get("loginDefaultOrg") is not None else None, - "oidcTriggerIntrospectionProjections": FeatureServiceFeatureFlag.from_dict(obj["oidcTriggerIntrospectionProjections"]) if obj.get("oidcTriggerIntrospectionProjections") is not None else None, - "oidcLegacyIntrospection": FeatureServiceFeatureFlag.from_dict(obj["oidcLegacyIntrospection"]) if obj.get("oidcLegacyIntrospection") is not None else None, "userSchema": FeatureServiceFeatureFlag.from_dict(obj["userSchema"]) if obj.get("userSchema") is not None else None, "oidcTokenExchange": FeatureServiceFeatureFlag.from_dict(obj["oidcTokenExchange"]) if obj.get("oidcTokenExchange") is not None else None, "improvedPerformance": FeatureServiceImprovedPerformanceFeatureFlag.from_dict(obj["improvedPerformance"]) if obj.get("improvedPerformance") is not None else None, - "webKey": FeatureServiceFeatureFlag.from_dict(obj["webKey"]) if obj.get("webKey") is not None else None, "debugOidcParentError": FeatureServiceFeatureFlag.from_dict(obj["debugOidcParentError"]) if obj.get("debugOidcParentError") is not None else None, "oidcSingleV1SessionTermination": FeatureServiceFeatureFlag.from_dict(obj["oidcSingleV1SessionTermination"]) if obj.get("oidcSingleV1SessionTermination") is not None else None, "disableUserTokenEvent": FeatureServiceFeatureFlag.from_dict(obj["disableUserTokenEvent"]) if obj.get("disableUserTokenEvent") is not None else None, diff --git a/zitadel_client/models/feature_service_get_organization_features_request.py b/zitadel_client/models/feature_service_get_organization_features_request.py new file mode 100644 index 00000000..f8a08e53 --- /dev/null +++ b/zitadel_client/models/feature_service_get_organization_features_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceGetOrganizationFeaturesRequest(BaseModel): + """ + FeatureServiceGetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + inheritance: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationId", "inheritance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceGetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceGetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_get_organization_features_response.py b/zitadel_client/models/feature_service_get_organization_features_response.py index 189b90a2..0820bff7 100644 --- a/zitadel_client/models/feature_service_get_organization_features_response.py +++ b/zitadel_client/models/feature_service_get_organization_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceGetOrganizationFeaturesResponse(BaseModel): FeatureServiceGetOrganizationFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_get_system_features_response.py b/zitadel_client/models/feature_service_get_system_features_response.py index 5a638f46..09516b13 100644 --- a/zitadel_client/models/feature_service_get_system_features_response.py +++ b/zitadel_client/models/feature_service_get_system_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from zitadel_client.models.feature_service_feature_flag import FeatureServiceFeatureFlag from zitadel_client.models.feature_service_improved_performance_feature_flag import FeatureServiceImprovedPerformanceFeatureFlag @@ -32,8 +32,6 @@ class FeatureServiceGetSystemFeaturesResponse(BaseModel): """ # noqa: E501 details: Optional[FeatureServiceDetails] = None login_default_org: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="loginDefaultOrg") - oidc_trigger_introspection_projections: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="oidcTriggerIntrospectionProjections") - oidc_legacy_introspection: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="oidcLegacyIntrospection") user_schema: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="userSchema") oidc_token_exchange: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="oidcTokenExchange") improved_performance: Optional[FeatureServiceImprovedPerformanceFeatureFlag] = Field(default=None, alias="improvedPerformance") @@ -42,6 +40,7 @@ class FeatureServiceGetSystemFeaturesResponse(BaseModel): enable_back_channel_logout: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="enableBackChannelLogout") login_v2: Optional[FeatureServiceLoginV2FeatureFlag] = Field(default=None, alias="loginV2") permission_check_v2: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="permissionCheckV2") + __properties: ClassVar[List[str]] = ["details", "loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2"] model_config = ConfigDict( populate_by_name=True, @@ -88,12 +87,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of login_default_org if self.login_default_org: _dict['loginDefaultOrg'] = self.login_default_org.to_dict() - # override the default output from pydantic by calling `to_dict()` of oidc_trigger_introspection_projections - if self.oidc_trigger_introspection_projections: - _dict['oidcTriggerIntrospectionProjections'] = self.oidc_trigger_introspection_projections.to_dict() - # override the default output from pydantic by calling `to_dict()` of oidc_legacy_introspection - if self.oidc_legacy_introspection: - _dict['oidcLegacyIntrospection'] = self.oidc_legacy_introspection.to_dict() # override the default output from pydantic by calling `to_dict()` of user_schema if self.user_schema: _dict['userSchema'] = self.user_schema.to_dict() @@ -132,8 +125,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "loginDefaultOrg": FeatureServiceFeatureFlag.from_dict(obj["loginDefaultOrg"]) if obj.get("loginDefaultOrg") is not None else None, - "oidcTriggerIntrospectionProjections": FeatureServiceFeatureFlag.from_dict(obj["oidcTriggerIntrospectionProjections"]) if obj.get("oidcTriggerIntrospectionProjections") is not None else None, - "oidcLegacyIntrospection": FeatureServiceFeatureFlag.from_dict(obj["oidcLegacyIntrospection"]) if obj.get("oidcLegacyIntrospection") is not None else None, "userSchema": FeatureServiceFeatureFlag.from_dict(obj["userSchema"]) if obj.get("userSchema") is not None else None, "oidcTokenExchange": FeatureServiceFeatureFlag.from_dict(obj["oidcTokenExchange"]) if obj.get("oidcTokenExchange") is not None else None, "improvedPerformance": FeatureServiceImprovedPerformanceFeatureFlag.from_dict(obj["improvedPerformance"]) if obj.get("improvedPerformance") is not None else None, diff --git a/zitadel_client/models/feature_service_get_user_features_request.py b/zitadel_client/models/feature_service_get_user_features_request.py new file mode 100644 index 00000000..199ef202 --- /dev/null +++ b/zitadel_client/models/feature_service_get_user_features_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceGetUserFeaturesRequest(BaseModel): + """ + FeatureServiceGetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + inheritance: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["userId", "inheritance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceGetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceGetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "inheritance": obj.get("inheritance") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_get_user_features_response.py b/zitadel_client/models/feature_service_get_user_features_response.py index 0bc3a5b9..1410d180 100644 --- a/zitadel_client/models/feature_service_get_user_features_response.py +++ b/zitadel_client/models/feature_service_get_user_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceGetUserFeaturesResponse(BaseModel): FeatureServiceGetUserFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_improved_performance.py b/zitadel_client/models/feature_service_improved_performance.py index d98ee7ff..ea98a8c9 100644 --- a/zitadel_client/models/feature_service_improved_performance.py +++ b/zitadel_client/models/feature_service_improved_performance.py @@ -20,7 +20,7 @@ class FeatureServiceImprovedPerformance(str, Enum): """ - - IMPROVED_PERFORMANCE_ORG_BY_ID: Uses the eventstore to query the org by id instead of the sql table. - IMPROVED_PERFORMANCE_PROJECT_GRANT: Improves performance on write side by using optimized processes to query data to determine correctnes of data. - IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED: Improve performance on write side when users are checked against verified domains from other organizations. + FeatureServiceImprovedPerformance """ """ diff --git a/zitadel_client/models/feature_service_improved_performance_feature_flag.py b/zitadel_client/models/feature_service_improved_performance_feature_flag.py index 593cc98b..168c717b 100644 --- a/zitadel_client/models/feature_service_improved_performance_feature_flag.py +++ b/zitadel_client/models/feature_service_improved_performance_feature_flag.py @@ -28,8 +28,9 @@ class FeatureServiceImprovedPerformanceFeatureFlag(BaseModel): """ FeatureServiceImprovedPerformanceFeatureFlag """ # noqa: E501 - execution_paths: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, description="Which of the performance improvements is enabled", alias="executionPaths") - source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + execution_paths: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, alias="executionPaths") + source: Optional[FeatureServiceSource] = None + __properties: ClassVar[List[str]] = ["executionPaths", "source"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "executionPaths": obj.get("executionPaths"), - "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED + "source": obj.get("source") }) return _obj diff --git a/zitadel_client/models/feature_service_login_v2.py b/zitadel_client/models/feature_service_login_v2.py index 361d389d..a0e82972 100644 --- a/zitadel_client/models/feature_service_login_v2.py +++ b/zitadel_client/models/feature_service_login_v2.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceLoginV2(BaseModel): """ # noqa: E501 required: Optional[StrictBool] = Field(default=None, description="Require that all users must use the new login UI. If enabled, all users will be redirected to the login V2 regardless of the application's preference.") base_uri: Optional[StrictStr] = Field(default=None, description="Optionally specify a base uri of the login UI. If unspecified the default URI will be used.", alias="baseUri") + __properties: ClassVar[List[str]] = ["required", "baseUri"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if base_uri (nullable) is None + # and model_fields_set contains the field + if self.base_uri is None and "base_uri" in self.model_fields_set: + _dict['baseUri'] = None + return _dict @classmethod diff --git a/zitadel_client/models/feature_service_login_v2_feature_flag.py b/zitadel_client/models/feature_service_login_v2_feature_flag.py index 56ee6c18..d57232ea 100644 --- a/zitadel_client/models/feature_service_login_v2_feature_flag.py +++ b/zitadel_client/models/feature_service_login_v2_feature_flag.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_source import FeatureServiceSource from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,8 @@ class FeatureServiceLoginV2FeatureFlag(BaseModel): """ # noqa: E501 required: Optional[StrictBool] = None base_uri: Optional[StrictStr] = Field(default=None, alias="baseUri") - source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + source: Optional[FeatureServiceSource] = None + __properties: ClassVar[List[str]] = ["required", "baseUri", "source"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if base_uri (nullable) is None + # and model_fields_set contains the field + if self.base_uri is None and "base_uri" in self.model_fields_set: + _dict['baseUri'] = None + return _dict @classmethod @@ -84,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "required": obj.get("required"), "baseUri": obj.get("baseUri"), - "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED + "source": obj.get("source") }) return _obj diff --git a/zitadel_client/models/feature_service_reset_instance_features_response.py b/zitadel_client/models/feature_service_reset_instance_features_response.py index d594f190..06396778 100644 --- a/zitadel_client/models/feature_service_reset_instance_features_response.py +++ b/zitadel_client/models/feature_service_reset_instance_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceResetInstanceFeaturesResponse(BaseModel): FeatureServiceResetInstanceFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_reset_organization_features_request.py b/zitadel_client/models/feature_service_reset_organization_features_request.py new file mode 100644 index 00000000..61ae60fe --- /dev/null +++ b/zitadel_client/models/feature_service_reset_organization_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceResetOrganizationFeaturesRequest(BaseModel): + """ + FeatureServiceResetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceResetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceResetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_reset_organization_features_response.py b/zitadel_client/models/feature_service_reset_organization_features_response.py index 4628470e..23d94986 100644 --- a/zitadel_client/models/feature_service_reset_organization_features_response.py +++ b/zitadel_client/models/feature_service_reset_organization_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceResetOrganizationFeaturesResponse(BaseModel): FeatureServiceResetOrganizationFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_reset_system_features_response.py b/zitadel_client/models/feature_service_reset_system_features_response.py index 83f9a46d..b4c16fc9 100644 --- a/zitadel_client/models/feature_service_reset_system_features_response.py +++ b/zitadel_client/models/feature_service_reset_system_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceResetSystemFeaturesResponse(BaseModel): FeatureServiceResetSystemFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_reset_user_features_request.py b/zitadel_client/models/feature_service_reset_user_features_request.py new file mode 100644 index 00000000..3643489d --- /dev/null +++ b/zitadel_client/models/feature_service_reset_user_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceResetUserFeaturesRequest(BaseModel): + """ + FeatureServiceResetUserFeaturesRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceResetUserFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceResetUserFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_reset_user_features_response.py b/zitadel_client/models/feature_service_reset_user_features_response.py index c5b918d5..4a2a35ab 100644 --- a/zitadel_client/models/feature_service_reset_user_features_response.py +++ b/zitadel_client/models/feature_service_reset_user_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceResetUserFeaturesResponse(BaseModel): FeatureServiceResetUserFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_set_instance_features_request.py b/zitadel_client/models/feature_service_set_instance_features_request.py index d1e16799..e5d5e6ee 100644 --- a/zitadel_client/models/feature_service_set_instance_features_request.py +++ b/zitadel_client/models/feature_service_set_instance_features_request.py @@ -28,20 +28,18 @@ class FeatureServiceSetInstanceFeaturesRequest(BaseModel): """ FeatureServiceSetInstanceFeaturesRequest """ # noqa: E501 - login_default_org: Optional[StrictBool] = Field(default=None, description="The login UI will use the settings of the default org (and not from the instance) if no organization context is set", alias="loginDefaultOrg") - oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, description="Enable projection triggers during an introspection request. This can act as workaround if there are noticeable consistency issues in the introspection response but can have an impact on performance. We are planning to remove triggers for introspection requests in the future. Please raise an issue if you needed to enable this feature.", alias="oidcTriggerIntrospectionProjections") - oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, description="We have recently refactored the introspection endpoint for performance reasons. This feature can be used to rollback to the legacy implementation if unexpected bugs arise. Please raise an issue if you needed to enable this feature.", alias="oidcLegacyIntrospection") - user_schema: Optional[StrictBool] = Field(default=None, description="User Schemas allow to manage data schemas of user. If the flag is enabled, you'll be able to use the new API and its features. Note that it is still in an early stage.", alias="userSchema") - oidc_token_exchange: Optional[StrictBool] = Field(default=None, description="Enable the experimental `urn:ietf:params:oauth:grant-type:token-exchange` grant type for the OIDC token endpoint. Token exchange can be used to request tokens with a lesser scope or impersonate other users. See the security policy to allow impersonation on an instance.", alias="oidcTokenExchange") - improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, description="Improves performance of specified execution paths.", alias="improvedPerformance") - web_key: Optional[StrictBool] = Field(default=None, description="Enable the webkey/v3alpha API. The first time this feature is enabled, web keys are generated and activated.", alias="webKey") - debug_oidc_parent_error: Optional[StrictBool] = Field(default=None, description="Return parent errors to OIDC clients for debugging purposes. Parent errors may contain sensitive data or unwanted details about the system status of zitadel. Only enable if really needed.", alias="debugOidcParentError") - oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, description="If the flag is enabled, you'll be able to terminate a single session from the login UI by providing an id_token with a `sid` claim as id_token_hint on the end_session endpoint. Note that currently all sessions from the same user agent (browser) are terminated in the login UI. Sessions managed through the Session API already allow the termination of single sessions.", alias="oidcSingleV1SessionTermination") - disable_user_token_event: Optional[StrictBool] = Field(default=None, description="Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins", alias="disableUserTokenEvent") - enable_back_channel_logout: Optional[StrictBool] = Field(default=None, description="If the flag is enabled, you'll be able to use the OIDC Back-Channel Logout to be notified in your application about terminated user sessions.", alias="enableBackChannelLogout") + login_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + debug_oidc_parent_error: Optional[StrictBool] = Field(default=None, alias="debugOidcParentError") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + disable_user_token_event: Optional[StrictBool] = Field(default=None, alias="disableUserTokenEvent") + enable_back_channel_logout: Optional[StrictBool] = Field(default=None, alias="enableBackChannelLogout") login_v2: Optional[FeatureServiceLoginV2] = Field(default=None, alias="loginV2") - permission_check_v2: Optional[StrictBool] = Field(default=None, description="Enable a newer, more performant, permission check used for v2 and v3 resource based APIs.", alias="permissionCheckV2") - console_use_v2_user_api: Optional[StrictBool] = Field(default=None, description="If this is enabled the console web client will use the new User v2 API for certain calls", alias="consoleUseV2UserApi") + permission_check_v2: Optional[StrictBool] = Field(default=None, alias="permissionCheckV2") + console_use_v2_user_api: Optional[StrictBool] = Field(default=None, alias="consoleUseV2UserApi") + __properties: ClassVar[List[str]] = ["loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "debugOidcParentError", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2", "consoleUseV2UserApi"] model_config = ConfigDict( populate_by_name=True, @@ -85,6 +83,51 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of login_v2 if self.login_v2: _dict['loginV2'] = self.login_v2.to_dict() + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if debug_oidc_parent_error (nullable) is None + # and model_fields_set contains the field + if self.debug_oidc_parent_error is None and "debug_oidc_parent_error" in self.model_fields_set: + _dict['debugOidcParentError'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + # set to None if disable_user_token_event (nullable) is None + # and model_fields_set contains the field + if self.disable_user_token_event is None and "disable_user_token_event" in self.model_fields_set: + _dict['disableUserTokenEvent'] = None + + # set to None if enable_back_channel_logout (nullable) is None + # and model_fields_set contains the field + if self.enable_back_channel_logout is None and "enable_back_channel_logout" in self.model_fields_set: + _dict['enableBackChannelLogout'] = None + + # set to None if permission_check_v2 (nullable) is None + # and model_fields_set contains the field + if self.permission_check_v2 is None and "permission_check_v2" in self.model_fields_set: + _dict['permissionCheckV2'] = None + + # set to None if console_use_v2_user_api (nullable) is None + # and model_fields_set contains the field + if self.console_use_v2_user_api is None and "console_use_v2_user_api" in self.model_fields_set: + _dict['consoleUseV2UserApi'] = None + return _dict @classmethod @@ -98,12 +141,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "loginDefaultOrg": obj.get("loginDefaultOrg"), - "oidcTriggerIntrospectionProjections": obj.get("oidcTriggerIntrospectionProjections"), - "oidcLegacyIntrospection": obj.get("oidcLegacyIntrospection"), "userSchema": obj.get("userSchema"), "oidcTokenExchange": obj.get("oidcTokenExchange"), "improvedPerformance": obj.get("improvedPerformance"), - "webKey": obj.get("webKey"), "debugOidcParentError": obj.get("debugOidcParentError"), "oidcSingleV1SessionTermination": obj.get("oidcSingleV1SessionTermination"), "disableUserTokenEvent": obj.get("disableUserTokenEvent"), diff --git a/zitadel_client/models/feature_service_set_instance_features_response.py b/zitadel_client/models/feature_service_set_instance_features_response.py index ee5bf6f0..8ab347e5 100644 --- a/zitadel_client/models/feature_service_set_instance_features_response.py +++ b/zitadel_client/models/feature_service_set_instance_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceSetInstanceFeaturesResponse(BaseModel): FeatureServiceSetInstanceFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_set_organization_features_request.py b/zitadel_client/models/feature_service_set_organization_features_request.py new file mode 100644 index 00000000..0c3673cd --- /dev/null +++ b/zitadel_client/models/feature_service_set_organization_features_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceSetOrganizationFeaturesRequest(BaseModel): + """ + FeatureServiceSetOrganizationFeaturesRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceSetOrganizationFeaturesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceSetOrganizationFeaturesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_set_organization_features_response.py b/zitadel_client/models/feature_service_set_organization_features_response.py index 4cb04dbe..1005a4c7 100644 --- a/zitadel_client/models/feature_service_set_organization_features_response.py +++ b/zitadel_client/models/feature_service_set_organization_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceSetOrganizationFeaturesResponse(BaseModel): FeatureServiceSetOrganizationFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_set_system_features_request.py b/zitadel_client/models/feature_service_set_system_features_request.py index fe71feb9..22b37467 100644 --- a/zitadel_client/models/feature_service_set_system_features_request.py +++ b/zitadel_client/models/feature_service_set_system_features_request.py @@ -28,17 +28,16 @@ class FeatureServiceSetSystemFeaturesRequest(BaseModel): """ FeatureServiceSetSystemFeaturesRequest """ # noqa: E501 - login_default_org: Optional[StrictBool] = Field(default=None, description="The login UI will use the settings of the default org (and not from the instance) if no organization context is set", alias="loginDefaultOrg") - oidc_trigger_introspection_projections: Optional[StrictBool] = Field(default=None, description="Enable projection triggers during an introspection request. This can act as workaround if there are noticeable consistency issues in the introspection response but can have an impact on performance. We are planning to remove triggers for introspection requests in the future. Please raise an issue if you needed to enable this feature.", alias="oidcTriggerIntrospectionProjections") - oidc_legacy_introspection: Optional[StrictBool] = Field(default=None, description="We have recently refactored the introspection endpoint for performance reasons. This feature can be used to rollback to the legacy implementation if unexpected bugs arise. Please raise an issue if you needed to enable this feature.", alias="oidcLegacyIntrospection") - user_schema: Optional[StrictBool] = Field(default=None, description="User Schemas allow to manage data schemas of user. If the flag is enabled, you'll be able to use the new API and its features. Note that it is still in an early stage.", alias="userSchema") - oidc_token_exchange: Optional[StrictBool] = Field(default=None, description="Enable the experimental `urn:ietf:params:oauth:grant-type:token-exchange` grant type for the OIDC token endpoint. Token exchange can be used to request tokens with a lesser scope or impersonate other users. See the security policy to allow impersonation on an instance.", alias="oidcTokenExchange") - improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, description="Improves performance of specified execution paths.", alias="improvedPerformance") - oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, description="If the flag is enabled, you'll be able to terminate a single session from the login UI by providing an id_token with a `sid` claim as id_token_hint on the end_session endpoint. Note that currently all sessions from the same user agent (browser) are terminated in the login UI. Sessions managed through the Session API already allow the termination of single sessions.", alias="oidcSingleV1SessionTermination") - disable_user_token_event: Optional[StrictBool] = Field(default=None, description="Do not push user token meta-event user.token.v2.added to improve performance on many concurrent single (machine-)user logins", alias="disableUserTokenEvent") - enable_back_channel_logout: Optional[StrictBool] = Field(default=None, description="If the flag is enabled, you'll be able to use the OIDC Back-Channel Logout to be notified in your application about terminated user sessions.", alias="enableBackChannelLogout") + login_default_org: Optional[StrictBool] = Field(default=None, alias="loginDefaultOrg") + user_schema: Optional[StrictBool] = Field(default=None, alias="userSchema") + oidc_token_exchange: Optional[StrictBool] = Field(default=None, alias="oidcTokenExchange") + improved_performance: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, alias="improvedPerformance") + oidc_single_v1_session_termination: Optional[StrictBool] = Field(default=None, alias="oidcSingleV1SessionTermination") + disable_user_token_event: Optional[StrictBool] = Field(default=None, alias="disableUserTokenEvent") + enable_back_channel_logout: Optional[StrictBool] = Field(default=None, alias="enableBackChannelLogout") login_v2: Optional[FeatureServiceLoginV2] = Field(default=None, alias="loginV2") - permission_check_v2: Optional[StrictBool] = Field(default=None, description="Enable a newer, more performant, permission check used for v2 and v3 resource based APIs.", alias="permissionCheckV2") + permission_check_v2: Optional[StrictBool] = Field(default=None, alias="permissionCheckV2") + __properties: ClassVar[List[str]] = ["loginDefaultOrg", "userSchema", "oidcTokenExchange", "improvedPerformance", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2"] model_config = ConfigDict( populate_by_name=True, @@ -82,6 +81,41 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of login_v2 if self.login_v2: _dict['loginV2'] = self.login_v2.to_dict() + # set to None if login_default_org (nullable) is None + # and model_fields_set contains the field + if self.login_default_org is None and "login_default_org" in self.model_fields_set: + _dict['loginDefaultOrg'] = None + + # set to None if user_schema (nullable) is None + # and model_fields_set contains the field + if self.user_schema is None and "user_schema" in self.model_fields_set: + _dict['userSchema'] = None + + # set to None if oidc_token_exchange (nullable) is None + # and model_fields_set contains the field + if self.oidc_token_exchange is None and "oidc_token_exchange" in self.model_fields_set: + _dict['oidcTokenExchange'] = None + + # set to None if oidc_single_v1_session_termination (nullable) is None + # and model_fields_set contains the field + if self.oidc_single_v1_session_termination is None and "oidc_single_v1_session_termination" in self.model_fields_set: + _dict['oidcSingleV1SessionTermination'] = None + + # set to None if disable_user_token_event (nullable) is None + # and model_fields_set contains the field + if self.disable_user_token_event is None and "disable_user_token_event" in self.model_fields_set: + _dict['disableUserTokenEvent'] = None + + # set to None if enable_back_channel_logout (nullable) is None + # and model_fields_set contains the field + if self.enable_back_channel_logout is None and "enable_back_channel_logout" in self.model_fields_set: + _dict['enableBackChannelLogout'] = None + + # set to None if permission_check_v2 (nullable) is None + # and model_fields_set contains the field + if self.permission_check_v2 is None and "permission_check_v2" in self.model_fields_set: + _dict['permissionCheckV2'] = None + return _dict @classmethod @@ -95,8 +129,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "loginDefaultOrg": obj.get("loginDefaultOrg"), - "oidcTriggerIntrospectionProjections": obj.get("oidcTriggerIntrospectionProjections"), - "oidcLegacyIntrospection": obj.get("oidcLegacyIntrospection"), "userSchema": obj.get("userSchema"), "oidcTokenExchange": obj.get("oidcTokenExchange"), "improvedPerformance": obj.get("improvedPerformance"), diff --git a/zitadel_client/models/feature_service_set_system_features_response.py b/zitadel_client/models/feature_service_set_system_features_response.py index 5ed3f9f9..ab9660fd 100644 --- a/zitadel_client/models/feature_service_set_system_features_response.py +++ b/zitadel_client/models/feature_service_set_system_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceSetSystemFeaturesResponse(BaseModel): FeatureServiceSetSystemFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_set_user_feature_request.py b/zitadel_client/models/feature_service_set_user_feature_request.py new file mode 100644 index 00000000..45650af5 --- /dev/null +++ b/zitadel_client/models/feature_service_set_user_feature_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeatureServiceSetUserFeatureRequest(BaseModel): + """ + FeatureServiceSetUserFeatureRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeatureServiceSetUserFeatureRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeatureServiceSetUserFeatureRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/feature_service_set_user_features_response.py b/zitadel_client/models/feature_service_set_user_features_response.py index a95e7915..01e5ff80 100644 --- a/zitadel_client/models/feature_service_set_user_features_response.py +++ b/zitadel_client/models/feature_service_set_user_features_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.feature_service_details import FeatureServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class FeatureServiceSetUserFeaturesResponse(BaseModel): FeatureServiceSetUserFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_any.py b/zitadel_client/models/identity_provider_service_any.py new file mode 100644 index 00000000..3a0a542c --- /dev/null +++ b/zitadel_client/models/identity_provider_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class IdentityProviderServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdentityProviderServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdentityProviderServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_apple_config.py b/zitadel_client/models/identity_provider_service_apple_config.py index d3611661..820d7bf9 100644 --- a/zitadel_client/models/identity_provider_service_apple_config.py +++ b/zitadel_client/models/identity_provider_service_apple_config.py @@ -30,6 +30,7 @@ class IdentityProviderServiceAppleConfig(BaseModel): team_id: Optional[StrictStr] = Field(default=None, description="Team ID provided by Apple.", alias="teamId") key_id: Optional[StrictStr] = Field(default=None, description="ID of the private key generated by Apple.", alias="keyId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to Apple.") + __properties: ClassVar[List[str]] = ["clientId", "teamId", "keyId", "scopes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_auto_linking_option.py b/zitadel_client/models/identity_provider_service_auto_linking_option.py index 0bc79d11..e1913f36 100644 --- a/zitadel_client/models/identity_provider_service_auto_linking_option.py +++ b/zitadel_client/models/identity_provider_service_auto_linking_option.py @@ -20,7 +20,7 @@ class IdentityProviderServiceAutoLinkingOption(str, Enum): """ - - AUTO_LINKING_OPTION_UNSPECIFIED: AUTO_LINKING_OPTION_UNSPECIFIED disables the auto linking prompt. - AUTO_LINKING_OPTION_USERNAME: AUTO_LINKING_OPTION_USERNAME will use the username of the external user to check for a corresponding ZITADEL user. - AUTO_LINKING_OPTION_EMAIL: AUTO_LINKING_OPTION_EMAIL will use the email of the external user to check for a corresponding ZITADEL user with the same verified email Note that in case multiple users match, no prompt will be shown. + IdentityProviderServiceAutoLinkingOption """ """ diff --git a/zitadel_client/models/identity_provider_service_azure_ad_config.py b/zitadel_client/models/identity_provider_service_azure_ad_config.py index d864c386..ff59f020 100644 --- a/zitadel_client/models/identity_provider_service_azure_ad_config.py +++ b/zitadel_client/models/identity_provider_service_azure_ad_config.py @@ -27,10 +27,11 @@ class IdentityProviderServiceAzureADConfig(BaseModel): """ IdentityProviderServiceAzureADConfig """ # noqa: E501 - client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + client_id: Optional[StrictStr] = Field(default=None, description="Client id of the Azure AD application", alias="clientId") tenant: Optional[IdentityProviderServiceAzureADTenant] = None - email_verified: Optional[StrictBool] = Field(default=None, description="Azure AD doesn't send if the email has been verified. Enable this if the user email should always be added verified in ZITADEL (no verification emails will be sent).", alias="emailVerified") + email_verified: Optional[StrictBool] = Field(default=None, description="Azure AD doesn't send if the email has been verified. Enable this if the user email should always be added verified in ZITADEL (no verification emails will be sent).", alias="emailVerified") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to Azure AD.") + __properties: ClassVar[List[str]] = ["clientId", "tenant", "emailVerified", "scopes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_azure_ad_tenant.py b/zitadel_client/models/identity_provider_service_azure_ad_tenant.py index e075284f..644eda6f 100644 --- a/zitadel_client/models/identity_provider_service_azure_ad_tenant.py +++ b/zitadel_client/models/identity_provider_service_azure_ad_tenant.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_azure_ad_tenant_type import IdentityProviderServiceAzureADTenantType from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,9 @@ class IdentityProviderServiceAzureADTenant(BaseModel): """ IdentityProviderServiceAzureADTenant """ # noqa: E501 - tenant_type: Optional[IdentityProviderServiceAzureADTenantType] = Field(default=IdentityProviderServiceAzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON, alias="tenantType") tenant_id: Optional[StrictStr] = Field(default=None, alias="tenantId") + tenant_type: Optional[IdentityProviderServiceAzureADTenantType] = Field(default=None, alias="tenantType") + __properties: ClassVar[List[str]] = ["tenantId", "tenantType"] model_config = ConfigDict( populate_by_name=True, @@ -81,8 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tenantType": obj.get("tenantType") if obj.get("tenantType") is not None else IdentityProviderServiceAzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON, - "tenantId": obj.get("tenantId") + "tenantId": obj.get("tenantId"), + "tenantType": obj.get("tenantType") }) return _obj diff --git a/zitadel_client/models/identity_provider_service_connect_error.py b/zitadel_client/models/identity_provider_service_connect_error.py new file mode 100644 index 00000000..8b08ba18 --- /dev/null +++ b/zitadel_client/models/identity_provider_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.identity_provider_service_any import IdentityProviderServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class IdentityProviderServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[IdentityProviderServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdentityProviderServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdentityProviderServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": IdentityProviderServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_details.py b/zitadel_client/models/identity_provider_service_details.py index 00c49b34..0f722054 100644 --- a/zitadel_client/models/identity_provider_service_details.py +++ b/zitadel_client/models/identity_provider_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class IdentityProviderServiceDetails(BaseModel): """ IdentityProviderServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/identity_provider_service_generic_oidc_config.py b/zitadel_client/models/identity_provider_service_generic_oidc_config.py index 421abdfc..7e6a35fa 100644 --- a/zitadel_client/models/identity_provider_service_generic_oidc_config.py +++ b/zitadel_client/models/identity_provider_service_generic_oidc_config.py @@ -28,8 +28,9 @@ class IdentityProviderServiceGenericOIDCConfig(BaseModel): """ # noqa: E501 issuer: Optional[StrictStr] = Field(default=None, description="The OIDC issuer of the identity provider.") client_id: Optional[StrictStr] = Field(default=None, description="Client id generated by the identity provider.", alias="clientId") - scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request on the identity provider.") - is_id_token_mapping: Optional[StrictBool] = Field(default=None, description="If true, provider information get mapped from the id token, not from the userinfo endpoint.", alias="isIdTokenMapping") + scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request on the identity provider.") + is_id_token_mapping: Optional[StrictBool] = Field(default=None, description="If true, provider information get mapped from the id token, not from the userinfo endpoint.", alias="isIdTokenMapping") + __properties: ClassVar[List[str]] = ["issuer", "clientId", "scopes", "isIdTokenMapping"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_get_idpby_id_request.py b/zitadel_client/models/identity_provider_service_get_idpby_id_request.py new file mode 100644 index 00000000..48f56b16 --- /dev/null +++ b/zitadel_client/models/identity_provider_service_get_idpby_id_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IdentityProviderServiceGetIDPByIDRequest(BaseModel): + """ + IdentityProviderServiceGetIDPByIDRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdentityProviderServiceGetIDPByIDRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdentityProviderServiceGetIDPByIDRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/identity_provider_service_get_idpby_id_response.py b/zitadel_client/models/identity_provider_service_get_idpby_id_response.py index b77a75aa..29055ac8 100644 --- a/zitadel_client/models/identity_provider_service_get_idpby_id_response.py +++ b/zitadel_client/models/identity_provider_service_get_idpby_id_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_idp import IdentityProviderServiceIDP from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class IdentityProviderServiceGetIDPByIDResponse(BaseModel): IdentityProviderServiceGetIDPByIDResponse """ # noqa: E501 idp: Optional[IdentityProviderServiceIDP] = None + __properties: ClassVar[List[str]] = ["idp"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_git_hub_config.py b/zitadel_client/models/identity_provider_service_git_hub_config.py index 677f220d..4b90c64b 100644 --- a/zitadel_client/models/identity_provider_service_git_hub_config.py +++ b/zitadel_client/models/identity_provider_service_git_hub_config.py @@ -28,6 +28,7 @@ class IdentityProviderServiceGitHubConfig(BaseModel): """ # noqa: E501 client_id: Optional[StrictStr] = Field(default=None, description="The client ID of the GitHub App.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitHub.") + __properties: ClassVar[List[str]] = ["clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_git_hub_enterprise_server_config.py b/zitadel_client/models/identity_provider_service_git_hub_enterprise_server_config.py index f91db7b6..c538ca90 100644 --- a/zitadel_client/models/identity_provider_service_git_hub_enterprise_server_config.py +++ b/zitadel_client/models/identity_provider_service_git_hub_enterprise_server_config.py @@ -31,6 +31,7 @@ class IdentityProviderServiceGitHubEnterpriseServerConfig(BaseModel): token_endpoint: Optional[StrictStr] = Field(default=None, alias="tokenEndpoint") user_endpoint: Optional[StrictStr] = Field(default=None, alias="userEndpoint") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitHub.") + __properties: ClassVar[List[str]] = ["clientId", "authorizationEndpoint", "tokenEndpoint", "userEndpoint", "scopes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_git_lab_config.py b/zitadel_client/models/identity_provider_service_git_lab_config.py index 177fef60..d5e8a628 100644 --- a/zitadel_client/models/identity_provider_service_git_lab_config.py +++ b/zitadel_client/models/identity_provider_service_git_lab_config.py @@ -28,6 +28,7 @@ class IdentityProviderServiceGitLabConfig(BaseModel): """ # noqa: E501 client_id: Optional[StrictStr] = Field(default=None, description="Client id of the GitLab application.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitLab.") + __properties: ClassVar[List[str]] = ["clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_git_lab_self_hosted_config.py b/zitadel_client/models/identity_provider_service_git_lab_self_hosted_config.py index 0ef3b900..64e9ceed 100644 --- a/zitadel_client/models/identity_provider_service_git_lab_self_hosted_config.py +++ b/zitadel_client/models/identity_provider_service_git_lab_self_hosted_config.py @@ -29,6 +29,7 @@ class IdentityProviderServiceGitLabSelfHostedConfig(BaseModel): issuer: Optional[StrictStr] = None client_id: Optional[StrictStr] = Field(default=None, description="Client id of the GitLab application.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitLab.") + __properties: ClassVar[List[str]] = ["issuer", "clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_google_config.py b/zitadel_client/models/identity_provider_service_google_config.py index d1be469b..39cb1bab 100644 --- a/zitadel_client/models/identity_provider_service_google_config.py +++ b/zitadel_client/models/identity_provider_service_google_config.py @@ -28,6 +28,7 @@ class IdentityProviderServiceGoogleConfig(BaseModel): """ # noqa: E501 client_id: Optional[StrictStr] = Field(default=None, description="Client id of the Google application.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to Google.") + __properties: ClassVar[List[str]] = ["clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_idp.py b/zitadel_client/models/identity_provider_service_idp.py index 7ad3700c..9947b18d 100644 --- a/zitadel_client/models/identity_provider_service_idp.py +++ b/zitadel_client/models/identity_provider_service_idp.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_details import IdentityProviderServiceDetails from zitadel_client.models.identity_provider_service_idp_config import IdentityProviderServiceIDPConfig from zitadel_client.models.identity_provider_service_idp_state import IdentityProviderServiceIDPState @@ -32,10 +32,11 @@ class IdentityProviderServiceIDP(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the identity provider.") details: Optional[IdentityProviderServiceDetails] = None - state: Optional[IdentityProviderServiceIDPState] = IdentityProviderServiceIDPState.IDP_STATE_UNSPECIFIED + state: Optional[IdentityProviderServiceIDPState] = None name: Optional[StrictStr] = None - type: Optional[IdentityProviderServiceIDPType] = IdentityProviderServiceIDPType.IDP_TYPE_UNSPECIFIED + type: Optional[IdentityProviderServiceIDPType] = None config: Optional[IdentityProviderServiceIDPConfig] = None + __properties: ClassVar[List[str]] = ["id", "details", "state", "name", "type", "config"] model_config = ConfigDict( populate_by_name=True, @@ -96,9 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "details": IdentityProviderServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "state": obj.get("state") if obj.get("state") is not None else IdentityProviderServiceIDPState.IDP_STATE_UNSPECIFIED, + "state": obj.get("state"), "name": obj.get("name"), - "type": obj.get("type") if obj.get("type") is not None else IdentityProviderServiceIDPType.IDP_TYPE_UNSPECIFIED, + "type": obj.get("type"), "config": IdentityProviderServiceIDPConfig.from_dict(obj["config"]) if obj.get("config") is not None else None }) return _obj diff --git a/zitadel_client/models/identity_provider_service_idp_config.py b/zitadel_client/models/identity_provider_service_idp_config.py index 24872f8b..e48a029e 100644 --- a/zitadel_client/models/identity_provider_service_idp_config.py +++ b/zitadel_client/models/identity_provider_service_idp_config.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_apple_config import IdentityProviderServiceAppleConfig from zitadel_client.models.identity_provider_service_azure_ad_config import IdentityProviderServiceAzureADConfig from zitadel_client.models.identity_provider_service_generic_oidc_config import IdentityProviderServiceGenericOIDCConfig @@ -40,18 +40,19 @@ class IdentityProviderServiceIDPConfig(BaseModel): IdentityProviderServiceIDPConfig """ # noqa: E501 options: Optional[IdentityProviderServiceOptions] = None - ldap: Optional[IdentityProviderServiceLDAPConfig] = None - google: Optional[IdentityProviderServiceGoogleConfig] = None - oauth: Optional[IdentityProviderServiceOAuthConfig] = None - oidc: Optional[IdentityProviderServiceGenericOIDCConfig] = None - jwt: Optional[IdentityProviderServiceJWTConfig] = None + apple: Optional[IdentityProviderServiceAppleConfig] = None + azure_ad: Optional[IdentityProviderServiceAzureADConfig] = Field(default=None, alias="azureAd") github: Optional[IdentityProviderServiceGitHubConfig] = None github_es: Optional[IdentityProviderServiceGitHubEnterpriseServerConfig] = Field(default=None, alias="githubEs") gitlab: Optional[IdentityProviderServiceGitLabConfig] = None gitlab_self_hosted: Optional[IdentityProviderServiceGitLabSelfHostedConfig] = Field(default=None, alias="gitlabSelfHosted") - azure_ad: Optional[IdentityProviderServiceAzureADConfig] = Field(default=None, alias="azureAd") - apple: Optional[IdentityProviderServiceAppleConfig] = None + google: Optional[IdentityProviderServiceGoogleConfig] = None + jwt: Optional[IdentityProviderServiceJWTConfig] = None + ldap: Optional[IdentityProviderServiceLDAPConfig] = None + oauth: Optional[IdentityProviderServiceOAuthConfig] = None + oidc: Optional[IdentityProviderServiceGenericOIDCConfig] = None saml: Optional[IdentityProviderServiceSAMLConfig] = None + __properties: ClassVar[List[str]] = ["options", "apple", "azureAd", "github", "githubEs", "gitlab", "gitlabSelfHosted", "google", "jwt", "ldap", "oauth", "oidc", "saml"] model_config = ConfigDict( populate_by_name=True, @@ -92,6 +93,45 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of options + if self.options: + _dict['options'] = self.options.to_dict() + # override the default output from pydantic by calling `to_dict()` of apple + if self.apple: + _dict['apple'] = self.apple.to_dict() + # override the default output from pydantic by calling `to_dict()` of azure_ad + if self.azure_ad: + _dict['azureAd'] = self.azure_ad.to_dict() + # override the default output from pydantic by calling `to_dict()` of github + if self.github: + _dict['github'] = self.github.to_dict() + # override the default output from pydantic by calling `to_dict()` of github_es + if self.github_es: + _dict['githubEs'] = self.github_es.to_dict() + # override the default output from pydantic by calling `to_dict()` of gitlab + if self.gitlab: + _dict['gitlab'] = self.gitlab.to_dict() + # override the default output from pydantic by calling `to_dict()` of gitlab_self_hosted + if self.gitlab_self_hosted: + _dict['gitlabSelfHosted'] = self.gitlab_self_hosted.to_dict() + # override the default output from pydantic by calling `to_dict()` of google + if self.google: + _dict['google'] = self.google.to_dict() + # override the default output from pydantic by calling `to_dict()` of jwt + if self.jwt: + _dict['jwt'] = self.jwt.to_dict() + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _dict['oauth'] = self.oauth.to_dict() + # override the default output from pydantic by calling `to_dict()` of oidc + if self.oidc: + _dict['oidc'] = self.oidc.to_dict() + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() return _dict @classmethod @@ -105,17 +145,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "options": IdentityProviderServiceOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, - "ldap": IdentityProviderServiceLDAPConfig.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, - "google": IdentityProviderServiceGoogleConfig.from_dict(obj["google"]) if obj.get("google") is not None else None, - "oauth": IdentityProviderServiceOAuthConfig.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, - "oidc": IdentityProviderServiceGenericOIDCConfig.from_dict(obj["oidc"]) if obj.get("oidc") is not None else None, - "jwt": IdentityProviderServiceJWTConfig.from_dict(obj["jwt"]) if obj.get("jwt") is not None else None, + "apple": IdentityProviderServiceAppleConfig.from_dict(obj["apple"]) if obj.get("apple") is not None else None, + "azureAd": IdentityProviderServiceAzureADConfig.from_dict(obj["azureAd"]) if obj.get("azureAd") is not None else None, "github": IdentityProviderServiceGitHubConfig.from_dict(obj["github"]) if obj.get("github") is not None else None, "githubEs": IdentityProviderServiceGitHubEnterpriseServerConfig.from_dict(obj["githubEs"]) if obj.get("githubEs") is not None else None, "gitlab": IdentityProviderServiceGitLabConfig.from_dict(obj["gitlab"]) if obj.get("gitlab") is not None else None, "gitlabSelfHosted": IdentityProviderServiceGitLabSelfHostedConfig.from_dict(obj["gitlabSelfHosted"]) if obj.get("gitlabSelfHosted") is not None else None, - "azureAd": IdentityProviderServiceAzureADConfig.from_dict(obj["azureAd"]) if obj.get("azureAd") is not None else None, - "apple": IdentityProviderServiceAppleConfig.from_dict(obj["apple"]) if obj.get("apple") is not None else None, + "google": IdentityProviderServiceGoogleConfig.from_dict(obj["google"]) if obj.get("google") is not None else None, + "jwt": IdentityProviderServiceJWTConfig.from_dict(obj["jwt"]) if obj.get("jwt") is not None else None, + "ldap": IdentityProviderServiceLDAPConfig.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, + "oauth": IdentityProviderServiceOAuthConfig.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, + "oidc": IdentityProviderServiceGenericOIDCConfig.from_dict(obj["oidc"]) if obj.get("oidc") is not None else None, "saml": IdentityProviderServiceSAMLConfig.from_dict(obj["saml"]) if obj.get("saml") is not None else None }) return _obj diff --git a/zitadel_client/models/identity_provider_service_jwt_config.py b/zitadel_client/models/identity_provider_service_jwt_config.py index 8680c496..19302d25 100644 --- a/zitadel_client/models/identity_provider_service_jwt_config.py +++ b/zitadel_client/models/identity_provider_service_jwt_config.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,6 +30,7 @@ class IdentityProviderServiceJWTConfig(BaseModel): issuer: Optional[StrictStr] = Field(default=None, description="The issuer of the JWT (for validation).") keys_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint to the key (JWK) which is used to sign the JWT with.", alias="keysEndpoint") header_name: Optional[StrictStr] = Field(default=None, description="The name of the header where the JWT is sent in, default is authorization.", alias="headerName") + __properties: ClassVar[List[str]] = ["jwtEndpoint", "issuer", "keysEndpoint", "headerName"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_ldap_attributes.py b/zitadel_client/models/identity_provider_service_ldap_attributes.py index c8477123..84aefd34 100644 --- a/zitadel_client/models/identity_provider_service_ldap_attributes.py +++ b/zitadel_client/models/identity_provider_service_ldap_attributes.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -40,6 +40,7 @@ class IdentityProviderServiceLDAPAttributes(BaseModel): avatar_url_attribute: Optional[StrictStr] = Field(default=None, alias="avatarUrlAttribute") profile_attribute: Optional[StrictStr] = Field(default=None, alias="profileAttribute") root_ca: Optional[StrictStr] = Field(default=None, alias="rootCa") + __properties: ClassVar[List[str]] = ["idAttribute", "firstNameAttribute", "lastNameAttribute", "displayNameAttribute", "nickNameAttribute", "preferredUsernameAttribute", "emailAttribute", "emailVerifiedAttribute", "phoneAttribute", "phoneVerifiedAttribute", "preferredLanguageAttribute", "avatarUrlAttribute", "profileAttribute", "rootCa"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_ldap_config.py b/zitadel_client/models/identity_provider_service_ldap_config.py index 51215e5d..3c8ca625 100644 --- a/zitadel_client/models/identity_provider_service_ldap_config.py +++ b/zitadel_client/models/identity_provider_service_ldap_config.py @@ -34,9 +34,10 @@ class IdentityProviderServiceLDAPConfig(BaseModel): user_base: Optional[StrictStr] = Field(default=None, alias="userBase") user_object_classes: Optional[List[StrictStr]] = Field(default=None, alias="userObjectClasses") user_filters: Optional[List[StrictStr]] = Field(default=None, alias="userFilters") - timeout: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") attributes: Optional[IdentityProviderServiceLDAPAttributes] = None root_ca: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, alias="rootCa") + __properties: ClassVar[List[str]] = ["servers", "startTls", "baseDn", "bindDn", "userBase", "userObjectClasses", "userFilters", "timeout", "attributes", "rootCa"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_o_auth_config.py b/zitadel_client/models/identity_provider_service_o_auth_config.py index 5bf6405d..ce938a2b 100644 --- a/zitadel_client/models/identity_provider_service_o_auth_config.py +++ b/zitadel_client/models/identity_provider_service_o_auth_config.py @@ -30,8 +30,9 @@ class IdentityProviderServiceOAuthConfig(BaseModel): authorization_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint where ZITADEL send the user to authenticate.", alias="authorizationEndpoint") token_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint where ZITADEL can get the token.", alias="tokenEndpoint") user_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint where ZITADEL can get the user information.", alias="userEndpoint") - scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request on the identity provider.") - id_attribute: Optional[StrictStr] = Field(default=None, description="Defines how the attribute is called where ZITADEL can get the id of the user.", alias="idAttribute") + scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request on the identity provider.") + id_attribute: Optional[StrictStr] = Field(default=None, description="Defines how the attribute is called where ZITADEL can get the id of the user.", alias="idAttribute") + __properties: ClassVar[List[str]] = ["clientId", "authorizationEndpoint", "tokenEndpoint", "userEndpoint", "scopes", "idAttribute"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/identity_provider_service_options.py b/zitadel_client/models/identity_provider_service_options.py index 4e921e4f..e8eff938 100644 --- a/zitadel_client/models/identity_provider_service_options.py +++ b/zitadel_client/models/identity_provider_service_options.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.identity_provider_service_auto_linking_option import IdentityProviderServiceAutoLinkingOption from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,12 @@ class IdentityProviderServiceOptions(BaseModel): """ IdentityProviderServiceOptions """ # noqa: E501 - is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") - is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") - is_auto_creation: Optional[StrictBool] = Field(default=None, description="Enable if a new account in ZITADEL should be created automatically when login with an external account.", alias="isAutoCreation") - is_auto_update: Optional[StrictBool] = Field(default=None, description="Enable if a the ZITADEL account fields should be updated automatically on each login.", alias="isAutoUpdate") - auto_linking: Optional[IdentityProviderServiceAutoLinkingOption] = Field(default=IdentityProviderServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED, alias="autoLinking") + is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") + is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") + is_auto_creation: Optional[StrictBool] = Field(default=None, description="Enable if a new account in ZITADEL should be created automatically when login with an external account.", alias="isAutoCreation") + is_auto_update: Optional[StrictBool] = Field(default=None, description="Enable if a the ZITADEL account fields should be updated automatically on each login.", alias="isAutoUpdate") + auto_linking: Optional[IdentityProviderServiceAutoLinkingOption] = Field(default=None, alias="autoLinking") + __properties: ClassVar[List[str]] = ["isLinkingAllowed", "isCreationAllowed", "isAutoCreation", "isAutoUpdate", "autoLinking"] model_config = ConfigDict( populate_by_name=True, @@ -88,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isCreationAllowed": obj.get("isCreationAllowed"), "isAutoCreation": obj.get("isAutoCreation"), "isAutoUpdate": obj.get("isAutoUpdate"), - "autoLinking": obj.get("autoLinking") if obj.get("autoLinking") is not None else IdentityProviderServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED + "autoLinking": obj.get("autoLinking") }) return _obj diff --git a/zitadel_client/models/identity_provider_service_saml_config.py b/zitadel_client/models/identity_provider_service_saml_config.py index c81b9e16..aac2ab9f 100644 --- a/zitadel_client/models/identity_provider_service_saml_config.py +++ b/zitadel_client/models/identity_provider_service_saml_config.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.identity_provider_service_saml_binding import IdentityProviderServiceSAMLBinding from zitadel_client.models.identity_provider_service_saml_name_id_format import IdentityProviderServiceSAMLNameIDFormat from typing import Optional, Set @@ -29,11 +29,12 @@ class IdentityProviderServiceSAMLConfig(BaseModel): IdentityProviderServiceSAMLConfig """ # noqa: E501 metadata_xml: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="Metadata of the SAML identity provider.", alias="metadataXml") - binding: Optional[IdentityProviderServiceSAMLBinding] = IdentityProviderServiceSAMLBinding.SAML_BINDING_UNSPECIFIED + binding: Optional[IdentityProviderServiceSAMLBinding] = None with_signed_request: Optional[StrictBool] = Field(default=None, description="Boolean which defines if the authentication requests are signed.", alias="withSignedRequest") - name_id_format: Optional[IdentityProviderServiceSAMLNameIDFormat] = Field(default=IdentityProviderServiceSAMLNameIDFormat.SAML_NAME_ID_FORMAT_UNSPECIFIED, alias="nameIdFormat") - transient_mapping_attribute_name: Optional[StrictStr] = Field(default=None, description="Optional name of the attribute, which will be used to map the user in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`.", alias="transientMappingAttributeName") - federated_logout_enabled: Optional[StrictBool] = Field(default=None, description="Boolean weather federated logout is enabled. If enabled, ZITADEL will send a logout request to the identity provider, if the user terminates the session in ZITADEL. Be sure to provide a SLO endpoint as part of the metadata.", alias="federatedLogoutEnabled") + name_id_format: Optional[IdentityProviderServiceSAMLNameIDFormat] = Field(default=None, alias="nameIdFormat") + transient_mapping_attribute_name: Optional[StrictStr] = Field(default=None, description="Optional name of the attribute, which will be used to map the user in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`.", alias="transientMappingAttributeName") + federated_logout_enabled: Optional[StrictBool] = Field(default=None, description="Boolean weather federated logout is enabled. If enabled, ZITADEL will send a logout request to the identity provider, if the user terminates the session in ZITADEL. Be sure to provide a SLO endpoint as part of the metadata.", alias="federatedLogoutEnabled") + __properties: ClassVar[List[str]] = ["metadataXml", "binding", "withSignedRequest", "nameIdFormat", "transientMappingAttributeName", "federatedLogoutEnabled"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +75,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if transient_mapping_attribute_name (nullable) is None + # and model_fields_set contains the field + if self.transient_mapping_attribute_name is None and "transient_mapping_attribute_name" in self.model_fields_set: + _dict['transientMappingAttributeName'] = None + + # set to None if federated_logout_enabled (nullable) is None + # and model_fields_set contains the field + if self.federated_logout_enabled is None and "federated_logout_enabled" in self.model_fields_set: + _dict['federatedLogoutEnabled'] = None + return _dict @classmethod @@ -87,9 +98,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "metadataXml": obj.get("metadataXml"), - "binding": obj.get("binding") if obj.get("binding") is not None else IdentityProviderServiceSAMLBinding.SAML_BINDING_UNSPECIFIED, + "binding": obj.get("binding"), "withSignedRequest": obj.get("withSignedRequest"), - "nameIdFormat": obj.get("nameIdFormat") if obj.get("nameIdFormat") is not None else IdentityProviderServiceSAMLNameIDFormat.SAML_NAME_ID_FORMAT_UNSPECIFIED, + "nameIdFormat": obj.get("nameIdFormat"), "transientMappingAttributeName": obj.get("transientMappingAttributeName"), "federatedLogoutEnabled": obj.get("federatedLogoutEnabled") }) diff --git a/zitadel_client/models/oidc_service_any.py b/zitadel_client/models/oidc_service_any.py new file mode 100644 index 00000000..313763d8 --- /dev/null +++ b/zitadel_client/models/oidc_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/oidc_service_auth_request.py b/zitadel_client/models/oidc_service_auth_request.py index 79df6f1b..612bdfa8 100644 --- a/zitadel_client/models/oidc_service_auth_request.py +++ b/zitadel_client/models/oidc_service_auth_request.py @@ -28,16 +28,17 @@ class OIDCServiceAuthRequest(BaseModel): """ OIDCServiceAuthRequest """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="ID of the authorization request") - creation_date: Optional[datetime] = Field(default=None, description="Time when the auth request was created", alias="creationDate") - client_id: Optional[StrictStr] = Field(default=None, description="OIDC client ID of the application that created the auth request", alias="clientId") - scope: Optional[List[StrictStr]] = Field(default=None, description="Requested scopes by the application, which the user must consent to.") - redirect_uri: Optional[StrictStr] = Field(default=None, description="Base URI that points back to the application", alias="redirectUri") - prompt: Optional[List[OIDCServicePrompt]] = Field(default=None, description="Prompts that must be displayed to the user") - ui_locales: Optional[List[StrictStr]] = Field(default=None, description="End-User's preferred languages and scripts for the user interface, represented as a list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value [fr-CA, fr, en] represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported.", alias="uiLocales") - login_hint: Optional[StrictStr] = Field(default=None, description="Login hint can be set by the application with a user identifier such as an email or phone number.", alias="loginHint") - max_age: Optional[StrictStr] = Field(default=None, description="Specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated. If the elapsed time is greater than this value, or the field is present with 0 duration, the user must be re-authenticated.", alias="maxAge") - hint_user_id: Optional[StrictStr] = Field(default=None, description="User ID taken from a ID Token Hint if it was present and valid.", alias="hintUserId") + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + client_id: Optional[StrictStr] = Field(default=None, alias="clientId") + scope: Optional[List[StrictStr]] = None + redirect_uri: Optional[StrictStr] = Field(default=None, alias="redirectUri") + prompt: Optional[List[OIDCServicePrompt]] = None + ui_locales: Optional[List[StrictStr]] = Field(default=None, alias="uiLocales") + login_hint: Optional[StrictStr] = Field(default=None, alias="loginHint") + max_age: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="maxAge") + hint_user_id: Optional[StrictStr] = Field(default=None, alias="hintUserId") + __properties: ClassVar[List[str]] = ["id", "creationDate", "clientId", "scope", "redirectUri", "prompt", "uiLocales", "loginHint", "maxAge", "hintUserId"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +79,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if login_hint (nullable) is None + # and model_fields_set contains the field + if self.login_hint is None and "login_hint" in self.model_fields_set: + _dict['loginHint'] = None + + # set to None if hint_user_id (nullable) is None + # and model_fields_set contains the field + if self.hint_user_id is None and "hint_user_id" in self.model_fields_set: + _dict['hintUserId'] = None + return _dict @classmethod diff --git a/zitadel_client/models/oidc_service_authorization_error.py b/zitadel_client/models/oidc_service_authorization_error.py index 0f0d403f..6b5e2056 100644 --- a/zitadel_client/models/oidc_service_authorization_error.py +++ b/zitadel_client/models/oidc_service_authorization_error.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_error_reason import OIDCServiceErrorReason from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class OIDCServiceAuthorizationError(BaseModel): """ OIDCServiceAuthorizationError """ # noqa: E501 - error: Optional[OIDCServiceErrorReason] = OIDCServiceErrorReason.ERROR_REASON_UNSPECIFIED + error: Optional[OIDCServiceErrorReason] = None error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") error_uri: Optional[StrictStr] = Field(default=None, alias="errorUri") + __properties: ClassVar[List[str]] = ["error", "errorDescription", "errorUri"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if error_description (nullable) is None + # and model_fields_set contains the field + if self.error_description is None and "error_description" in self.model_fields_set: + _dict['errorDescription'] = None + + # set to None if error_uri (nullable) is None + # and model_fields_set contains the field + if self.error_uri is None and "error_uri" in self.model_fields_set: + _dict['errorUri'] = None + return _dict @classmethod @@ -82,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "error": obj.get("error") if obj.get("error") is not None else OIDCServiceErrorReason.ERROR_REASON_UNSPECIFIED, + "error": obj.get("error"), "errorDescription": obj.get("errorDescription"), "errorUri": obj.get("errorUri") }) diff --git a/zitadel_client/models/oidc_service_authorize_or_deny_device_authorization_request.py b/zitadel_client/models/oidc_service_authorize_or_deny_device_authorization_request.py index 6fa741df..acdd4ce2 100644 --- a/zitadel_client/models/oidc_service_authorize_or_deny_device_authorization_request.py +++ b/zitadel_client/models/oidc_service_authorize_or_deny_device_authorization_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_session import OIDCServiceSession from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest(BaseModel): """ OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest """ # noqa: E501 - session: Optional[OIDCServiceSession] = None + device_authorization_id: Optional[StrictStr] = Field(default=None, description="The device authorization id returned when submitting the user code.", alias="deviceAuthorizationId") deny: Optional[Dict[str, Any]] = None + session: Optional[OIDCServiceSession] = None + __properties: ClassVar[List[str]] = ["deviceAuthorizationId", "deny", "session"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() return _dict @classmethod @@ -81,8 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None, - "deny": obj.get("deny") + "deviceAuthorizationId": obj.get("deviceAuthorizationId"), + "deny": obj.get("deny"), + "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None }) return _obj diff --git a/zitadel_client/models/oidc_service_connect_error.py b/zitadel_client/models/oidc_service_connect_error.py new file mode 100644 index 00000000..38451819 --- /dev/null +++ b/zitadel_client/models/oidc_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.oidc_service_any import OIDCServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[OIDCServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": OIDCServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/oidc_service_create_callback_request.py b/zitadel_client/models/oidc_service_create_callback_request.py index da2ca5eb..346a207d 100644 --- a/zitadel_client/models/oidc_service_create_callback_request.py +++ b/zitadel_client/models/oidc_service_create_callback_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_authorization_error import OIDCServiceAuthorizationError from zitadel_client.models.oidc_service_session import OIDCServiceSession from typing import Optional, Set @@ -28,8 +28,10 @@ class OIDCServiceCreateCallbackRequest(BaseModel): """ OIDCServiceCreateCallbackRequest """ # noqa: E501 - session: Optional[OIDCServiceSession] = None + auth_request_id: Optional[StrictStr] = Field(default=None, alias="authRequestId") error: Optional[OIDCServiceAuthorizationError] = None + session: Optional[OIDCServiceSession] = None + __properties: ClassVar[List[str]] = ["authRequestId", "error", "session"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +72,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() return _dict @classmethod @@ -82,8 +90,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None, - "error": OIDCServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None + "authRequestId": obj.get("authRequestId"), + "error": OIDCServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None, + "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None }) return _obj diff --git a/zitadel_client/models/oidc_service_create_callback_response.py b/zitadel_client/models/oidc_service_create_callback_response.py index d5232a49..29efd8af 100644 --- a/zitadel_client/models/oidc_service_create_callback_response.py +++ b/zitadel_client/models/oidc_service_create_callback_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_details import OIDCServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class OIDCServiceCreateCallbackResponse(BaseModel): OIDCServiceCreateCallbackResponse """ # noqa: E501 details: Optional[OIDCServiceDetails] = None - callback_url: Optional[StrictStr] = Field(default=None, description="Callback URL where the user should be redirected, using a \"302 FOUND\" status. Contains details for the application to obtain the tokens on success, or error details on failure. Note that this field must be treated as credentials, as the contained code can be used to obtain tokens on behalve of the user.", alias="callbackUrl") + callback_url: Optional[StrictStr] = Field(default=None, alias="callbackUrl") + __properties: ClassVar[List[str]] = ["details", "callbackUrl"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/oidc_service_details.py b/zitadel_client/models/oidc_service_details.py index c406cd44..eb6407bb 100644 --- a/zitadel_client/models/oidc_service_details.py +++ b/zitadel_client/models/oidc_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class OIDCServiceDetails(BaseModel): """ OIDCServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/oidc_service_device_authorization_request.py b/zitadel_client/models/oidc_service_device_authorization_request.py index b455f219..471d95a5 100644 --- a/zitadel_client/models/oidc_service_device_authorization_request.py +++ b/zitadel_client/models/oidc_service_device_authorization_request.py @@ -31,6 +31,7 @@ class OIDCServiceDeviceAuthorizationRequest(BaseModel): scope: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by the application.") app_name: Optional[StrictStr] = Field(default=None, description="Name of the client application.", alias="appName") project_name: Optional[StrictStr] = Field(default=None, description="Name of the project the client application is part of.", alias="projectName") + __properties: ClassVar[List[str]] = ["id", "clientId", "scope", "appName", "projectName"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/oidc_service_get_auth_request_request.py b/zitadel_client/models/oidc_service_get_auth_request_request.py new file mode 100644 index 00000000..f609ec05 --- /dev/null +++ b/zitadel_client/models/oidc_service_get_auth_request_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceGetAuthRequestRequest(BaseModel): + """ + OIDCServiceGetAuthRequestRequest + """ # noqa: E501 + auth_request_id: Optional[StrictStr] = Field(default=None, alias="authRequestId") + __properties: ClassVar[List[str]] = ["authRequestId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceGetAuthRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceGetAuthRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authRequestId": obj.get("authRequestId") + }) + return _obj + + diff --git a/zitadel_client/models/oidc_service_get_auth_request_response.py b/zitadel_client/models/oidc_service_get_auth_request_response.py index b3f877b2..41486486 100644 --- a/zitadel_client/models/oidc_service_get_auth_request_response.py +++ b/zitadel_client/models/oidc_service_get_auth_request_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_auth_request import OIDCServiceAuthRequest from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class OIDCServiceGetAuthRequestResponse(BaseModel): OIDCServiceGetAuthRequestResponse """ # noqa: E501 auth_request: Optional[OIDCServiceAuthRequest] = Field(default=None, alias="authRequest") + __properties: ClassVar[List[str]] = ["authRequest"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/oidc_service_get_device_authorization_request_request.py b/zitadel_client/models/oidc_service_get_device_authorization_request_request.py new file mode 100644 index 00000000..00eecc3d --- /dev/null +++ b/zitadel_client/models/oidc_service_get_device_authorization_request_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OIDCServiceGetDeviceAuthorizationRequestRequest(BaseModel): + """ + OIDCServiceGetDeviceAuthorizationRequestRequest + """ # noqa: E501 + user_code: Optional[StrictStr] = Field(default=None, description="The user_code returned by the device authorization request and provided to the user by the device.", alias="userCode") + __properties: ClassVar[List[str]] = ["userCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCServiceGetDeviceAuthorizationRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCServiceGetDeviceAuthorizationRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userCode": obj.get("userCode") + }) + return _obj + + diff --git a/zitadel_client/models/oidc_service_get_device_authorization_request_response.py b/zitadel_client/models/oidc_service_get_device_authorization_request_response.py index c59077da..f68e2c33 100644 --- a/zitadel_client/models/oidc_service_get_device_authorization_request_response.py +++ b/zitadel_client/models/oidc_service_get_device_authorization_request_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.oidc_service_device_authorization_request import OIDCServiceDeviceAuthorizationRequest from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class OIDCServiceGetDeviceAuthorizationRequestResponse(BaseModel): OIDCServiceGetDeviceAuthorizationRequestResponse """ # noqa: E501 device_authorization_request: Optional[OIDCServiceDeviceAuthorizationRequest] = Field(default=None, alias="deviceAuthorizationRequest") + __properties: ClassVar[List[str]] = ["deviceAuthorizationRequest"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/oidc_service_session.py b/zitadel_client/models/oidc_service_session.py index e3528758..0d0a0241 100644 --- a/zitadel_client/models/oidc_service_session.py +++ b/zitadel_client/models/oidc_service_session.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class OIDCServiceSession(BaseModel): """ OIDCServiceSession """ # noqa: E501 - session_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the session, used to login the user. Connects the session to the Auth Request.", alias="sessionId") - session_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Token to verify the session is valid", alias="sessionToken") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_add_human_user_request.py b/zitadel_client/models/organization_service_add_human_user_request.py index d4024aa7..904a42ad 100644 --- a/zitadel_client/models/organization_service_add_human_user_request.py +++ b/zitadel_client/models/organization_service_add_human_user_request.py @@ -17,17 +17,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated from zitadel_client.models.organization_service_hashed_password import OrganizationServiceHashedPassword from zitadel_client.models.organization_service_idp_link import OrganizationServiceIDPLink +from zitadel_client.models.organization_service_organization import OrganizationServiceOrganization from zitadel_client.models.organization_service_password import OrganizationServicePassword from zitadel_client.models.organization_service_set_human_email import OrganizationServiceSetHumanEmail from zitadel_client.models.organization_service_set_human_phone import OrganizationServiceSetHumanPhone from zitadel_client.models.organization_service_set_human_profile import OrganizationServiceSetHumanProfile from zitadel_client.models.organization_service_set_metadata_entry import OrganizationServiceSetMetadataEntry -from zitadel_client.models.zitadelobjectv2_organization import Zitadelobjectv2Organization from typing import Optional, Set from typing_extensions import Self @@ -35,17 +34,18 @@ class OrganizationServiceAddHumanUserRequest(BaseModel): """ OrganizationServiceAddHumanUserRequest """ # noqa: E501 - user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") - username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") - organization: Optional[Zitadelobjectv2Organization] = None + user_id: Optional[StrictStr] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") + username: Optional[StrictStr] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") + organization: Optional[OrganizationServiceOrganization] = None profile: OrganizationServiceSetHumanProfile email: OrganizationServiceSetHumanEmail phone: Optional[OrganizationServiceSetHumanPhone] = None metadata: Optional[List[OrganizationServiceSetMetadataEntry]] = None - password: Optional[OrganizationServicePassword] = None - hashed_password: Optional[OrganizationServiceHashedPassword] = Field(default=None, alias="hashedPassword") idp_links: Optional[List[OrganizationServiceIDPLink]] = Field(default=None, alias="idpLinks") - totp_secret: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + totp_secret: Optional[StrictStr] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + hashed_password: Optional[OrganizationServiceHashedPassword] = Field(default=None, alias="hashedPassword") + password: Optional[OrganizationServicePassword] = None + __properties: ClassVar[List[str]] = ["userId", "username", "organization", "profile", "email", "phone", "metadata", "idpLinks", "totpSecret", "hashedPassword", "password"] model_config = ConfigDict( populate_by_name=True, @@ -86,6 +86,53 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of organization + if self.organization: + _dict['organization'] = self.organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in idp_links (list) + _items = [] + if self.idp_links: + for _item_idp_links in self.idp_links: + if _item_idp_links: + _items.append(_item_idp_links.to_dict()) + _dict['idpLinks'] = _items + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if totp_secret (nullable) is None + # and model_fields_set contains the field + if self.totp_secret is None and "totp_secret" in self.model_fields_set: + _dict['totpSecret'] = None + return _dict @classmethod @@ -100,15 +147,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userId": obj.get("userId"), "username": obj.get("username"), - "organization": Zitadelobjectv2Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "organization": OrganizationServiceOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, "profile": OrganizationServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, "email": OrganizationServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, "phone": OrganizationServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, "metadata": [OrganizationServiceSetMetadataEntry.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, - "password": OrganizationServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, - "hashedPassword": OrganizationServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, "idpLinks": [OrganizationServiceIDPLink.from_dict(_item) for _item in obj["idpLinks"]] if obj.get("idpLinks") is not None else None, - "totpSecret": obj.get("totpSecret") + "totpSecret": obj.get("totpSecret"), + "hashedPassword": OrganizationServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, + "password": OrganizationServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_add_organization_request.py b/zitadel_client/models/organization_service_add_organization_request.py index b96f5ee9..0e8c2b76 100644 --- a/zitadel_client/models/organization_service_add_organization_request.py +++ b/zitadel_client/models/organization_service_add_organization_request.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from zitadel_client.models.organization_service_add_organization_request_admin import OrganizationServiceAddOrganizationRequestAdmin +from zitadel_client.models.organization_service_admin import OrganizationServiceAdmin from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,10 @@ class OrganizationServiceAddOrganizationRequest(BaseModel): """ OrganizationServiceAddOrganizationRequest """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - admins: Optional[List[OrganizationServiceAddOrganizationRequestAdmin]] = None + name: StrictStr + admins: Optional[List[OrganizationServiceAdmin]] = None + org_id: Optional[StrictStr] = Field(default=None, description="optionally set your own id unique for the organization.", alias="orgId") + __properties: ClassVar[List[str]] = ["name", "admins", "orgId"] model_config = ConfigDict( populate_by_name=True, @@ -77,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_admins: _items.append(_item_admins.to_dict()) _dict['admins'] = _items + # set to None if org_id (nullable) is None + # and model_fields_set contains the field + if self.org_id is None and "org_id" in self.model_fields_set: + _dict['orgId'] = None + return _dict @classmethod @@ -90,7 +96,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "admins": [OrganizationServiceAddOrganizationRequestAdmin.from_dict(_item) for _item in obj["admins"]] if obj.get("admins") is not None else None + "admins": [OrganizationServiceAdmin.from_dict(_item) for _item in obj["admins"]] if obj.get("admins") is not None else None, + "orgId": obj.get("orgId") }) return _obj diff --git a/zitadel_client/models/organization_service_add_organization_response.py b/zitadel_client/models/organization_service_add_organization_response.py index 39f9eba8..931026c1 100644 --- a/zitadel_client/models/organization_service_add_organization_response.py +++ b/zitadel_client/models/organization_service_add_organization_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.organization_service_add_organization_response_created_admin import OrganizationServiceAddOrganizationResponseCreatedAdmin +from zitadel_client.models.organization_service_created_admin import OrganizationServiceCreatedAdmin from zitadel_client.models.organization_service_details import OrganizationServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,8 @@ class OrganizationServiceAddOrganizationResponse(BaseModel): """ # noqa: E501 details: Optional[OrganizationServiceDetails] = None organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") - created_admins: Optional[List[OrganizationServiceAddOrganizationResponseCreatedAdmin]] = Field(default=None, alias="createdAdmins") + created_admins: Optional[List[OrganizationServiceCreatedAdmin]] = Field(default=None, alias="createdAdmins") + __properties: ClassVar[List[str]] = ["details", "organizationId", "createdAdmins"] model_config = ConfigDict( populate_by_name=True, @@ -95,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": OrganizationServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "organizationId": obj.get("organizationId"), - "createdAdmins": [OrganizationServiceAddOrganizationResponseCreatedAdmin.from_dict(_item) for _item in obj["createdAdmins"]] if obj.get("createdAdmins") is not None else None + "createdAdmins": [OrganizationServiceCreatedAdmin.from_dict(_item) for _item in obj["createdAdmins"]] if obj.get("createdAdmins") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_add_organization_request_admin.py b/zitadel_client/models/organization_service_admin.py similarity index 79% rename from zitadel_client/models/organization_service_add_organization_request_admin.py rename to zitadel_client/models/organization_service_admin.py index 9bbb0bba..92f39e22 100644 --- a/zitadel_client/models/organization_service_add_organization_request_admin.py +++ b/zitadel_client/models/organization_service_admin.py @@ -23,13 +23,14 @@ from typing import Optional, Set from typing_extensions import Self -class OrganizationServiceAddOrganizationRequestAdmin(BaseModel): +class OrganizationServiceAdmin(BaseModel): """ - OrganizationServiceAddOrganizationRequestAdmin + OrganizationServiceAdmin """ # noqa: E501 - user_id: Optional[StrictStr] = Field(default=None, alias="userId") + roles: Optional[List[StrictStr]] = Field(default=None, description="specify Org Member Roles for the provided user (default is ORG_OWNER if roles are empty)") human: Optional[OrganizationServiceAddHumanUserRequest] = None - roles: Optional[List[StrictStr]] = None + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["roles", "human", "userId"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationRequestAdmin from a JSON string""" + """Create an instance of OrganizationServiceAdmin from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +71,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationServiceAddOrganizationRequestAdmin from a dict""" + """Create an instance of OrganizationServiceAdmin from a dict""" if obj is None: return None @@ -82,9 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId"), + "roles": obj.get("roles"), "human": OrganizationServiceAddHumanUserRequest.from_dict(obj["human"]) if obj.get("human") is not None else None, - "roles": obj.get("roles") + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/organization_service_any.py b/zitadel_client/models/organization_service_any.py new file mode 100644 index 00000000..b36faf0f --- /dev/null +++ b/zitadel_client/models/organization_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/organization_service_connect_error.py b/zitadel_client/models/organization_service_connect_error.py new file mode 100644 index 00000000..9069f741 --- /dev/null +++ b/zitadel_client/models/organization_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.organization_service_any import OrganizationServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[OrganizationServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": OrganizationServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/organization_service_created_admin.py b/zitadel_client/models/organization_service_created_admin.py new file mode 100644 index 00000000..eeeb7a21 --- /dev/null +++ b/zitadel_client/models/organization_service_created_admin.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationServiceCreatedAdmin(BaseModel): + """ + OrganizationServiceCreatedAdmin + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + __properties: ClassVar[List[str]] = ["userId", "emailCode", "phoneCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationServiceCreatedAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationServiceCreatedAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/organization_service_details.py b/zitadel_client/models/organization_service_details.py index a366bb3d..f085fdae 100644 --- a/zitadel_client/models/organization_service_details.py +++ b/zitadel_client/models/organization_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class OrganizationServiceDetails(BaseModel): """ OrganizationServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/organization_service_hashed_password.py b/zitadel_client/models/organization_service_hashed_password.py index 65147fef..4d0d1e9b 100644 --- a/zitadel_client/models/organization_service_hashed_password.py +++ b/zitadel_client/models/organization_service_hashed_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class OrganizationServiceHashedPassword(BaseModel): """ OrganizationServiceHashedPassword """ # noqa: E501 - hash: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="\"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\"") + hash: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["hash", "changeRequired"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_idp_link.py b/zitadel_client/models/organization_service_idp_link.py index f92913d7..4a1eb1ba 100644 --- a/zitadel_client/models/organization_service_idp_link.py +++ b/zitadel_client/models/organization_service_idp_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +26,10 @@ class OrganizationServiceIDPLink(BaseModel): """ OrganizationServiceIDPLink """ # noqa: E501 - idp_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the identity provider", alias="idpId") - user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the user of the identity provider", alias="userId") - user_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="username of the user of the identity provider", alias="userName") + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_list_details.py b/zitadel_client/models/organization_service_list_details.py index 435b19cb..2ec531d8 100644 --- a/zitadel_client/models/organization_service_list_details.py +++ b/zitadel_client/models/organization_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class OrganizationServiceListDetails(BaseModel): """ OrganizationServiceListDetails """ # noqa: E501 - total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") - processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") - timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/organization_service_list_organizations_request.py b/zitadel_client/models/organization_service_list_organizations_request.py index 599762aa..58d2ca54 100644 --- a/zitadel_client/models/organization_service_list_organizations_request.py +++ b/zitadel_client/models/organization_service_list_organizations_request.py @@ -30,8 +30,9 @@ class OrganizationServiceListOrganizationsRequest(BaseModel): OrganizationServiceListOrganizationsRequest """ # noqa: E501 query: Optional[OrganizationServiceListQuery] = None - sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - queries: Optional[List[OrganizationServiceSearchQuery]] = None + sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[OrganizationServiceSearchQuery]] = Field(default=None, description="criteria the client is looking for") + __properties: ClassVar[List[str]] = ["query", "sortingColumn", "queries"] model_config = ConfigDict( populate_by_name=True, @@ -95,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "query": OrganizationServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, + "sortingColumn": obj.get("sortingColumn"), "queries": [OrganizationServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_list_organizations_response.py b/zitadel_client/models/organization_service_list_organizations_response.py index b00a8f9f..c36efe5d 100644 --- a/zitadel_client/models/organization_service_list_organizations_response.py +++ b/zitadel_client/models/organization_service_list_organizations_response.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from zitadel_client.models.organization_service_list_details import OrganizationServiceListDetails +from zitadel_client.models.organization_service_organization import OrganizationServiceOrganization from zitadel_client.models.organization_service_organization_field_name import OrganizationServiceOrganizationFieldName -from zitadel_client.models.zitadelorgv2_organization import Zitadelorgv2Organization from typing import Optional, Set from typing_extensions import Self @@ -30,8 +30,9 @@ class OrganizationServiceListOrganizationsResponse(BaseModel): OrganizationServiceListOrganizationsResponse """ # noqa: E501 details: Optional[OrganizationServiceListDetails] = None - sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - result: Optional[List[Zitadelorgv2Organization]] = None + sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=None, alias="sortingColumn") + result: Optional[List[OrganizationServiceOrganization]] = None + __properties: ClassVar[List[str]] = ["details", "sortingColumn", "result"] model_config = ConfigDict( populate_by_name=True, @@ -95,8 +96,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": OrganizationServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, - "result": [Zitadelorgv2Organization.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + "sortingColumn": obj.get("sortingColumn"), + "result": [OrganizationServiceOrganization.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_list_query.py b/zitadel_client/models/organization_service_list_query.py index a738106a..d65721ef 100644 --- a/zitadel_client/models/organization_service_list_query.py +++ b/zitadel_client/models/organization_service_list_query.py @@ -17,18 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self class OrganizationServiceListQuery(BaseModel): """ - Object unspecific list filters like offset, limit and asc/desc. + OrganizationServiceListQuery """ # noqa: E501 - offset: Optional[StrictStr] = None - limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") - asc: Optional[StrictBool] = Field(default=None, description="default is descending") + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod diff --git a/zitadel_client/models/zitadelorgv2_organization.py b/zitadel_client/models/organization_service_organization.py similarity index 85% rename from zitadel_client/models/zitadelorgv2_organization.py rename to zitadel_client/models/organization_service_organization.py index 3657dd26..8f9e81e0 100644 --- a/zitadel_client/models/zitadelorgv2_organization.py +++ b/zitadel_client/models/organization_service_organization.py @@ -18,21 +18,22 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_details import OrganizationServiceDetails from zitadel_client.models.organization_service_organization_state import OrganizationServiceOrganizationState from typing import Optional, Set from typing_extensions import Self -class Zitadelorgv2Organization(BaseModel): +class OrganizationServiceOrganization(BaseModel): """ - Zitadelorgv2Organization + OrganizationServiceOrganization """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the organization.") details: Optional[OrganizationServiceDetails] = None - state: Optional[OrganizationServiceOrganizationState] = OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED + state: Optional[OrganizationServiceOrganizationState] = None name: Optional[StrictStr] = Field(default=None, description="Name of the organization.") primary_domain: Optional[StrictStr] = Field(default=None, description="Primary domain used in the organization.", alias="primaryDomain") + __properties: ClassVar[List[str]] = ["id", "details", "state", "name", "primaryDomain"] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Zitadelorgv2Organization from a JSON string""" + """Create an instance of OrganizationServiceOrganization from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Zitadelorgv2Organization from a dict""" + """Create an instance of OrganizationServiceOrganization from a dict""" if obj is None: return None @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "details": OrganizationServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "state": obj.get("state") if obj.get("state") is not None else OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED, + "state": obj.get("state"), "name": obj.get("name"), "primaryDomain": obj.get("primaryDomain") }) diff --git a/zitadel_client/models/organization_service_organization_domain_query.py b/zitadel_client/models/organization_service_organization_domain_query.py index e3f96739..109f89e5 100644 --- a/zitadel_client/models/organization_service_organization_domain_query.py +++ b/zitadel_client/models/organization_service_organization_domain_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_text_query_method import OrganizationServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class OrganizationServiceOrganizationDomainQuery(BaseModel): """ OrganizationServiceOrganizationDomainQuery """ # noqa: E501 - domain: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="Domain used in organization, not necessary primary domain.") - method: Optional[OrganizationServiceTextQueryMethod] = OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + domain: StrictStr = Field(description="Domain used in organization, not necessary primary domain.") + method: Optional[OrganizationServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["domain", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "domain": obj.get("domain"), - "method": obj.get("method") if obj.get("method") is not None else OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/organization_service_organization_id_query.py b/zitadel_client/models/organization_service_organization_id_query.py index 27912135..257a6393 100644 --- a/zitadel_client/models/organization_service_organization_id_query.py +++ b/zitadel_client/models/organization_service_organization_id_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class OrganizationServiceOrganizationIDQuery(BaseModel): """ OrganizationServiceOrganizationIDQuery """ # noqa: E501 - id: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="Unique identifier of the organization.") + id: StrictStr = Field(description="Unique identifier of the organization.") + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_organization_name_query.py b/zitadel_client/models/organization_service_organization_name_query.py index 36da656d..344272b9 100644 --- a/zitadel_client/models/organization_service_organization_name_query.py +++ b/zitadel_client/models/organization_service_organization_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_text_query_method import OrganizationServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class OrganizationServiceOrganizationNameQuery(BaseModel): """ OrganizationServiceOrganizationNameQuery """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="Name of the organization.") - method: Optional[OrganizationServiceTextQueryMethod] = OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + name: StrictStr = Field(description="Name of the organization.") + method: Optional[OrganizationServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["name", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "method": obj.get("method") if obj.get("method") is not None else OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/organization_service_organization_state_query.py b/zitadel_client/models/organization_service_organization_state_query.py index fa3ae505..93e35569 100644 --- a/zitadel_client/models/organization_service_organization_state_query.py +++ b/zitadel_client/models/organization_service_organization_state_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_organization_state import OrganizationServiceOrganizationState from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,8 @@ class OrganizationServiceOrganizationStateQuery(BaseModel): """ OrganizationServiceOrganizationStateQuery """ # noqa: E501 - state: Optional[OrganizationServiceOrganizationState] = OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED + state: Optional[OrganizationServiceOrganizationState] = None + __properties: ClassVar[List[str]] = ["state"] model_config = ConfigDict( populate_by_name=True, @@ -80,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "state": obj.get("state") if obj.get("state") is not None else OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED + "state": obj.get("state") }) return _obj diff --git a/zitadel_client/models/organization_service_password.py b/zitadel_client/models/organization_service_password.py index 52595261..a68d9e59 100644 --- a/zitadel_client/models/organization_service_password.py +++ b/zitadel_client/models/organization_service_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class OrganizationServicePassword(BaseModel): """ OrganizationServicePassword """ # noqa: E501 - password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] + password: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["password", "changeRequired"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/organization_service_search_query.py b/zitadel_client/models/organization_service_search_query.py index 8543bf7d..38ec3917 100644 --- a/zitadel_client/models/organization_service_search_query.py +++ b/zitadel_client/models/organization_service_search_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_organization_domain_query import OrganizationServiceOrganizationDomainQuery from zitadel_client.models.organization_service_organization_id_query import OrganizationServiceOrganizationIDQuery from zitadel_client.models.organization_service_organization_name_query import OrganizationServiceOrganizationNameQuery @@ -30,11 +30,12 @@ class OrganizationServiceSearchQuery(BaseModel): """ OrganizationServiceSearchQuery """ # noqa: E501 - name_query: Optional[OrganizationServiceOrganizationNameQuery] = Field(default=None, alias="nameQuery") + default_query: Optional[Dict[str, Any]] = Field(default=None, alias="defaultQuery") domain_query: Optional[OrganizationServiceOrganizationDomainQuery] = Field(default=None, alias="domainQuery") - state_query: Optional[OrganizationServiceOrganizationStateQuery] = Field(default=None, alias="stateQuery") id_query: Optional[OrganizationServiceOrganizationIDQuery] = Field(default=None, alias="idQuery") - default_query: Optional[Dict[str, Any]] = Field(default=None, alias="defaultQuery") + name_query: Optional[OrganizationServiceOrganizationNameQuery] = Field(default=None, alias="nameQuery") + state_query: Optional[OrganizationServiceOrganizationStateQuery] = Field(default=None, alias="stateQuery") + __properties: ClassVar[List[str]] = ["defaultQuery", "domainQuery", "idQuery", "nameQuery", "stateQuery"] model_config = ConfigDict( populate_by_name=True, @@ -75,6 +76,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of domain_query + if self.domain_query: + _dict['domainQuery'] = self.domain_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of id_query + if self.id_query: + _dict['idQuery'] = self.id_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of name_query + if self.name_query: + _dict['nameQuery'] = self.name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of state_query + if self.state_query: + _dict['stateQuery'] = self.state_query.to_dict() return _dict @classmethod @@ -87,11 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "nameQuery": OrganizationServiceOrganizationNameQuery.from_dict(obj["nameQuery"]) if obj.get("nameQuery") is not None else None, + "defaultQuery": obj.get("defaultQuery"), "domainQuery": OrganizationServiceOrganizationDomainQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None, - "stateQuery": OrganizationServiceOrganizationStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None, "idQuery": OrganizationServiceOrganizationIDQuery.from_dict(obj["idQuery"]) if obj.get("idQuery") is not None else None, - "defaultQuery": obj.get("defaultQuery") + "nameQuery": OrganizationServiceOrganizationNameQuery.from_dict(obj["nameQuery"]) if obj.get("nameQuery") is not None else None, + "stateQuery": OrganizationServiceOrganizationStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_send_email_verification_code.py b/zitadel_client/models/organization_service_send_email_verification_code.py index b77071a8..6d40cc74 100644 --- a/zitadel_client/models/organization_service_send_email_verification_code.py +++ b/zitadel_client/models/organization_service_send_email_verification_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class OrganizationServiceSendEmailVerificationCode(BaseModel): """ OrganizationServiceSendEmailVerificationCode """ # noqa: E501 - url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the verification mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + url_template: Optional[StrictStr] = Field(default=None, description="Optionally set a url_template, which will be used in the verification mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod diff --git a/zitadel_client/models/organization_service_set_human_email.py b/zitadel_client/models/organization_service_set_human_email.py index eb545722..14e87504 100644 --- a/zitadel_client/models/organization_service_set_human_email.py +++ b/zitadel_client/models/organization_service_set_human_email.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_send_email_verification_code import OrganizationServiceSendEmailVerificationCode from typing import Optional, Set from typing_extensions import Self @@ -28,10 +27,11 @@ class OrganizationServiceSetHumanEmail(BaseModel): """ OrganizationServiceSetHumanEmail """ # noqa: E501 - email: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - send_code: Optional[OrganizationServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + email: StrictStr is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[OrganizationServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["email", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod @@ -85,9 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "email": obj.get("email"), - "sendCode": OrganizationServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, + "isVerified": obj.get("isVerified"), "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") + "sendCode": OrganizationServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/organization_service_set_human_phone.py b/zitadel_client/models/organization_service_set_human_phone.py index ef962e08..e19ae0bd 100644 --- a/zitadel_client/models/organization_service_set_human_phone.py +++ b/zitadel_client/models/organization_service_set_human_phone.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +26,11 @@ class OrganizationServiceSetHumanPhone(BaseModel): """ OrganizationServiceSetHumanPhone """ # noqa: E501 - phone: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None - send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + phone: Optional[StrictStr] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["phone", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -84,9 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), + "isVerified": obj.get("isVerified"), "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") + "sendCode": obj.get("sendCode") }) return _obj diff --git a/zitadel_client/models/organization_service_set_human_profile.py b/zitadel_client/models/organization_service_set_human_profile.py index 828614f7..a956dec9 100644 --- a/zitadel_client/models/organization_service_set_human_profile.py +++ b/zitadel_client/models/organization_service_set_human_profile.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.organization_service_gender import OrganizationServiceGender from typing import Optional, Set from typing_extensions import Self @@ -28,12 +27,13 @@ class OrganizationServiceSetHumanProfile(BaseModel): """ OrganizationServiceSetHumanProfile """ # noqa: E501 - given_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="givenName") - family_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="familyName") - nick_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="nickName") - display_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="displayName") - preferred_language: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, alias="preferredLanguage") - gender: Optional[OrganizationServiceGender] = OrganizationServiceGender.GENDER_UNSPECIFIED + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[OrganizationServiceGender] = None + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +74,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + return _dict @classmethod @@ -91,7 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nickName": obj.get("nickName"), "displayName": obj.get("displayName"), "preferredLanguage": obj.get("preferredLanguage"), - "gender": obj.get("gender") if obj.get("gender") is not None else OrganizationServiceGender.GENDER_UNSPECIFIED + "gender": obj.get("gender") }) return _obj diff --git a/zitadel_client/models/organization_service_set_metadata_entry.py b/zitadel_client/models/organization_service_set_metadata_entry.py index 61329335..9195f62a 100644 --- a/zitadel_client/models/organization_service_set_metadata_entry.py +++ b/zitadel_client/models/organization_service_set_metadata_entry.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Union -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class OrganizationServiceSetMetadataEntry(BaseModel): """ OrganizationServiceSetMetadataEntry """ # noqa: E501 - key: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - value: Union[Annotated[bytes, Field(min_length=1, strict=True, max_length=500000)], Annotated[str, Field(min_length=1, strict=True, max_length=500000)]] = Field(description="The value has to be base64 encoded.") + key: StrictStr + value: Union[StrictBytes, StrictStr] + __properties: ClassVar[List[str]] = ["key", "value"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/saml_service_any.py b/zitadel_client/models/saml_service_any.py new file mode 100644 index 00000000..57d20b34 --- /dev/null +++ b/zitadel_client/models/saml_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class SAMLServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SAMLServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SAMLServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/saml_service_authorization_error.py b/zitadel_client/models/saml_service_authorization_error.py index 2792b3fc..74639451 100644 --- a/zitadel_client/models/saml_service_authorization_error.py +++ b/zitadel_client/models/saml_service_authorization_error.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.saml_service_error_reason import SAMLServiceErrorReason from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,9 @@ class SAMLServiceAuthorizationError(BaseModel): """ SAMLServiceAuthorizationError """ # noqa: E501 - error: Optional[SAMLServiceErrorReason] = SAMLServiceErrorReason.ERROR_REASON_UNSPECIFIED + error: Optional[SAMLServiceErrorReason] = None error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") + __properties: ClassVar[List[str]] = ["error", "errorDescription"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if error_description (nullable) is None + # and model_fields_set contains the field + if self.error_description is None and "error_description" in self.model_fields_set: + _dict['errorDescription'] = None + return _dict @classmethod @@ -81,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "error": obj.get("error") if obj.get("error") is not None else SAMLServiceErrorReason.ERROR_REASON_UNSPECIFIED, + "error": obj.get("error"), "errorDescription": obj.get("errorDescription") }) return _obj diff --git a/zitadel_client/models/saml_service_connect_error.py b/zitadel_client/models/saml_service_connect_error.py new file mode 100644 index 00000000..f6df9008 --- /dev/null +++ b/zitadel_client/models/saml_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.saml_service_any import SAMLServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class SAMLServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[SAMLServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SAMLServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SAMLServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": SAMLServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/saml_service_create_response_request.py b/zitadel_client/models/saml_service_create_response_request.py index eace7d37..eac81c34 100644 --- a/zitadel_client/models/saml_service_create_response_request.py +++ b/zitadel_client/models/saml_service_create_response_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.saml_service_authorization_error import SAMLServiceAuthorizationError from zitadel_client.models.saml_service_session import SAMLServiceSession from typing import Optional, Set @@ -28,8 +28,10 @@ class SAMLServiceCreateResponseRequest(BaseModel): """ SAMLServiceCreateResponseRequest """ # noqa: E501 - session: Optional[SAMLServiceSession] = None + saml_request_id: Optional[StrictStr] = Field(default=None, description="ID of the SAML Request.", alias="samlRequestId") error: Optional[SAMLServiceAuthorizationError] = None + session: Optional[SAMLServiceSession] = None + __properties: ClassVar[List[str]] = ["samlRequestId", "error", "session"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +72,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of session + if self.session: + _dict['session'] = self.session.to_dict() return _dict @classmethod @@ -82,8 +90,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "session": SAMLServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None, - "error": SAMLServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None + "samlRequestId": obj.get("samlRequestId"), + "error": SAMLServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") is not None else None, + "session": SAMLServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None }) return _obj diff --git a/zitadel_client/models/saml_service_create_response_response.py b/zitadel_client/models/saml_service_create_response_response.py index 0e78e346..b1a715f7 100644 --- a/zitadel_client/models/saml_service_create_response_response.py +++ b/zitadel_client/models/saml_service_create_response_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.saml_service_details import SAMLServiceDetails from zitadel_client.models.saml_service_post_response import SAMLServicePostResponse from typing import Optional, Set @@ -30,8 +30,9 @@ class SAMLServiceCreateResponseResponse(BaseModel): """ # noqa: E501 details: Optional[SAMLServiceDetails] = None url: Optional[StrictStr] = Field(default=None, description="URL including the Assertion Consumer Service where the user should be redirected or has to call per POST, depending on the binding. Contains details for the application to obtain the response on success, or error details on failure. Note that this field must be treated as credentials, as the contained SAMLResponse or code can be used on behalve of the user.") - redirect: Optional[Dict[str, Any]] = None post: Optional[SAMLServicePostResponse] = None + redirect: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["details", "url", "post", "redirect"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of post + if self.post: + _dict['post'] = self.post.to_dict() return _dict @classmethod @@ -86,8 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": SAMLServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "url": obj.get("url"), - "redirect": obj.get("redirect"), - "post": SAMLServicePostResponse.from_dict(obj["post"]) if obj.get("post") is not None else None + "post": SAMLServicePostResponse.from_dict(obj["post"]) if obj.get("post") is not None else None, + "redirect": obj.get("redirect") }) return _obj diff --git a/zitadel_client/models/saml_service_details.py b/zitadel_client/models/saml_service_details.py index 76c92d1b..82f48217 100644 --- a/zitadel_client/models/saml_service_details.py +++ b/zitadel_client/models/saml_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class SAMLServiceDetails(BaseModel): """ SAMLServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/saml_service_get_saml_request_request.py b/zitadel_client/models/saml_service_get_saml_request_request.py new file mode 100644 index 00000000..5682bdad --- /dev/null +++ b/zitadel_client/models/saml_service_get_saml_request_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SAMLServiceGetSAMLRequestRequest(BaseModel): + """ + SAMLServiceGetSAMLRequestRequest + """ # noqa: E501 + saml_request_id: Optional[StrictStr] = Field(default=None, description="ID of the SAML Request, as obtained from the redirect URL.", alias="samlRequestId") + __properties: ClassVar[List[str]] = ["samlRequestId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SAMLServiceGetSAMLRequestRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SAMLServiceGetSAMLRequestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "samlRequestId": obj.get("samlRequestId") + }) + return _obj + + diff --git a/zitadel_client/models/saml_service_get_saml_request_response.py b/zitadel_client/models/saml_service_get_saml_request_response.py index 8574f66e..17645f99 100644 --- a/zitadel_client/models/saml_service_get_saml_request_response.py +++ b/zitadel_client/models/saml_service_get_saml_request_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.saml_service_saml_request import SAMLServiceSAMLRequest from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class SAMLServiceGetSAMLRequestResponse(BaseModel): SAMLServiceGetSAMLRequestResponse """ # noqa: E501 saml_request: Optional[SAMLServiceSAMLRequest] = Field(default=None, alias="samlRequest") + __properties: ClassVar[List[str]] = ["samlRequest"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/saml_service_post_response.py b/zitadel_client/models/saml_service_post_response.py index 9c0141d4..288d2249 100644 --- a/zitadel_client/models/saml_service_post_response.py +++ b/zitadel_client/models/saml_service_post_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class SAMLServicePostResponse(BaseModel): """ # noqa: E501 relay_state: Optional[StrictStr] = Field(default=None, alias="relayState") saml_response: Optional[StrictStr] = Field(default=None, alias="samlResponse") + __properties: ClassVar[List[str]] = ["relayState", "samlResponse"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/saml_service_saml_request.py b/zitadel_client/models/saml_service_saml_request.py index db94f7f4..5b8c7cc2 100644 --- a/zitadel_client/models/saml_service_saml_request.py +++ b/zitadel_client/models/saml_service_saml_request.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,12 +27,13 @@ class SAMLServiceSAMLRequest(BaseModel): """ SAMLServiceSAMLRequest """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="ID of the SAMLRequest") - creation_date: Optional[datetime] = Field(default=None, description="Time when the SAMLRequest was created", alias="creationDate") - issuer: Optional[StrictStr] = Field(default=None, description="SAML entityID of the application that created the SAMLRequest") - assertion_consumer_service: Optional[StrictStr] = Field(default=None, description="URL which points back to the assertion consumer service of the application", alias="assertionConsumerService") - relay_state: Optional[StrictStr] = Field(default=None, description="RelayState provided by the application for the request", alias="relayState") - binding: Optional[StrictStr] = Field(default=None, description="Binding used by the application for the request") + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + issuer: Optional[StrictStr] = None + assertion_consumer_service: Optional[StrictStr] = Field(default=None, alias="assertionConsumerService") + relay_state: Optional[StrictStr] = Field(default=None, alias="relayState") + binding: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "creationDate", "issuer", "assertionConsumerService", "relayState", "binding"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/saml_service_session.py b/zitadel_client/models/saml_service_session.py index 34d121e9..45835945 100644 --- a/zitadel_client/models/saml_service_session.py +++ b/zitadel_client/models/saml_service_session.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class SAMLServiceSession(BaseModel): """ SAMLServiceSession """ # noqa: E501 - session_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the session, used to login the user. Connects the session to the SAML Request.", alias="sessionId") - session_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Token to verify the session is valid.", alias="sessionToken") + session_id: Optional[StrictStr] = Field(default=None, description="ID of the session, used to login the user. Connects the session to the SAML Request.", alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, description="Token to verify the session is valid.", alias="sessionToken") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_any.py b/zitadel_client/models/session_service_any.py new file mode 100644 index 00000000..c7a908cd --- /dev/null +++ b/zitadel_client/models/session_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/session_service_challenges.py b/zitadel_client/models/session_service_challenges.py index 0c9df904..44a4b1f1 100644 --- a/zitadel_client/models/session_service_challenges.py +++ b/zitadel_client/models/session_service_challenges.py @@ -18,8 +18,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_challenges_web_auth_n import SessionServiceChallengesWebAuthN +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_web_auth_n import SessionServiceWebAuthN from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class SessionServiceChallenges(BaseModel): """ SessionServiceChallenges """ # noqa: E501 - web_auth_n: Optional[SessionServiceChallengesWebAuthN] = Field(default=None, alias="webAuthN") + web_auth_n: Optional[SessionServiceWebAuthN] = Field(default=None, alias="webAuthN") otp_sms: Optional[StrictStr] = Field(default=None, alias="otpSms") otp_email: Optional[StrictStr] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["webAuthN", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +74,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of web_auth_n if self.web_auth_n: _dict['webAuthN'] = self.web_auth_n.to_dict() + # set to None if otp_sms (nullable) is None + # and model_fields_set contains the field + if self.otp_sms is None and "otp_sms" in self.model_fields_set: + _dict['otpSms'] = None + + # set to None if otp_email (nullable) is None + # and model_fields_set contains the field + if self.otp_email is None and "otp_email" in self.model_fields_set: + _dict['otpEmail'] = None + return _dict @classmethod @@ -85,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "webAuthN": SessionServiceChallengesWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "webAuthN": SessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, "otpSms": obj.get("otpSms"), "otpEmail": obj.get("otpEmail") }) diff --git a/zitadel_client/models/session_service_check_idp_intent.py b/zitadel_client/models/session_service_check_idp_intent.py index e1f93e4f..b8a0a45c 100644 --- a/zitadel_client/models/session_service_check_idp_intent.py +++ b/zitadel_client/models/session_service_check_idp_intent.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class SessionServiceCheckIDPIntent(BaseModel): """ SessionServiceCheckIDPIntent """ # noqa: E501 - idp_intent_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the idp intent, previously returned on the success response of the IDP callback", alias="idpIntentId") - idp_intent_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="token of the idp intent, previously returned on the success response of the IDP callback", alias="idpIntentToken") + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_otp.py b/zitadel_client/models/session_service_check_otp.py index 6c68dd85..5fc5a13c 100644 --- a/zitadel_client/models/session_service_check_otp.py +++ b/zitadel_client/models/session_service_check_otp.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class SessionServiceCheckOTP(BaseModel): """ SessionServiceCheckOTP """ # noqa: E501 - code: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + code: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["code"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_password.py b/zitadel_client/models/session_service_check_password.py index 0a3bb39e..1bd0f49d 100644 --- a/zitadel_client/models/session_service_check_password.py +++ b/zitadel_client/models/session_service_check_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class SessionServiceCheckPassword(BaseModel): """ SessionServiceCheckPassword """ # noqa: E501 - password: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["password"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_totp.py b/zitadel_client/models/session_service_check_totp.py index 0d9281d3..cc3023d9 100644 --- a/zitadel_client/models/session_service_check_totp.py +++ b/zitadel_client/models/session_service_check_totp.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class SessionServiceCheckTOTP(BaseModel): """ SessionServiceCheckTOTP """ # noqa: E501 - code: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=6)]] = None + code: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["code"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_check_user.py b/zitadel_client/models/session_service_check_user.py index c1ca9328..588a6871 100644 --- a/zitadel_client/models/session_service_check_user.py +++ b/zitadel_client/models/session_service_check_user.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class SessionServiceCheckUser(BaseModel): """ SessionServiceCheckUser """ # noqa: E501 - user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="userId") - login_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="loginName") + login_name: Optional[StrictStr] = Field(default=None, alias="loginName") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["loginName", "userId"] model_config = ConfigDict( populate_by_name=True, @@ -81,8 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId"), - "loginName": obj.get("loginName") + "loginName": obj.get("loginName"), + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/session_service_check_web_auth_n.py b/zitadel_client/models/session_service_check_web_auth_n.py index a681d4cc..192be04e 100644 --- a/zitadel_client/models/session_service_check_web_auth_n.py +++ b/zitadel_client/models/session_service_check_web_auth_n.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,8 @@ class SessionServiceCheckWebAuthN(BaseModel): """ SessionServiceCheckWebAuthN """ # noqa: E501 - credential_assertion_data: Dict[str, Any] = Field(description="JSON representation of public key credential issued by the webAuthN client", alias="credentialAssertionData") + credential_assertion_data: Dict[str, Any] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="credentialAssertionData") + __properties: ClassVar[List[str]] = ["credentialAssertionData"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_checks.py b/zitadel_client/models/session_service_checks.py index 986f82e5..cf5f4016 100644 --- a/zitadel_client/models/session_service_checks.py +++ b/zitadel_client/models/session_service_checks.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_check_idp_intent import SessionServiceCheckIDPIntent from zitadel_client.models.session_service_check_otp import SessionServiceCheckOTP from zitadel_client.models.session_service_check_password import SessionServiceCheckPassword @@ -39,6 +39,7 @@ class SessionServiceChecks(BaseModel): totp: Optional[SessionServiceCheckTOTP] = None otp_sms: Optional[SessionServiceCheckOTP] = Field(default=None, alias="otpSms") otp_email: Optional[SessionServiceCheckOTP] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["user", "password", "webAuthN", "idpIntent", "totp", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_connect_error.py b/zitadel_client/models/session_service_connect_error.py new file mode 100644 index 00000000..555adedd --- /dev/null +++ b/zitadel_client/models/session_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.session_service_any import SessionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[SessionServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": SessionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/session_service_create_session_request.py b/zitadel_client/models/session_service_create_session_request.py index fdfc2c68..8f26ef89 100644 --- a/zitadel_client/models/session_service_create_session_request.py +++ b/zitadel_client/models/session_service_create_session_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.session_service_checks import SessionServiceChecks from zitadel_client.models.session_service_request_challenges import SessionServiceRequestChallenges from zitadel_client.models.session_service_user_agent import SessionServiceUserAgent @@ -30,10 +30,11 @@ class SessionServiceCreateSessionRequest(BaseModel): SessionServiceCreateSessionRequest """ # noqa: E501 checks: Optional[SessionServiceChecks] = None - metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list to be stored on the session\"") + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None challenges: Optional[SessionServiceRequestChallenges] = None user_agent: Optional[SessionServiceUserAgent] = Field(default=None, alias="userAgent") - lifetime: Optional[StrictStr] = Field(default=None, description="\"duration (in seconds) after which the session will be automatically invalidated\"") + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + __properties: ClassVar[List[str]] = ["checks", "metadata", "challenges", "userAgent", "lifetime"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_create_session_response.py b/zitadel_client/models/session_service_create_session_response.py index 8f721c91..62a1ac3b 100644 --- a/zitadel_client/models/session_service_create_session_response.py +++ b/zitadel_client/models/session_service_create_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_challenges import SessionServiceChallenges from zitadel_client.models.session_service_details import SessionServiceDetails from typing import Optional, Set @@ -29,9 +29,10 @@ class SessionServiceCreateSessionResponse(BaseModel): SessionServiceCreateSessionResponse """ # noqa: E501 details: Optional[SessionServiceDetails] = None - session_id: Optional[StrictStr] = Field(default=None, description="\"id of the session\"", alias="sessionId") - session_token: Optional[StrictStr] = Field(default=None, description="\"The current token of the session, which is required for delete session, get session or the request of other resources.\"", alias="sessionToken") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") challenges: Optional[SessionServiceChallenges] = None + __properties: ClassVar[List[str]] = ["details", "sessionId", "sessionToken", "challenges"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_creation_date_query.py b/zitadel_client/models/session_service_creation_date_query.py index 838aefcc..ee14c67b 100644 --- a/zitadel_client/models/session_service_creation_date_query.py +++ b/zitadel_client/models/session_service_creation_date_query.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_timestamp_query_method import SessionServiceTimestampQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +28,9 @@ class SessionServiceCreationDateQuery(BaseModel): """ SessionServiceCreationDateQuery """ # noqa: E501 - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") - method: Optional[SessionServiceTimestampQueryMethod] = SessionServiceTimestampQueryMethod.TIMESTAMP_QUERY_METHOD_EQUALS + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + method: Optional[SessionServiceTimestampQueryMethod] = None + __properties: ClassVar[List[str]] = ["creationDate", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "creationDate": obj.get("creationDate"), - "method": obj.get("method") if obj.get("method") is not None else SessionServiceTimestampQueryMethod.TIMESTAMP_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/session_service_creator_query.py b/zitadel_client/models/session_service_creator_query.py index da4b86a7..562a2d10 100644 --- a/zitadel_client/models/session_service_creator_query.py +++ b/zitadel_client/models/session_service_creator_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class SessionServiceCreatorQuery(BaseModel): """ SessionServiceCreatorQuery """ # noqa: E501 - id: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="ID of the user who created the session. If empty, the calling user's ID is used.") + id: Optional[StrictStr] = Field(default=None, description="ID of the user who created the session. If empty, the calling user's ID is used.") + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_delete_session_request.py b/zitadel_client/models/session_service_delete_session_request.py index e8de81bd..d61a2505 100644 --- a/zitadel_client/models/session_service_delete_session_request.py +++ b/zitadel_client/models/session_service_delete_session_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,9 @@ class SessionServiceDeleteSessionRequest(BaseModel): """ SessionServiceDeleteSessionRequest """ # noqa: E501 - session_token: Optional[StrictStr] = Field(default=None, description="\"The current token of the session, previously returned on the create / update request. The token is required unless the authenticated user terminates the own session or is granted the `session.delete` permission.\"", alias="sessionToken") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] model_config = ConfigDict( populate_by_name=True, @@ -67,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + return _dict @classmethod @@ -79,6 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), "sessionToken": obj.get("sessionToken") }) return _obj diff --git a/zitadel_client/models/session_service_delete_session_response.py b/zitadel_client/models/session_service_delete_session_response.py index c3d11bc0..5b2cbdbe 100644 --- a/zitadel_client/models/session_service_delete_session_response.py +++ b/zitadel_client/models/session_service_delete_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_details import SessionServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class SessionServiceDeleteSessionResponse(BaseModel): SessionServiceDeleteSessionResponse """ # noqa: E501 details: Optional[SessionServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_details.py b/zitadel_client/models/session_service_details.py index f37a3b4b..68b708c9 100644 --- a/zitadel_client/models/session_service_details.py +++ b/zitadel_client/models/session_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class SessionServiceDetails(BaseModel): """ SessionServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_factors.py b/zitadel_client/models/session_service_factors.py index 194fa345..0ce274de 100644 --- a/zitadel_client/models/session_service_factors.py +++ b/zitadel_client/models/session_service_factors.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_intent_factor import SessionServiceIntentFactor from zitadel_client.models.session_service_otp_factor import SessionServiceOTPFactor from zitadel_client.models.session_service_password_factor import SessionServicePasswordFactor @@ -39,6 +39,7 @@ class SessionServiceFactors(BaseModel): totp: Optional[SessionServiceTOTPFactor] = None otp_sms: Optional[SessionServiceOTPFactor] = Field(default=None, alias="otpSms") otp_email: Optional[SessionServiceOTPFactor] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["user", "password", "webAuthN", "intent", "totp", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_get_session_request.py b/zitadel_client/models/session_service_get_session_request.py new file mode 100644 index 00000000..51a5044a --- /dev/null +++ b/zitadel_client/models/session_service_get_session_request.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceGetSessionRequest(BaseModel): + """ + SessionServiceGetSessionRequest + """ # noqa: E501 + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceGetSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if session_token (nullable) is None + # and model_fields_set contains the field + if self.session_token is None and "session_token" in self.model_fields_set: + _dict['sessionToken'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceGetSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), + "sessionToken": obj.get("sessionToken") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_get_session_response.py b/zitadel_client/models/session_service_get_session_response.py index 32f40878..48637ef0 100644 --- a/zitadel_client/models/session_service_get_session_response.py +++ b/zitadel_client/models/session_service_get_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_session import SessionServiceSession from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class SessionServiceGetSessionResponse(BaseModel): SessionServiceGetSessionResponse """ # noqa: E501 session: Optional[SessionServiceSession] = None + __properties: ClassVar[List[str]] = ["session"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_user_agent_header_values.py b/zitadel_client/models/session_service_header_values.py similarity index 86% rename from zitadel_client/models/session_service_user_agent_header_values.py rename to zitadel_client/models/session_service_header_values.py index cf1b1660..7c8cb622 100644 --- a/zitadel_client/models/session_service_user_agent_header_values.py +++ b/zitadel_client/models/session_service_header_values.py @@ -22,11 +22,12 @@ from typing import Optional, Set from typing_extensions import Self -class SessionServiceUserAgentHeaderValues(BaseModel): +class SessionServiceHeaderValues(BaseModel): """ - A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme. + A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme. """ # noqa: E501 values: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["values"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceUserAgentHeaderValues from a JSON string""" + """Create an instance of SessionServiceHeaderValues from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceUserAgentHeaderValues from a dict""" + """Create an instance of SessionServiceHeaderValues from a dict""" if obj is None: return None diff --git a/zitadel_client/models/session_service_ids_query.py b/zitadel_client/models/session_service_ids_query.py index 48a40bb5..e3bcc413 100644 --- a/zitadel_client/models/session_service_ids_query.py +++ b/zitadel_client/models/session_service_ids_query.py @@ -27,6 +27,7 @@ class SessionServiceIDsQuery(BaseModel): SessionServiceIDsQuery """ # noqa: E501 ids: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["ids"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_intent_factor.py b/zitadel_client/models/session_service_intent_factor.py index 0c7652a4..ebcf85ed 100644 --- a/zitadel_client/models/session_service_intent_factor.py +++ b/zitadel_client/models/session_service_intent_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,8 @@ class SessionServiceIntentFactor(BaseModel): """ SessionServiceIntentFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when an intent was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_list_details.py b/zitadel_client/models/session_service_list_details.py index e31d9ac0..75e23ace 100644 --- a/zitadel_client/models/session_service_list_details.py +++ b/zitadel_client/models/session_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class SessionServiceListDetails(BaseModel): """ SessionServiceListDetails """ # noqa: E501 - total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") - processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") - timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_list_query.py b/zitadel_client/models/session_service_list_query.py index df019995..6a79c932 100644 --- a/zitadel_client/models/session_service_list_query.py +++ b/zitadel_client/models/session_service_list_query.py @@ -17,18 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self class SessionServiceListQuery(BaseModel): """ - Object unspecific list filters like offset, limit and asc/desc. + SessionServiceListQuery """ # noqa: E501 - offset: Optional[StrictStr] = None - limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") - asc: Optional[StrictBool] = Field(default=None, description="default is descending") + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_list_sessions_request.py b/zitadel_client/models/session_service_list_sessions_request.py index 497208c7..ed283767 100644 --- a/zitadel_client/models/session_service_list_sessions_request.py +++ b/zitadel_client/models/session_service_list_sessions_request.py @@ -31,7 +31,8 @@ class SessionServiceListSessionsRequest(BaseModel): """ # noqa: E501 query: Optional[SessionServiceListQuery] = None queries: Optional[List[SessionServiceSearchQuery]] = None - sorting_column: Optional[SessionServiceSessionFieldName] = Field(default=SessionServiceSessionFieldName.SESSION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") + sorting_column: Optional[SessionServiceSessionFieldName] = Field(default=None, alias="sortingColumn") + __properties: ClassVar[List[str]] = ["query", "queries", "sortingColumn"] model_config = ConfigDict( populate_by_name=True, @@ -96,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "query": SessionServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, "queries": [SessionServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else SessionServiceSessionFieldName.SESSION_FIELD_NAME_UNSPECIFIED + "sortingColumn": obj.get("sortingColumn") }) return _obj diff --git a/zitadel_client/models/session_service_list_sessions_response.py b/zitadel_client/models/session_service_list_sessions_response.py index 707f3ec3..bdc0bac6 100644 --- a/zitadel_client/models/session_service_list_sessions_response.py +++ b/zitadel_client/models/session_service_list_sessions_response.py @@ -30,6 +30,7 @@ class SessionServiceListSessionsResponse(BaseModel): """ # noqa: E501 details: Optional[SessionServiceListDetails] = None sessions: Optional[List[SessionServiceSession]] = None + __properties: ClassVar[List[str]] = ["details", "sessions"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_request_challenges_otp_email.py b/zitadel_client/models/session_service_otp_email.py similarity index 73% rename from zitadel_client/models/session_service_request_challenges_otp_email.py rename to zitadel_client/models/session_service_otp_email.py index d7bf15a5..75d20ec4 100644 --- a/zitadel_client/models/session_service_request_challenges_otp_email.py +++ b/zitadel_client/models/session_service_otp_email.py @@ -18,17 +18,18 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_otp_email_send_code import SessionServiceOTPEmailSendCode +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_send_code import SessionServiceSendCode from typing import Optional, Set from typing_extensions import Self -class SessionServiceRequestChallengesOTPEmail(BaseModel): +class SessionServiceOTPEmail(BaseModel): """ - SessionServiceRequestChallengesOTPEmail + SessionServiceOTPEmail """ # noqa: E501 - send_code: Optional[SessionServiceOTPEmailSendCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[SessionServiceSendCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPEmail from a JSON string""" + """Create an instance of SessionServiceOTPEmail from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,11 +70,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesOTPEmail from a dict""" + """Create an instance of SessionServiceOTPEmail from a dict""" if obj is None: return None @@ -81,8 +85,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": SessionServiceOTPEmailSendCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") + "returnCode": obj.get("returnCode"), + "sendCode": SessionServiceSendCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/session_service_otp_factor.py b/zitadel_client/models/session_service_otp_factor.py index e75c3396..9d3da5b7 100644 --- a/zitadel_client/models/session_service_otp_factor.py +++ b/zitadel_client/models/session_service_otp_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,8 @@ class SessionServiceOTPFactor(BaseModel): """ SessionServiceOTPFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the One-Time Password was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_otpsms.py b/zitadel_client/models/session_service_otpsms.py new file mode 100644 index 00000000..af2032f2 --- /dev/null +++ b/zitadel_client/models/session_service_otpsms.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceOTPSMS(BaseModel): + """ + SessionServiceOTPSMS + """ # noqa: E501 + return_code: Optional[StrictBool] = Field(default=None, alias="returnCode") + __properties: ClassVar[List[str]] = ["returnCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceOTPSMS from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceOTPSMS from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "returnCode": obj.get("returnCode") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_password_factor.py b/zitadel_client/models/session_service_password_factor.py index d9cce51b..4d976344 100644 --- a/zitadel_client/models/session_service_password_factor.py +++ b/zitadel_client/models/session_service_password_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,8 @@ class SessionServicePasswordFactor(BaseModel): """ SessionServicePasswordFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the password was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_request_challenges.py b/zitadel_client/models/session_service_request_challenges.py index fecee268..73abdb00 100644 --- a/zitadel_client/models/session_service_request_challenges.py +++ b/zitadel_client/models/session_service_request_challenges.py @@ -18,10 +18,10 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_request_challenges_otp_email import SessionServiceRequestChallengesOTPEmail -from zitadel_client.models.session_service_request_challenges_otpsms import SessionServiceRequestChallengesOTPSMS -from zitadel_client.models.session_service_request_challenges_web_auth_n import SessionServiceRequestChallengesWebAuthN +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_otp_email import SessionServiceOTPEmail +from zitadel_client.models.session_service_otpsms import SessionServiceOTPSMS +from zitadel_client.models.session_service_web_auth_n import SessionServiceWebAuthN from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,10 @@ class SessionServiceRequestChallenges(BaseModel): """ SessionServiceRequestChallenges """ # noqa: E501 - web_auth_n: Optional[SessionServiceRequestChallengesWebAuthN] = Field(default=None, alias="webAuthN") - otp_sms: Optional[SessionServiceRequestChallengesOTPSMS] = Field(default=None, alias="otpSms") - otp_email: Optional[SessionServiceRequestChallengesOTPEmail] = Field(default=None, alias="otpEmail") + web_auth_n: Optional[SessionServiceWebAuthN] = Field(default=None, alias="webAuthN") + otp_sms: Optional[SessionServiceOTPSMS] = Field(default=None, alias="otpSms") + otp_email: Optional[SessionServiceOTPEmail] = Field(default=None, alias="otpEmail") + __properties: ClassVar[List[str]] = ["webAuthN", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, @@ -93,9 +94,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "webAuthN": SessionServiceRequestChallengesWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, - "otpSms": SessionServiceRequestChallengesOTPSMS.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, - "otpEmail": SessionServiceRequestChallengesOTPEmail.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None + "webAuthN": SessionServiceWebAuthN.from_dict(obj["webAuthN"]) if obj.get("webAuthN") is not None else None, + "otpSms": SessionServiceOTPSMS.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, + "otpEmail": SessionServiceOTPEmail.from_dict(obj["otpEmail"]) if obj.get("otpEmail") is not None else None }) return _obj diff --git a/zitadel_client/models/session_service_search_query.py b/zitadel_client/models/session_service_search_query.py index 17cbfc9a..73c6c7d2 100644 --- a/zitadel_client/models/session_service_search_query.py +++ b/zitadel_client/models/session_service_search_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_creation_date_query import SessionServiceCreationDateQuery from zitadel_client.models.session_service_creator_query import SessionServiceCreatorQuery from zitadel_client.models.session_service_ids_query import SessionServiceIDsQuery @@ -31,11 +31,12 @@ class SessionServiceSearchQuery(BaseModel): """ SessionServiceSearchQuery """ # noqa: E501 - ids_query: Optional[SessionServiceIDsQuery] = Field(default=None, alias="idsQuery") - user_id_query: Optional[SessionServiceUserIDQuery] = Field(default=None, alias="userIdQuery") creation_date_query: Optional[SessionServiceCreationDateQuery] = Field(default=None, alias="creationDateQuery") creator_query: Optional[SessionServiceCreatorQuery] = Field(default=None, alias="creatorQuery") + ids_query: Optional[SessionServiceIDsQuery] = Field(default=None, alias="idsQuery") user_agent_query: Optional[SessionServiceUserAgentQuery] = Field(default=None, alias="userAgentQuery") + user_id_query: Optional[SessionServiceUserIDQuery] = Field(default=None, alias="userIdQuery") + __properties: ClassVar[List[str]] = ["creationDateQuery", "creatorQuery", "idsQuery", "userAgentQuery", "userIdQuery"] model_config = ConfigDict( populate_by_name=True, @@ -76,6 +77,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of creation_date_query + if self.creation_date_query: + _dict['creationDateQuery'] = self.creation_date_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of creator_query + if self.creator_query: + _dict['creatorQuery'] = self.creator_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of ids_query + if self.ids_query: + _dict['idsQuery'] = self.ids_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_agent_query + if self.user_agent_query: + _dict['userAgentQuery'] = self.user_agent_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_id_query + if self.user_id_query: + _dict['userIdQuery'] = self.user_id_query.to_dict() return _dict @classmethod @@ -88,11 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "idsQuery": SessionServiceIDsQuery.from_dict(obj["idsQuery"]) if obj.get("idsQuery") is not None else None, - "userIdQuery": SessionServiceUserIDQuery.from_dict(obj["userIdQuery"]) if obj.get("userIdQuery") is not None else None, "creationDateQuery": SessionServiceCreationDateQuery.from_dict(obj["creationDateQuery"]) if obj.get("creationDateQuery") is not None else None, "creatorQuery": SessionServiceCreatorQuery.from_dict(obj["creatorQuery"]) if obj.get("creatorQuery") is not None else None, - "userAgentQuery": SessionServiceUserAgentQuery.from_dict(obj["userAgentQuery"]) if obj.get("userAgentQuery") is not None else None + "idsQuery": SessionServiceIDsQuery.from_dict(obj["idsQuery"]) if obj.get("idsQuery") is not None else None, + "userAgentQuery": SessionServiceUserAgentQuery.from_dict(obj["userAgentQuery"]) if obj.get("userAgentQuery") is not None else None, + "userIdQuery": SessionServiceUserIDQuery.from_dict(obj["userIdQuery"]) if obj.get("userIdQuery") is not None else None }) return _obj diff --git a/zitadel_client/models/session_service_send_code.py b/zitadel_client/models/session_service_send_code.py new file mode 100644 index 00000000..b3ea5699 --- /dev/null +++ b/zitadel_client/models/session_service_send_code.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SessionServiceSendCode(BaseModel): + """ + SessionServiceSendCode + """ # noqa: E501 + url_template: Optional[StrictStr] = Field(default=None, description="Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: Code, UserID, LoginName, DisplayName, PreferredLanguage, SessionID", alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionServiceSendCode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionServiceSendCode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_session.py b/zitadel_client/models/session_service_session.py index 675d77ec..d4b4643a 100644 --- a/zitadel_client/models/session_service_session.py +++ b/zitadel_client/models/session_service_session.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.session_service_factors import SessionServiceFactors from zitadel_client.models.session_service_user_agent import SessionServiceUserAgent from typing import Optional, Set @@ -29,14 +29,15 @@ class SessionServiceSession(BaseModel): """ SessionServiceSession """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="\"id of the session\"") - creation_date: Optional[datetime] = Field(default=None, description="\"time when the session was created\"", alias="creationDate") - change_date: Optional[datetime] = Field(default=None, description="\"time when the session was last updated\"", alias="changeDate") - sequence: Optional[StrictStr] = Field(default=None, description="\"sequence of the session\"") + id: Optional[StrictStr] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + sequence: Optional[Any] = None factors: Optional[SessionServiceFactors] = None - metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list\"") + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None user_agent: Optional[SessionServiceUserAgent] = Field(default=None, alias="userAgent") - expiration_date: Optional[datetime] = Field(default=None, description="\"time the session will be automatically invalidated\"", alias="expirationDate") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "sequence", "factors", "metadata", "userAgent", "expirationDate"] model_config = ConfigDict( populate_by_name=True, @@ -83,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of user_agent if self.user_agent: _dict['userAgent'] = self.user_agent.to_dict() + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_set_session_request.py b/zitadel_client/models/session_service_set_session_request.py index f91634f8..ece4b7b5 100644 --- a/zitadel_client/models/session_service_set_session_request.py +++ b/zitadel_client/models/session_service_set_session_request.py @@ -18,8 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.session_service_checks import SessionServiceChecks from zitadel_client.models.session_service_request_challenges import SessionServiceRequestChallenges from typing import Optional, Set @@ -29,11 +28,13 @@ class SessionServiceSetSessionRequest(BaseModel): """ SessionServiceSetSessionRequest """ # noqa: E501 - session_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="\"DEPRECATED: this field is ignored.\"", alias="sessionToken") + session_id: Optional[StrictStr] = Field(default=None, alias="sessionId") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") checks: Optional[SessionServiceChecks] = None - metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list to be stored on the session\"") + metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = None challenges: Optional[SessionServiceRequestChallenges] = None - lifetime: Optional[StrictStr] = Field(default=None, description="\"duration (in seconds) after which the session will be automatically invalidated\"") + lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken", "checks", "metadata", "challenges", "lifetime"] model_config = ConfigDict( populate_by_name=True, @@ -92,6 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "sessionId": obj.get("sessionId"), "sessionToken": obj.get("sessionToken"), "checks": SessionServiceChecks.from_dict(obj["checks"]) if obj.get("checks") is not None else None, "metadata": obj.get("metadata"), diff --git a/zitadel_client/models/session_service_set_session_response.py b/zitadel_client/models/session_service_set_session_response.py index 32e2a013..39aec1f6 100644 --- a/zitadel_client/models/session_service_set_session_response.py +++ b/zitadel_client/models/session_service_set_session_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.session_service_challenges import SessionServiceChallenges from zitadel_client.models.session_service_details import SessionServiceDetails from typing import Optional, Set @@ -29,8 +29,9 @@ class SessionServiceSetSessionResponse(BaseModel): SessionServiceSetSessionResponse """ # noqa: E501 details: Optional[SessionServiceDetails] = None - session_token: Optional[StrictStr] = Field(default=None, description="\"The current token of the session, which is required for delete session, get session or the request of other resources.\"", alias="sessionToken") + session_token: Optional[StrictStr] = Field(default=None, alias="sessionToken") challenges: Optional[SessionServiceChallenges] = None + __properties: ClassVar[List[str]] = ["details", "sessionToken", "challenges"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_totp_factor.py b/zitadel_client/models/session_service_totp_factor.py index 31fb72db..451b43e4 100644 --- a/zitadel_client/models/session_service_totp_factor.py +++ b/zitadel_client/models/session_service_totp_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,8 @@ class SessionServiceTOTPFactor(BaseModel): """ SessionServiceTOTPFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the Time-based One-Time Password was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_user_agent.py b/zitadel_client/models/session_service_user_agent.py index d30cd1e9..b5b0c4df 100644 --- a/zitadel_client/models/session_service_user_agent.py +++ b/zitadel_client/models/session_service_user_agent.py @@ -18,8 +18,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.session_service_user_agent_header_values import SessionServiceUserAgentHeaderValues +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.session_service_header_values import SessionServiceHeaderValues from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,8 @@ class SessionServiceUserAgent(BaseModel): fingerprint_id: Optional[StrictStr] = Field(default=None, alias="fingerprintId") ip: Optional[StrictStr] = None description: Optional[StrictStr] = None - header: Optional[Dict[str, SessionServiceUserAgentHeaderValues]] = None + header: Optional[Dict[str, SessionServiceHeaderValues]] = None + __properties: ClassVar[List[str]] = ["fingerprintId", "ip", "description", "header"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +79,21 @@ def to_dict(self) -> Dict[str, Any]: if self.header[_key_header]: _field_dict[_key_header] = self.header[_key_header].to_dict() _dict['header'] = _field_dict + # set to None if fingerprint_id (nullable) is None + # and model_fields_set contains the field + if self.fingerprint_id is None and "fingerprint_id" in self.model_fields_set: + _dict['fingerprintId'] = None + + # set to None if ip (nullable) is None + # and model_fields_set contains the field + if self.ip is None and "ip" in self.model_fields_set: + _dict['ip'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + return _dict @classmethod @@ -94,7 +110,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ip": obj.get("ip"), "description": obj.get("description"), "header": dict( - (_k, SessionServiceUserAgentHeaderValues.from_dict(_v)) + (_k, SessionServiceHeaderValues.from_dict(_v)) for _k, _v in obj["header"].items() ) if obj.get("header") is not None diff --git a/zitadel_client/models/session_service_user_agent_query.py b/zitadel_client/models/session_service_user_agent_query.py index 7b3f8796..54d66f05 100644 --- a/zitadel_client/models/session_service_user_agent_query.py +++ b/zitadel_client/models/session_service_user_agent_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class SessionServiceUserAgentQuery(BaseModel): """ SessionServiceUserAgentQuery """ # noqa: E501 - fingerprint_id: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="Finger print id of the user agent used for the session. Set an empty fingerprint_id to use the user agent from the call. If the user agent is not available from the current token, an error will be returned.", alias="fingerprintId") + fingerprint_id: Optional[StrictStr] = Field(default=None, description="Finger print id of the user agent used for the session. Set an empty fingerprint_id to use the user agent from the call. If the user agent is not available from the current token, an error will be returned.", alias="fingerprintId") + __properties: ClassVar[List[str]] = ["fingerprintId"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if fingerprint_id (nullable) is None + # and model_fields_set contains the field + if self.fingerprint_id is None and "fingerprint_id" in self.model_fields_set: + _dict['fingerprintId'] = None + return _dict @classmethod diff --git a/zitadel_client/models/session_service_user_factor.py b/zitadel_client/models/session_service_user_factor.py index 02ec4303..be298279 100644 --- a/zitadel_client/models/session_service_user_factor.py +++ b/zitadel_client/models/session_service_user_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,12 @@ class SessionServiceUserFactor(BaseModel): """ SessionServiceUserFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the user was last checked\"", alias="verifiedAt") - id: Optional[StrictStr] = Field(default=None, description="\"id of the checked user\"") - login_name: Optional[StrictStr] = Field(default=None, description="\"login name of the checked user\"", alias="loginName") - display_name: Optional[StrictStr] = Field(default=None, description="\"display name of the checked user\"", alias="displayName") - organization_id: Optional[StrictStr] = Field(default=None, description="\"organization id of the checked user\"", alias="organizationId") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") + id: Optional[StrictStr] = None + login_name: Optional[StrictStr] = Field(default=None, alias="loginName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["verifiedAt", "id", "loginName", "displayName", "organizationId"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_user_id_query.py b/zitadel_client/models/session_service_user_id_query.py index cafed3f4..9208ac83 100644 --- a/zitadel_client/models/session_service_user_id_query.py +++ b/zitadel_client/models/session_service_user_id_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,7 @@ class SessionServiceUserIDQuery(BaseModel): SessionServiceUserIDQuery """ # noqa: E501 id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/session_service_request_challenges_web_auth_n.py b/zitadel_client/models/session_service_web_auth_n.py similarity index 80% rename from zitadel_client/models/session_service_request_challenges_web_auth_n.py rename to zitadel_client/models/session_service_web_auth_n.py index 22909f0e..33579c09 100644 --- a/zitadel_client/models/session_service_request_challenges_web_auth_n.py +++ b/zitadel_client/models/session_service_web_auth_n.py @@ -18,17 +18,18 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from zitadel_client.models.session_service_user_verification_requirement import SessionServiceUserVerificationRequirement from typing import Optional, Set from typing_extensions import Self -class SessionServiceRequestChallengesWebAuthN(BaseModel): +class SessionServiceWebAuthN(BaseModel): """ - SessionServiceRequestChallengesWebAuthN + SessionServiceWebAuthN """ # noqa: E501 - domain: StrictStr = Field(description="\"Domain on which the session was created. Will be used in the WebAuthN challenge.\"") + domain: StrictStr user_verification_requirement: SessionServiceUserVerificationRequirement = Field(alias="userVerificationRequirement") + __properties: ClassVar[List[str]] = ["domain", "userVerificationRequirement"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesWebAuthN from a JSON string""" + """Create an instance of SessionServiceWebAuthN from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceRequestChallengesWebAuthN from a dict""" + """Create an instance of SessionServiceWebAuthN from a dict""" if obj is None: return None @@ -82,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "domain": obj.get("domain"), - "userVerificationRequirement": obj.get("userVerificationRequirement") if obj.get("userVerificationRequirement") is not None else SessionServiceUserVerificationRequirement.USER_VERIFICATION_REQUIREMENT_UNSPECIFIED + "userVerificationRequirement": obj.get("userVerificationRequirement") }) return _obj diff --git a/zitadel_client/models/session_service_web_auth_n_factor.py b/zitadel_client/models/session_service_web_auth_n_factor.py index fddf779c..22337008 100644 --- a/zitadel_client/models/session_service_web_auth_n_factor.py +++ b/zitadel_client/models/session_service_web_auth_n_factor.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,9 @@ class SessionServiceWebAuthNFactor(BaseModel): """ SessionServiceWebAuthNFactor """ # noqa: E501 - verified_at: Optional[datetime] = Field(default=None, description="\"time when the passkey challenge was last checked\"", alias="verifiedAt") + verified_at: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="verifiedAt") user_verified: Optional[StrictBool] = Field(default=None, alias="userVerified") + __properties: ClassVar[List[str]] = ["verifiedAt", "userVerified"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_any.py b/zitadel_client/models/settings_service_any.py new file mode 100644 index 00000000..a20c6af1 --- /dev/null +++ b/zitadel_client/models/settings_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/settings_service_auto_linking_option.py b/zitadel_client/models/settings_service_auto_linking_option.py index bb1e5d46..16e287b7 100644 --- a/zitadel_client/models/settings_service_auto_linking_option.py +++ b/zitadel_client/models/settings_service_auto_linking_option.py @@ -20,7 +20,7 @@ class SettingsServiceAutoLinkingOption(str, Enum): """ - - AUTO_LINKING_OPTION_UNSPECIFIED: AUTO_LINKING_OPTION_UNSPECIFIED disables the auto linking prompt. - AUTO_LINKING_OPTION_USERNAME: AUTO_LINKING_OPTION_USERNAME will use the username of the external user to check for a corresponding ZITADEL user. - AUTO_LINKING_OPTION_EMAIL: AUTO_LINKING_OPTION_EMAIL will use the email of the external user to check for a corresponding ZITADEL user with the same verified email Note that in case multiple users match, no prompt will be shown. + SettingsServiceAutoLinkingOption """ """ diff --git a/zitadel_client/models/settings_service_branding_settings.py b/zitadel_client/models/settings_service_branding_settings.py index 37e0f8d2..d951db7a 100644 --- a/zitadel_client/models/settings_service_branding_settings.py +++ b/zitadel_client/models/settings_service_branding_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from zitadel_client.models.settings_service_theme import SettingsServiceTheme from zitadel_client.models.settings_service_theme_mode import SettingsServiceThemeMode @@ -31,11 +31,12 @@ class SettingsServiceBrandingSettings(BaseModel): """ # noqa: E501 light_theme: Optional[SettingsServiceTheme] = Field(default=None, alias="lightTheme") dark_theme: Optional[SettingsServiceTheme] = Field(default=None, alias="darkTheme") - font_url: Optional[StrictStr] = Field(default=None, description="url to the font used", alias="fontUrl") - hide_login_name_suffix: Optional[StrictBool] = Field(default=None, description="hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set", alias="hideLoginNameSuffix") - disable_watermark: Optional[StrictBool] = Field(default=None, description="boolean to disable the watermark", alias="disableWatermark") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") - theme_mode: Optional[SettingsServiceThemeMode] = Field(default=SettingsServiceThemeMode.THEME_MODE_UNSPECIFIED, alias="themeMode") + font_url: Optional[StrictStr] = Field(default=None, alias="fontUrl") + hide_login_name_suffix: Optional[StrictBool] = Field(default=None, description="hides the org suffix on the login form if the scope \\\"urn:zitadel:iam:org:domain:primary:{domainname}\\\" is set", alias="hideLoginNameSuffix") + disable_watermark: Optional[StrictBool] = Field(default=None, alias="disableWatermark") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + theme_mode: Optional[SettingsServiceThemeMode] = Field(default=None, alias="themeMode") + __properties: ClassVar[List[str]] = ["lightTheme", "darkTheme", "fontUrl", "hideLoginNameSuffix", "disableWatermark", "resourceOwnerType", "themeMode"] model_config = ConfigDict( populate_by_name=True, @@ -99,8 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "fontUrl": obj.get("fontUrl"), "hideLoginNameSuffix": obj.get("hideLoginNameSuffix"), "disableWatermark": obj.get("disableWatermark"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, - "themeMode": obj.get("themeMode") if obj.get("themeMode") is not None else SettingsServiceThemeMode.THEME_MODE_UNSPECIFIED + "resourceOwnerType": obj.get("resourceOwnerType"), + "themeMode": obj.get("themeMode") }) return _obj diff --git a/zitadel_client/models/settings_service_connect_error.py b/zitadel_client/models/settings_service_connect_error.py new file mode 100644 index 00000000..70693ddd --- /dev/null +++ b/zitadel_client/models/settings_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.settings_service_any import SettingsServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[SettingsServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": SettingsServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/settings_service_details.py b/zitadel_client/models/settings_service_details.py index 933616c5..9714e43d 100644 --- a/zitadel_client/models/settings_service_details.py +++ b/zitadel_client/models/settings_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class SettingsServiceDetails(BaseModel): """ SettingsServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/settings_service_domain_settings.py b/zitadel_client/models/settings_service_domain_settings.py index 23c62109..16af86c4 100644 --- a/zitadel_client/models/settings_service_domain_settings.py +++ b/zitadel_client/models/settings_service_domain_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class SettingsServiceDomainSettings(BaseModel): """ SettingsServiceDomainSettings """ # noqa: E501 - login_name_includes_domain: Optional[StrictBool] = Field(default=None, description="the username has to end with the domain of its organization", alias="loginNameIncludesDomain") - require_org_domain_verification: Optional[StrictBool] = Field(default=None, description="defines if organization domains should be verified upon creation, otherwise will be created already verified", alias="requireOrgDomainVerification") - smtp_sender_address_matches_instance_domain: Optional[StrictBool] = Field(default=None, description="defines if the SMTP sender address domain should match an existing domain on the instance", alias="smtpSenderAddressMatchesInstanceDomain") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") + login_name_includes_domain: Optional[StrictBool] = Field(default=None, alias="loginNameIncludesDomain") + require_org_domain_verification: Optional[StrictBool] = Field(default=None, alias="requireOrgDomainVerification") + smtp_sender_address_matches_instance_domain: Optional[StrictBool] = Field(default=None, alias="smtpSenderAddressMatchesInstanceDomain") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + __properties: ClassVar[List[str]] = ["loginNameIncludesDomain", "requireOrgDomainVerification", "smtpSenderAddressMatchesInstanceDomain", "resourceOwnerType"] model_config = ConfigDict( populate_by_name=True, @@ -86,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "loginNameIncludesDomain": obj.get("loginNameIncludesDomain"), "requireOrgDomainVerification": obj.get("requireOrgDomainVerification"), "smtpSenderAddressMatchesInstanceDomain": obj.get("smtpSenderAddressMatchesInstanceDomain"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED + "resourceOwnerType": obj.get("resourceOwnerType") }) return _obj diff --git a/zitadel_client/models/settings_service_embedded_iframe_settings.py b/zitadel_client/models/settings_service_embedded_iframe_settings.py index d3bf8581..a3558dca 100644 --- a/zitadel_client/models/settings_service_embedded_iframe_settings.py +++ b/zitadel_client/models/settings_service_embedded_iframe_settings.py @@ -26,8 +26,9 @@ class SettingsServiceEmbeddedIframeSettings(BaseModel): """ SettingsServiceEmbeddedIframeSettings """ # noqa: E501 - enabled: Optional[StrictBool] = Field(default=None, description="states if iframe embedding is enabled or disabled") - allowed_origins: Optional[List[StrictStr]] = Field(default=None, description="origins allowed loading ZITADEL in an iframe if enabled.", alias="allowedOrigins") + enabled: Optional[StrictBool] = None + allowed_origins: Optional[List[StrictStr]] = Field(default=None, alias="allowedOrigins") + __properties: ClassVar[List[str]] = ["enabled", "allowedOrigins"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_active_identity_providers_request.py b/zitadel_client/models/settings_service_get_active_identity_providers_request.py new file mode 100644 index 00000000..99a7b56c --- /dev/null +++ b/zitadel_client/models/settings_service_get_active_identity_providers_request.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetActiveIdentityProvidersRequest(BaseModel): + """ + SettingsServiceGetActiveIdentityProvidersRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + creation_allowed: Optional[StrictBool] = Field(default=None, alias="creationAllowed") + linking_allowed: Optional[StrictBool] = Field(default=None, alias="linkingAllowed") + auto_creation: Optional[StrictBool] = Field(default=None, alias="autoCreation") + auto_linking: Optional[StrictBool] = Field(default=None, alias="autoLinking") + __properties: ClassVar[List[str]] = ["ctx", "creationAllowed", "linkingAllowed", "autoCreation", "autoLinking"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetActiveIdentityProvidersRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + # set to None if creation_allowed (nullable) is None + # and model_fields_set contains the field + if self.creation_allowed is None and "creation_allowed" in self.model_fields_set: + _dict['creationAllowed'] = None + + # set to None if linking_allowed (nullable) is None + # and model_fields_set contains the field + if self.linking_allowed is None and "linking_allowed" in self.model_fields_set: + _dict['linkingAllowed'] = None + + # set to None if auto_creation (nullable) is None + # and model_fields_set contains the field + if self.auto_creation is None and "auto_creation" in self.model_fields_set: + _dict['autoCreation'] = None + + # set to None if auto_linking (nullable) is None + # and model_fields_set contains the field + if self.auto_linking is None and "auto_linking" in self.model_fields_set: + _dict['autoLinking'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetActiveIdentityProvidersRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None, + "creationAllowed": obj.get("creationAllowed"), + "linkingAllowed": obj.get("linkingAllowed"), + "autoCreation": obj.get("autoCreation"), + "autoLinking": obj.get("autoLinking") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_active_identity_providers_response.py b/zitadel_client/models/settings_service_get_active_identity_providers_response.py index 45f5266e..b01b23dc 100644 --- a/zitadel_client/models/settings_service_get_active_identity_providers_response.py +++ b/zitadel_client/models/settings_service_get_active_identity_providers_response.py @@ -30,6 +30,7 @@ class SettingsServiceGetActiveIdentityProvidersResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceListDetails] = None identity_providers: Optional[List[SettingsServiceIdentityProvider]] = Field(default=None, alias="identityProviders") + __properties: ClassVar[List[str]] = ["details", "identityProviders"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_branding_settings_request.py b/zitadel_client/models/settings_service_get_branding_settings_request.py new file mode 100644 index 00000000..fc4c7beb --- /dev/null +++ b/zitadel_client/models/settings_service_get_branding_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetBrandingSettingsRequest(BaseModel): + """ + SettingsServiceGetBrandingSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetBrandingSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetBrandingSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_branding_settings_response.py b/zitadel_client/models/settings_service_get_branding_settings_response.py index cdc2ca09..1d127540 100644 --- a/zitadel_client/models/settings_service_get_branding_settings_response.py +++ b/zitadel_client/models/settings_service_get_branding_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_branding_settings import SettingsServiceBrandingSettings from zitadel_client.models.settings_service_details import SettingsServiceDetails from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetBrandingSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceBrandingSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_domain_settings_request.py b/zitadel_client/models/settings_service_get_domain_settings_request.py new file mode 100644 index 00000000..01b2fd9a --- /dev/null +++ b/zitadel_client/models/settings_service_get_domain_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetDomainSettingsRequest(BaseModel): + """ + SettingsServiceGetDomainSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetDomainSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetDomainSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_domain_settings_response.py b/zitadel_client/models/settings_service_get_domain_settings_response.py index 2d23981d..c2b7da8a 100644 --- a/zitadel_client/models/settings_service_get_domain_settings_response.py +++ b/zitadel_client/models/settings_service_get_domain_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_domain_settings import SettingsServiceDomainSettings from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetDomainSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceDomainSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_general_settings_response.py b/zitadel_client/models/settings_service_get_general_settings_response.py index 78c889d4..869e6d58 100644 --- a/zitadel_client/models/settings_service_get_general_settings_response.py +++ b/zitadel_client/models/settings_service_get_general_settings_response.py @@ -26,9 +26,10 @@ class SettingsServiceGetGeneralSettingsResponse(BaseModel): """ SettingsServiceGetGeneralSettingsResponse """ # noqa: E501 - default_org_id: Optional[StrictStr] = Field(default=None, description="default organization for the current context", alias="defaultOrgId") - default_language: Optional[StrictStr] = Field(default=None, description="default language for the current context", alias="defaultLanguage") + default_org_id: Optional[StrictStr] = Field(default=None, alias="defaultOrgId") + default_language: Optional[StrictStr] = Field(default=None, alias="defaultLanguage") supported_languages: Optional[List[StrictStr]] = Field(default=None, alias="supportedLanguages") + __properties: ClassVar[List[str]] = ["defaultOrgId", "defaultLanguage", "supportedLanguages"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_hosted_login_translation_request.py b/zitadel_client/models/settings_service_get_hosted_login_translation_request.py new file mode 100644 index 00000000..2daff80a --- /dev/null +++ b/zitadel_client/models/settings_service_get_hosted_login_translation_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetHostedLoginTranslationRequest(BaseModel): + """ + SettingsServiceGetHostedLoginTranslationRequest + """ # noqa: E501 + locale: Optional[StrictStr] = None + ignore_inheritance: Optional[StrictBool] = Field(default=None, description="if set to true, higher levels are ignored, if false higher levels are merged into the file", alias="ignoreInheritance") + instance: Optional[StrictBool] = None + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + system: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["locale", "ignoreInheritance", "instance", "organizationId", "system"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetHostedLoginTranslationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetHostedLoginTranslationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "locale": obj.get("locale"), + "ignoreInheritance": obj.get("ignoreInheritance"), + "instance": obj.get("instance"), + "organizationId": obj.get("organizationId"), + "system": obj.get("system") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_hosted_login_translation_response.py b/zitadel_client/models/settings_service_get_hosted_login_translation_response.py new file mode 100644 index 00000000..0eb78963 --- /dev/null +++ b/zitadel_client/models/settings_service_get_hosted_login_translation_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetHostedLoginTranslationResponse(BaseModel): + """ + SettingsServiceGetHostedLoginTranslationResponse + """ # noqa: E501 + etag: Optional[StrictStr] = Field(default=None, description="hash of the payload") + translations: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.") + __properties: ClassVar[List[str]] = ["etag", "translations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetHostedLoginTranslationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetHostedLoginTranslationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "etag": obj.get("etag"), + "translations": obj.get("translations") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_legal_and_support_settings_request.py b/zitadel_client/models/settings_service_get_legal_and_support_settings_request.py new file mode 100644 index 00000000..27b73609 --- /dev/null +++ b/zitadel_client/models/settings_service_get_legal_and_support_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetLegalAndSupportSettingsRequest(BaseModel): + """ + SettingsServiceGetLegalAndSupportSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetLegalAndSupportSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetLegalAndSupportSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_legal_and_support_settings_response.py b/zitadel_client/models/settings_service_get_legal_and_support_settings_response.py index 2bc1bfa3..9fe55741 100644 --- a/zitadel_client/models/settings_service_get_legal_and_support_settings_response.py +++ b/zitadel_client/models/settings_service_get_legal_and_support_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_legal_and_support_settings import SettingsServiceLegalAndSupportSettings from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetLegalAndSupportSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceLegalAndSupportSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_lockout_settings_request.py b/zitadel_client/models/settings_service_get_lockout_settings_request.py new file mode 100644 index 00000000..718fedc2 --- /dev/null +++ b/zitadel_client/models/settings_service_get_lockout_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetLockoutSettingsRequest(BaseModel): + """ + SettingsServiceGetLockoutSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetLockoutSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetLockoutSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_lockout_settings_response.py b/zitadel_client/models/settings_service_get_lockout_settings_response.py index 0d9d2d58..109027cc 100644 --- a/zitadel_client/models/settings_service_get_lockout_settings_response.py +++ b/zitadel_client/models/settings_service_get_lockout_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_lockout_settings import SettingsServiceLockoutSettings from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetLockoutSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceLockoutSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_login_settings_request.py b/zitadel_client/models/settings_service_get_login_settings_request.py new file mode 100644 index 00000000..c99961e3 --- /dev/null +++ b/zitadel_client/models/settings_service_get_login_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetLoginSettingsRequest(BaseModel): + """ + SettingsServiceGetLoginSettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetLoginSettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetLoginSettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_login_settings_response.py b/zitadel_client/models/settings_service_get_login_settings_response.py index 2376e8c6..93807a70 100644 --- a/zitadel_client/models/settings_service_get_login_settings_response.py +++ b/zitadel_client/models/settings_service_get_login_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_login_settings import SettingsServiceLoginSettings from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetLoginSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceLoginSettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_password_complexity_settings_request.py b/zitadel_client/models/settings_service_get_password_complexity_settings_request.py new file mode 100644 index 00000000..2d93416c --- /dev/null +++ b/zitadel_client/models/settings_service_get_password_complexity_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetPasswordComplexitySettingsRequest(BaseModel): + """ + SettingsServiceGetPasswordComplexitySettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordComplexitySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordComplexitySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_password_complexity_settings_response.py b/zitadel_client/models/settings_service_get_password_complexity_settings_response.py index 52df2fac..24ffbe07 100644 --- a/zitadel_client/models/settings_service_get_password_complexity_settings_response.py +++ b/zitadel_client/models/settings_service_get_password_complexity_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_password_complexity_settings import SettingsServicePasswordComplexitySettings from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetPasswordComplexitySettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServicePasswordComplexitySettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_password_expiry_settings_request.py b/zitadel_client/models/settings_service_get_password_expiry_settings_request.py new file mode 100644 index 00000000..f6e6a910 --- /dev/null +++ b/zitadel_client/models/settings_service_get_password_expiry_settings_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.settings_service_request_context import SettingsServiceRequestContext +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceGetPasswordExpirySettingsRequest(BaseModel): + """ + SettingsServiceGetPasswordExpirySettingsRequest + """ # noqa: E501 + ctx: Optional[SettingsServiceRequestContext] = None + __properties: ClassVar[List[str]] = ["ctx"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordExpirySettingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ctx + if self.ctx: + _dict['ctx'] = self.ctx.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceGetPasswordExpirySettingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ctx": SettingsServiceRequestContext.from_dict(obj["ctx"]) if obj.get("ctx") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_get_password_expiry_settings_response.py b/zitadel_client/models/settings_service_get_password_expiry_settings_response.py index b495d235..a73c1f4d 100644 --- a/zitadel_client/models/settings_service_get_password_expiry_settings_response.py +++ b/zitadel_client/models/settings_service_get_password_expiry_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_password_expiry_settings import SettingsServicePasswordExpirySettings from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetPasswordExpirySettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServicePasswordExpirySettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_get_security_settings_response.py b/zitadel_client/models/settings_service_get_security_settings_response.py index d7ceb3ef..ab52aac5 100644 --- a/zitadel_client/models/settings_service_get_security_settings_response.py +++ b/zitadel_client/models/settings_service_get_security_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from zitadel_client.models.settings_service_security_settings import SettingsServiceSecuritySettings from typing import Optional, Set @@ -30,6 +30,7 @@ class SettingsServiceGetSecuritySettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceSecuritySettings] = None + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_identity_provider.py b/zitadel_client/models/settings_service_identity_provider.py index 06609aee..b36025d0 100644 --- a/zitadel_client/models/settings_service_identity_provider.py +++ b/zitadel_client/models/settings_service_identity_provider.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_identity_provider_type import SettingsServiceIdentityProviderType from zitadel_client.models.settings_service_options import SettingsServiceOptions from typing import Optional, Set @@ -30,8 +30,9 @@ class SettingsServiceIdentityProvider(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None - type: Optional[SettingsServiceIdentityProviderType] = SettingsServiceIdentityProviderType.IDENTITY_PROVIDER_TYPE_UNSPECIFIED + type: Optional[SettingsServiceIdentityProviderType] = None options: Optional[SettingsServiceOptions] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "options"] model_config = ConfigDict( populate_by_name=True, @@ -89,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), - "type": obj.get("type") if obj.get("type") is not None else SettingsServiceIdentityProviderType.IDENTITY_PROVIDER_TYPE_UNSPECIFIED, + "type": obj.get("type"), "options": SettingsServiceOptions.from_dict(obj["options"]) if obj.get("options") is not None else None }) return _obj diff --git a/zitadel_client/models/settings_service_legal_and_support_settings.py b/zitadel_client/models/settings_service_legal_and_support_settings.py index 566b1493..4aa94b45 100644 --- a/zitadel_client/models/settings_service_legal_and_support_settings.py +++ b/zitadel_client/models/settings_service_legal_and_support_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,12 @@ class SettingsServiceLegalAndSupportSettings(BaseModel): tos_link: Optional[StrictStr] = Field(default=None, alias="tosLink") privacy_policy_link: Optional[StrictStr] = Field(default=None, alias="privacyPolicyLink") help_link: Optional[StrictStr] = Field(default=None, alias="helpLink") - support_email: Optional[StrictStr] = Field(default=None, description="help / support email address.", alias="supportEmail") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") - docs_link: Optional[StrictStr] = Field(default=None, description="Link to documentation to be shown in the console.", alias="docsLink") - custom_link: Optional[StrictStr] = Field(default=None, description="Link to an external resource that will be available to users in the console.", alias="customLink") - custom_link_text: Optional[StrictStr] = Field(default=None, description="The button text that would be shown in console pointing to custom link.", alias="customLinkText") + support_email: Optional[StrictStr] = Field(default=None, alias="supportEmail") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + docs_link: Optional[StrictStr] = Field(default=None, alias="docsLink") + custom_link: Optional[StrictStr] = Field(default=None, alias="customLink") + custom_link_text: Optional[StrictStr] = Field(default=None, alias="customLinkText") + __properties: ClassVar[List[str]] = ["tosLink", "privacyPolicyLink", "helpLink", "supportEmail", "resourceOwnerType", "docsLink", "customLink", "customLinkText"] model_config = ConfigDict( populate_by_name=True, @@ -91,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "privacyPolicyLink": obj.get("privacyPolicyLink"), "helpLink": obj.get("helpLink"), "supportEmail": obj.get("supportEmail"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, + "resourceOwnerType": obj.get("resourceOwnerType"), "docsLink": obj.get("docsLink"), "customLink": obj.get("customLink"), "customLinkText": obj.get("customLinkText") diff --git a/zitadel_client/models/settings_service_list_details.py b/zitadel_client/models/settings_service_list_details.py index 467697fb..653c4552 100644 --- a/zitadel_client/models/settings_service_list_details.py +++ b/zitadel_client/models/settings_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class SettingsServiceListDetails(BaseModel): """ SettingsServiceListDetails """ # noqa: E501 - total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") - processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") - timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/settings_service_lockout_settings.py b/zitadel_client/models/settings_service_lockout_settings.py index 85be74f6..2a392634 100644 --- a/zitadel_client/models/settings_service_lockout_settings.py +++ b/zitadel_client/models/settings_service_lockout_settings.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class SettingsServiceLockoutSettings(BaseModel): """ SettingsServiceLockoutSettings """ # noqa: E501 - max_password_attempts: Optional[StrictStr] = Field(default=None, description="Maximum password check attempts before the account gets locked. Attempts are reset as soon as the password is entered correctly or the password is reset. If set to 0 the account will never be locked.", alias="maxPasswordAttempts") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") - max_otp_attempts: Optional[StrictStr] = Field(default=None, description="Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked.", alias="maxOtpAttempts") + max_password_attempts: Optional[Any] = Field(default=None, alias="maxPasswordAttempts") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + max_otp_attempts: Optional[Any] = Field(default=None, alias="maxOtpAttempts") + __properties: ClassVar[List[str]] = ["maxPasswordAttempts", "resourceOwnerType", "maxOtpAttempts"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if max_password_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_password_attempts is None and "max_password_attempts" in self.model_fields_set: + _dict['maxPasswordAttempts'] = None + + # set to None if max_otp_attempts (nullable) is None + # and model_fields_set contains the field + if self.max_otp_attempts is None and "max_otp_attempts" in self.model_fields_set: + _dict['maxOtpAttempts'] = None + return _dict @classmethod @@ -83,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "maxPasswordAttempts": obj.get("maxPasswordAttempts"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, + "resourceOwnerType": obj.get("resourceOwnerType"), "maxOtpAttempts": obj.get("maxOtpAttempts") }) return _obj diff --git a/zitadel_client/models/settings_service_login_settings.py b/zitadel_client/models/settings_service_login_settings.py index 66208aa0..4f3ae4b8 100644 --- a/zitadel_client/models/settings_service_login_settings.py +++ b/zitadel_client/models/settings_service_login_settings.py @@ -30,26 +30,27 @@ class SettingsServiceLoginSettings(BaseModel): """ SettingsServiceLoginSettings """ # noqa: E501 - allow_username_password: Optional[StrictBool] = Field(default=None, description="defines if a user is allowed to log in with username and password", alias="allowUsernamePassword") - allow_register: Optional[StrictBool] = Field(default=None, description="defines if a person is allowed to register a user on this organization", alias="allowRegister") - allow_external_idp: Optional[StrictBool] = Field(default=None, description="defines if a user is allowed to add a defined identity provider. E.g. Google auth", alias="allowExternalIdp") - force_mfa: Optional[StrictBool] = Field(default=None, description="defines if a user MUST use a multi-factor to log in", alias="forceMfa") - passkeys_type: Optional[SettingsServicePasskeysType] = Field(default=SettingsServicePasskeysType.PASSKEYS_TYPE_NOT_ALLOWED, alias="passkeysType") - hide_password_reset: Optional[StrictBool] = Field(default=None, description="defines if password reset link should be shown in the login screen", alias="hidePasswordReset") - ignore_unknown_usernames: Optional[StrictBool] = Field(default=None, description="defines if unknown username on login screen directly returns an error or always displays the password screen", alias="ignoreUnknownUsernames") - default_redirect_uri: Optional[StrictStr] = Field(default=None, description="defines where the user will be redirected to if the login is started without app context (e.g. from mail)", alias="defaultRedirectUri") - password_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how much time the user has to re-authenticate with the password.", alias="passwordCheckLifetime") - external_login_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how much time the user has to re-authenticate with an external provider.", alias="externalLoginCheckLifetime") - mfa_init_skip_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how much time the mfa prompt will be shown again.", alias="mfaInitSkipLifetime") - second_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines after how long the second factor check is valid.", alias="secondFactorCheckLifetime") - multi_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="Defines how long the multi-factor check is valid.", alias="multiFactorCheckLifetime") + allow_username_password: Optional[StrictBool] = Field(default=None, alias="allowUsernamePassword") + allow_register: Optional[StrictBool] = Field(default=None, alias="allowRegister") + allow_external_idp: Optional[StrictBool] = Field(default=None, alias="allowExternalIdp") + force_mfa: Optional[StrictBool] = Field(default=None, alias="forceMfa") + passkeys_type: Optional[SettingsServicePasskeysType] = Field(default=None, alias="passkeysType") + hide_password_reset: Optional[StrictBool] = Field(default=None, alias="hidePasswordReset") + ignore_unknown_usernames: Optional[StrictBool] = Field(default=None, alias="ignoreUnknownUsernames") + default_redirect_uri: Optional[StrictStr] = Field(default=None, alias="defaultRedirectUri") + password_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="passwordCheckLifetime") + external_login_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="externalLoginCheckLifetime") + mfa_init_skip_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="mfaInitSkipLifetime") + second_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="secondFactorCheckLifetime") + multi_factor_check_lifetime: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="multiFactorCheckLifetime") second_factors: Optional[List[SettingsServiceSecondFactorType]] = Field(default=None, alias="secondFactors") multi_factors: Optional[List[SettingsServiceMultiFactorType]] = Field(default=None, alias="multiFactors") allow_domain_discovery: Optional[StrictBool] = Field(default=None, description="If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success.", alias="allowDomainDiscovery") - disable_login_with_email: Optional[StrictBool] = Field(default=None, description="defines if the user can additionally (to the login name) be identified by their verified email address", alias="disableLoginWithEmail") - disable_login_with_phone: Optional[StrictBool] = Field(default=None, description="defines if the user can additionally (to the login name) be identified by their verified phone number", alias="disableLoginWithPhone") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") - force_mfa_local_only: Optional[StrictBool] = Field(default=None, description="if activated, only local authenticated users are forced to use MFA. Authentication through IDPs won't prompt a MFA step in the login.", alias="forceMfaLocalOnly") + disable_login_with_email: Optional[StrictBool] = Field(default=None, alias="disableLoginWithEmail") + disable_login_with_phone: Optional[StrictBool] = Field(default=None, alias="disableLoginWithPhone") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + force_mfa_local_only: Optional[StrictBool] = Field(default=None, alias="forceMfaLocalOnly") + __properties: ClassVar[List[str]] = ["allowUsernamePassword", "allowRegister", "allowExternalIdp", "forceMfa", "passkeysType", "hidePasswordReset", "ignoreUnknownUsernames", "defaultRedirectUri", "passwordCheckLifetime", "externalLoginCheckLifetime", "mfaInitSkipLifetime", "secondFactorCheckLifetime", "multiFactorCheckLifetime", "secondFactors", "multiFactors", "allowDomainDiscovery", "disableLoginWithEmail", "disableLoginWithPhone", "resourceOwnerType", "forceMfaLocalOnly"] model_config = ConfigDict( populate_by_name=True, @@ -106,7 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "allowRegister": obj.get("allowRegister"), "allowExternalIdp": obj.get("allowExternalIdp"), "forceMfa": obj.get("forceMfa"), - "passkeysType": obj.get("passkeysType") if obj.get("passkeysType") is not None else SettingsServicePasskeysType.PASSKEYS_TYPE_NOT_ALLOWED, + "passkeysType": obj.get("passkeysType"), "hidePasswordReset": obj.get("hidePasswordReset"), "ignoreUnknownUsernames": obj.get("ignoreUnknownUsernames"), "defaultRedirectUri": obj.get("defaultRedirectUri"), @@ -120,7 +121,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "allowDomainDiscovery": obj.get("allowDomainDiscovery"), "disableLoginWithEmail": obj.get("disableLoginWithEmail"), "disableLoginWithPhone": obj.get("disableLoginWithPhone"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, + "resourceOwnerType": obj.get("resourceOwnerType"), "forceMfaLocalOnly": obj.get("forceMfaLocalOnly") }) return _obj diff --git a/zitadel_client/models/settings_service_options.py b/zitadel_client/models/settings_service_options.py index 7ac77c08..c56c9fac 100644 --- a/zitadel_client/models/settings_service_options.py +++ b/zitadel_client/models/settings_service_options.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_auto_linking_option import SettingsServiceAutoLinkingOption from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,12 @@ class SettingsServiceOptions(BaseModel): """ SettingsServiceOptions """ # noqa: E501 - is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") - is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") - is_auto_creation: Optional[StrictBool] = Field(default=None, description="Enable if a new account in ZITADEL should be created automatically when login with an external account.", alias="isAutoCreation") - is_auto_update: Optional[StrictBool] = Field(default=None, description="Enable if a the ZITADEL account fields should be updated automatically on each login.", alias="isAutoUpdate") - auto_linking: Optional[SettingsServiceAutoLinkingOption] = Field(default=SettingsServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED, alias="autoLinking") + is_linking_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to link an existing ZITADEL user with an external account.", alias="isLinkingAllowed") + is_creation_allowed: Optional[StrictBool] = Field(default=None, description="Enable if users should be able to create a new account in ZITADEL when using an external account.", alias="isCreationAllowed") + is_auto_creation: Optional[StrictBool] = Field(default=None, description="Enable if a new account in ZITADEL should be created automatically when login with an external account.", alias="isAutoCreation") + is_auto_update: Optional[StrictBool] = Field(default=None, description="Enable if a the ZITADEL account fields should be updated automatically on each login.", alias="isAutoUpdate") + auto_linking: Optional[SettingsServiceAutoLinkingOption] = Field(default=None, alias="autoLinking") + __properties: ClassVar[List[str]] = ["isLinkingAllowed", "isCreationAllowed", "isAutoCreation", "isAutoUpdate", "autoLinking"] model_config = ConfigDict( populate_by_name=True, @@ -88,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isCreationAllowed": obj.get("isCreationAllowed"), "isAutoCreation": obj.get("isAutoCreation"), "isAutoUpdate": obj.get("isAutoUpdate"), - "autoLinking": obj.get("autoLinking") if obj.get("autoLinking") is not None else SettingsServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED + "autoLinking": obj.get("autoLinking") }) return _obj diff --git a/zitadel_client/models/settings_service_password_complexity_settings.py b/zitadel_client/models/settings_service_password_complexity_settings.py index de6ecb90..dcd9f3ac 100644 --- a/zitadel_client/models/settings_service_password_complexity_settings.py +++ b/zitadel_client/models/settings_service_password_complexity_settings.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,12 +27,13 @@ class SettingsServicePasswordComplexitySettings(BaseModel): """ SettingsServicePasswordComplexitySettings """ # noqa: E501 - min_length: Optional[StrictStr] = Field(default=None, description="Defines the minimum length of a password.", alias="minLength") - requires_uppercase: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain an upper case letter", alias="requiresUppercase") - requires_lowercase: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain a lowercase letter", alias="requiresLowercase") - requires_number: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain a number", alias="requiresNumber") - requires_symbol: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain a symbol. E.g. \"$\"", alias="requiresSymbol") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") + min_length: Optional[Any] = Field(default=None, alias="minLength") + requires_uppercase: Optional[StrictBool] = Field(default=None, alias="requiresUppercase") + requires_lowercase: Optional[StrictBool] = Field(default=None, alias="requiresLowercase") + requires_number: Optional[StrictBool] = Field(default=None, alias="requiresNumber") + requires_symbol: Optional[StrictBool] = Field(default=None, alias="requiresSymbol") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + __properties: ClassVar[List[str]] = ["minLength", "requiresUppercase", "requiresLowercase", "requiresNumber", "requiresSymbol", "resourceOwnerType"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if min_length (nullable) is None + # and model_fields_set contains the field + if self.min_length is None and "min_length" in self.model_fields_set: + _dict['minLength'] = None + return _dict @classmethod @@ -90,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "requiresLowercase": obj.get("requiresLowercase"), "requiresNumber": obj.get("requiresNumber"), "requiresSymbol": obj.get("requiresSymbol"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED + "resourceOwnerType": obj.get("resourceOwnerType") }) return _obj diff --git a/zitadel_client/models/settings_service_password_expiry_settings.py b/zitadel_client/models/settings_service_password_expiry_settings.py index 1c20a8eb..756af12f 100644 --- a/zitadel_client/models/settings_service_password_expiry_settings.py +++ b/zitadel_client/models/settings_service_password_expiry_settings.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_resource_owner_type import SettingsServiceResourceOwnerType from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class SettingsServicePasswordExpirySettings(BaseModel): """ SettingsServicePasswordExpirySettings """ # noqa: E501 - max_age_days: Optional[StrictStr] = Field(default=None, description="Amount of days after which a password will expire. The user will be forced to change the password on the following authentication.", alias="maxAgeDays") - expire_warn_days: Optional[StrictStr] = Field(default=None, description="Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user.", alias="expireWarnDays") - resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") + max_age_days: Optional[Any] = Field(default=None, description="Amount of days after which a password will expire. The user will be forced to change the password on the following authentication.", alias="maxAgeDays") + expire_warn_days: Optional[Any] = Field(default=None, description="Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user.", alias="expireWarnDays") + resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=None, alias="resourceOwnerType") + __properties: ClassVar[List[str]] = ["maxAgeDays", "expireWarnDays", "resourceOwnerType"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if max_age_days (nullable) is None + # and model_fields_set contains the field + if self.max_age_days is None and "max_age_days" in self.model_fields_set: + _dict['maxAgeDays'] = None + + # set to None if expire_warn_days (nullable) is None + # and model_fields_set contains the field + if self.expire_warn_days is None and "expire_warn_days" in self.model_fields_set: + _dict['expireWarnDays'] = None + return _dict @classmethod @@ -84,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "maxAgeDays": obj.get("maxAgeDays"), "expireWarnDays": obj.get("expireWarnDays"), - "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED + "resourceOwnerType": obj.get("resourceOwnerType") }) return _obj diff --git a/zitadel_client/models/settings_service_request_context.py b/zitadel_client/models/settings_service_request_context.py new file mode 100644 index 00000000..a870d541 --- /dev/null +++ b/zitadel_client/models/settings_service_request_context.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceRequestContext(BaseModel): + """ + SettingsServiceRequestContext + """ # noqa: E501 + instance: Optional[StrictBool] = None + org_id: Optional[StrictStr] = Field(default=None, alias="orgId") + __properties: ClassVar[List[str]] = ["instance", "orgId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceRequestContext from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceRequestContext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instance": obj.get("instance"), + "orgId": obj.get("orgId") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_security_settings.py b/zitadel_client/models/settings_service_security_settings.py index c6130792..2d053b20 100644 --- a/zitadel_client/models/settings_service_security_settings.py +++ b/zitadel_client/models/settings_service_security_settings.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_embedded_iframe_settings import SettingsServiceEmbeddedIframeSettings from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class SettingsServiceSecuritySettings(BaseModel): SettingsServiceSecuritySettings """ # noqa: E501 embedded_iframe: Optional[SettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") - enable_impersonation: Optional[StrictBool] = Field(default=None, description="default language for the current context", alias="enableImpersonation") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") + __properties: ClassVar[List[str]] = ["embeddedIframe", "enableImpersonation"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_set_hosted_login_translation_request.py b/zitadel_client/models/settings_service_set_hosted_login_translation_request.py new file mode 100644 index 00000000..6a5dcaa5 --- /dev/null +++ b/zitadel_client/models/settings_service_set_hosted_login_translation_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceSetHostedLoginTranslationRequest(BaseModel): + """ + SettingsServiceSetHostedLoginTranslationRequest + """ # noqa: E501 + locale: Optional[StrictStr] = None + translations: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.") + instance: Optional[StrictBool] = None + organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") + __properties: ClassVar[List[str]] = ["locale", "translations", "instance", "organizationId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceSetHostedLoginTranslationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceSetHostedLoginTranslationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "locale": obj.get("locale"), + "translations": obj.get("translations"), + "instance": obj.get("instance"), + "organizationId": obj.get("organizationId") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_set_hosted_login_translation_response.py b/zitadel_client/models/settings_service_set_hosted_login_translation_response.py new file mode 100644 index 00000000..004e9145 --- /dev/null +++ b/zitadel_client/models/settings_service_set_hosted_login_translation_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SettingsServiceSetHostedLoginTranslationResponse(BaseModel): + """ + SettingsServiceSetHostedLoginTranslationResponse + """ # noqa: E501 + etag: Optional[StrictStr] = Field(default=None, description="hash of the saved translation. Valid only when ignore_inheritance = true") + __properties: ClassVar[List[str]] = ["etag"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SettingsServiceSetHostedLoginTranslationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SettingsServiceSetHostedLoginTranslationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "etag": obj.get("etag") + }) + return _obj + + diff --git a/zitadel_client/models/settings_service_set_security_settings_request.py b/zitadel_client/models/settings_service_set_security_settings_request.py index 130431ff..0b798fa5 100644 --- a/zitadel_client/models/settings_service_set_security_settings_request.py +++ b/zitadel_client/models/settings_service_set_security_settings_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_embedded_iframe_settings import SettingsServiceEmbeddedIframeSettings from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class SettingsServiceSetSecuritySettingsRequest(BaseModel): SettingsServiceSetSecuritySettingsRequest """ # noqa: E501 embedded_iframe: Optional[SettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") - enable_impersonation: Optional[StrictBool] = Field(default=None, description="allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well", alias="enableImpersonation") + enable_impersonation: Optional[StrictBool] = Field(default=None, alias="enableImpersonation") + __properties: ClassVar[List[str]] = ["embeddedIframe", "enableImpersonation"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_set_security_settings_response.py b/zitadel_client/models/settings_service_set_security_settings_response.py index 2d554420..a480edc7 100644 --- a/zitadel_client/models/settings_service_set_security_settings_response.py +++ b/zitadel_client/models/settings_service_set_security_settings_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.settings_service_details import SettingsServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class SettingsServiceSetSecuritySettingsResponse(BaseModel): SettingsServiceSetSecuritySettingsResponse """ # noqa: E501 details: Optional[SettingsServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/settings_service_theme.py b/zitadel_client/models/settings_service_theme.py index af0bb065..5b0aeb90 100644 --- a/zitadel_client/models/settings_service_theme.py +++ b/zitadel_client/models/settings_service_theme.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,10 +28,11 @@ class SettingsServiceTheme(BaseModel): """ # noqa: E501 primary_color: Optional[StrictStr] = Field(default=None, description="hex value for primary color", alias="primaryColor") background_color: Optional[StrictStr] = Field(default=None, description="hex value for background color", alias="backgroundColor") - warn_color: Optional[StrictStr] = Field(default=None, description="hex value for warn color", alias="warnColor") + warn_color: Optional[StrictStr] = Field(default=None, description="hex value for warning color", alias="warnColor") font_color: Optional[StrictStr] = Field(default=None, description="hex value for font color", alias="fontColor") - logo_url: Optional[StrictStr] = Field(default=None, description="url to the logo", alias="logoUrl") - icon_url: Optional[StrictStr] = Field(default=None, description="url to the icon", alias="iconUrl") + logo_url: Optional[StrictStr] = Field(default=None, description="url where the logo is served", alias="logoUrl") + icon_url: Optional[StrictStr] = Field(default=None, description="url where the icon is served", alias="iconUrl") + __properties: ClassVar[List[str]] = ["primaryColor", "backgroundColor", "warnColor", "fontColor", "logoUrl", "iconUrl"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_add_human_user_request.py b/zitadel_client/models/user_service_add_human_user_request.py index 6aa22857..a3a893de 100644 --- a/zitadel_client/models/user_service_add_human_user_request.py +++ b/zitadel_client/models/user_service_add_human_user_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword from zitadel_client.models.user_service_idp_link import UserServiceIDPLink from zitadel_client.models.user_service_organization import UserServiceOrganization @@ -35,17 +34,18 @@ class UserServiceAddHumanUserRequest(BaseModel): """ UserServiceAddHumanUserRequest """ # noqa: E501 - user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") - username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") + user_id: Optional[StrictStr] = Field(default=None, description="optionally set your own id unique for the user.", alias="userId") + username: Optional[StrictStr] = Field(default=None, description="optionally set a unique username, if none is provided the email will be used.") organization: Optional[UserServiceOrganization] = None profile: UserServiceSetHumanProfile email: UserServiceSetHumanEmail phone: Optional[UserServiceSetHumanPhone] = None metadata: Optional[List[UserServiceSetMetadataEntry]] = None - password: Optional[UserServicePassword] = None - hashed_password: Optional[UserServiceHashedPassword] = Field(default=None, alias="hashedPassword") idp_links: Optional[List[UserServiceIDPLink]] = Field(default=None, alias="idpLinks") - totp_secret: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + totp_secret: Optional[StrictStr] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + hashed_password: Optional[UserServiceHashedPassword] = Field(default=None, alias="hashedPassword") + password: Optional[UserServicePassword] = None + __properties: ClassVar[List[str]] = ["userId", "username", "organization", "profile", "email", "phone", "metadata", "idpLinks", "totpSecret", "hashedPassword", "password"] model_config = ConfigDict( populate_by_name=True, @@ -86,6 +86,53 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of organization + if self.organization: + _dict['organization'] = self.organization.to_dict() + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in idp_links (list) + _items = [] + if self.idp_links: + for _item_idp_links in self.idp_links: + if _item_idp_links: + _items.append(_item_idp_links.to_dict()) + _dict['idpLinks'] = _items + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if totp_secret (nullable) is None + # and model_fields_set contains the field + if self.totp_secret is None and "totp_secret" in self.model_fields_set: + _dict['totpSecret'] = None + return _dict @classmethod @@ -105,10 +152,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "email": UserServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, "phone": UserServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, "metadata": [UserServiceSetMetadataEntry.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, - "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, - "hashedPassword": UserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, "idpLinks": [UserServiceIDPLink.from_dict(_item) for _item in obj["idpLinks"]] if obj.get("idpLinks") is not None else None, - "totpSecret": obj.get("totpSecret") + "totpSecret": obj.get("totpSecret"), + "hashedPassword": UserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, + "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_add_human_user_response.py b/zitadel_client/models/user_service_add_human_user_response.py index 3b4ceaf2..142938fc 100644 --- a/zitadel_client/models/user_service_add_human_user_response.py +++ b/zitadel_client/models/user_service_add_human_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -31,6 +31,7 @@ class UserServiceAddHumanUserResponse(BaseModel): details: Optional[UserServiceDetails] = None email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + __properties: ClassVar[List[str]] = ["userId", "details", "emailCode", "phoneCode"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +75,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_add_idp_link_request.py b/zitadel_client/models/user_service_add_idp_link_request.py index 28af233b..351d11ff 100644 --- a/zitadel_client/models/user_service_add_idp_link_request.py +++ b/zitadel_client/models/user_service_add_idp_link_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_idp_link import UserServiceIDPLink from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,9 @@ class UserServiceAddIDPLinkRequest(BaseModel): """ UserServiceAddIDPLinkRequest """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") idp_link: Optional[UserServiceIDPLink] = Field(default=None, alias="idpLink") + __properties: ClassVar[List[str]] = ["userId", "idpLink"] model_config = ConfigDict( populate_by_name=True, @@ -83,6 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "idpLink": UserServiceIDPLink.from_dict(obj["idpLink"]) if obj.get("idpLink") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_add_idp_link_response.py b/zitadel_client/models/user_service_add_idp_link_response.py index a1c22621..57266e5f 100644 --- a/zitadel_client/models/user_service_add_idp_link_response.py +++ b/zitadel_client/models/user_service_add_idp_link_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceAddIDPLinkResponse(BaseModel): UserServiceAddIDPLinkResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_add_key_request.py b/zitadel_client/models/user_service_add_key_request.py new file mode 100644 index 00000000..8384ec3c --- /dev/null +++ b/zitadel_client/models/user_service_add_key_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddKeyRequest(BaseModel): + """ + UserServiceAddKeyRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The users resource ID.", alias="userId") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + public_key: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="Optionally provide a public key of your own generated RSA private key.", alias="publicKey") + __properties: ClassVar[List[str]] = ["userId", "expirationDate", "publicKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "expirationDate": obj.get("expirationDate"), + "publicKey": obj.get("publicKey") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_add_key_response.py b/zitadel_client/models/user_service_add_key_response.py new file mode 100644 index 00000000..16053ba6 --- /dev/null +++ b/zitadel_client/models/user_service_add_key_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddKeyResponse(BaseModel): + """ + UserServiceAddKeyResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + key_id: Optional[StrictStr] = Field(default=None, description="The keys ID.", alias="keyId") + key_content: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The key which is usable to authenticate against the API.", alias="keyContent") + __properties: ClassVar[List[str]] = ["creationDate", "keyId", "keyContent"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "keyId": obj.get("keyId"), + "keyContent": obj.get("keyContent") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_add_otp_email_request.py b/zitadel_client/models/user_service_add_otp_email_request.py new file mode 100644 index 00000000..fdf6d0f0 --- /dev/null +++ b/zitadel_client/models/user_service_add_otp_email_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddOTPEmailRequest(BaseModel): + """ + UserServiceAddOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_add_otp_email_response.py b/zitadel_client/models/user_service_add_otp_email_response.py index f813e928..7f4d0c34 100644 --- a/zitadel_client/models/user_service_add_otp_email_response.py +++ b/zitadel_client/models/user_service_add_otp_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceAddOTPEmailResponse(BaseModel): UserServiceAddOTPEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/feature_service_protobuf_any.py b/zitadel_client/models/user_service_add_otpsms_request.py similarity index 84% rename from zitadel_client/models/feature_service_protobuf_any.py rename to zitadel_client/models/user_service_add_otpsms_request.py index f154eec4..009d2a16 100644 --- a/zitadel_client/models/feature_service_protobuf_any.py +++ b/zitadel_client/models/user_service_add_otpsms_request.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class FeatureServiceProtobufAny(BaseModel): +class UserServiceAddOTPSMSRequest(BaseModel): """ - FeatureServiceProtobufAny + UserServiceAddOTPSMSRequest """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FeatureServiceProtobufAny from a JSON string""" + """Create an instance of UserServiceAddOTPSMSRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FeatureServiceProtobufAny from a dict""" + """Create an instance of UserServiceAddOTPSMSRequest from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/user_service_add_otpsms_response.py b/zitadel_client/models/user_service_add_otpsms_response.py index 94885a9f..263bd026 100644 --- a/zitadel_client/models/user_service_add_otpsms_response.py +++ b/zitadel_client/models/user_service_add_otpsms_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceAddOTPSMSResponse(BaseModel): UserServiceAddOTPSMSResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_add_personal_access_token_request.py b/zitadel_client/models/user_service_add_personal_access_token_request.py new file mode 100644 index 00000000..ba344453 --- /dev/null +++ b/zitadel_client/models/user_service_add_personal_access_token_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddPersonalAccessTokenRequest(BaseModel): + """ + UserServiceAddPersonalAccessTokenRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The users resource ID.", alias="userId") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["userId", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddPersonalAccessTokenRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddPersonalAccessTokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_add_personal_access_token_response.py b/zitadel_client/models/user_service_add_personal_access_token_response.py new file mode 100644 index 00000000..9731e86e --- /dev/null +++ b/zitadel_client/models/user_service_add_personal_access_token_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddPersonalAccessTokenResponse(BaseModel): + """ + UserServiceAddPersonalAccessTokenResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + token_id: Optional[StrictStr] = Field(default=None, description="The tokens ID.", alias="tokenId") + token: Optional[StrictStr] = Field(default=None, description="The personal access token that can be used to authenticate against the API") + __properties: ClassVar[List[str]] = ["creationDate", "tokenId", "token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddPersonalAccessTokenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddPersonalAccessTokenResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "tokenId": obj.get("tokenId"), + "token": obj.get("token") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_add_secret_request.py b/zitadel_client/models/user_service_add_secret_request.py new file mode 100644 index 00000000..f19028a0 --- /dev/null +++ b/zitadel_client/models/user_service_add_secret_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddSecretRequest(BaseModel): + """ + UserServiceAddSecretRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The users resource ID.", alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddSecretRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddSecretRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_add_secret_response.py b/zitadel_client/models/user_service_add_secret_response.py new file mode 100644 index 00000000..0d966d4c --- /dev/null +++ b/zitadel_client/models/user_service_add_secret_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAddSecretResponse(BaseModel): + """ + UserServiceAddSecretResponse + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + client_secret: Optional[StrictStr] = Field(default=None, description="The client secret. Store this secret in a secure place. It is not possible to retrieve it again.", alias="clientSecret") + __properties: ClassVar[List[str]] = ["creationDate", "clientSecret"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAddSecretResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAddSecretResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "clientSecret": obj.get("clientSecret") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_and_query.py b/zitadel_client/models/user_service_and_query.py index a9d4a58b..bc471a35 100644 --- a/zitadel_client/models/user_service_and_query.py +++ b/zitadel_client/models/user_service_and_query.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,8 @@ class UserServiceAndQuery(BaseModel): """ Connect multiple sub-condition with and AND operator. """ # noqa: E501 - queries: Optional[List[UserServiceSearchQuery]] = Field(default=None, description="the sub queries to 'AND'") + queries: Optional[List[UserServiceSearchQuery]] = None + __properties: ClassVar[List[str]] = ["queries"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_any.py b/zitadel_client/models/user_service_any.py new file mode 100644 index 00000000..8c500655 --- /dev/null +++ b/zitadel_client/models/user_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/user_service_auth_factor.py b/zitadel_client/models/user_service_auth_factor.py index 224880aa..9199ad0e 100644 --- a/zitadel_client/models/user_service_auth_factor.py +++ b/zitadel_client/models/user_service_auth_factor.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState from zitadel_client.models.user_service_auth_factor_u2_f import UserServiceAuthFactorU2F from typing import Optional, Set @@ -28,11 +28,12 @@ class UserServiceAuthFactor(BaseModel): """ UserServiceAuthFactor """ # noqa: E501 - state: Optional[UserServiceAuthFactorState] = UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED + state: Optional[UserServiceAuthFactorState] = None otp: Optional[Dict[str, Any]] = None - u2f: Optional[UserServiceAuthFactorU2F] = None - otp_sms: Optional[Dict[str, Any]] = Field(default=None, alias="otpSms") otp_email: Optional[Dict[str, Any]] = Field(default=None, alias="otpEmail") + otp_sms: Optional[Dict[str, Any]] = Field(default=None, alias="otpSms") + u2f: Optional[UserServiceAuthFactorU2F] = None + __properties: ClassVar[List[str]] = ["state", "otp", "otpEmail", "otpSms", "u2f"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +74,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of u2f + if self.u2f: + _dict['u2f'] = self.u2f.to_dict() return _dict @classmethod @@ -85,11 +89,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "state": obj.get("state") if obj.get("state") is not None else UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED, + "state": obj.get("state"), "otp": obj.get("otp"), - "u2f": UserServiceAuthFactorU2F.from_dict(obj["u2f"]) if obj.get("u2f") is not None else None, + "otpEmail": obj.get("otpEmail"), "otpSms": obj.get("otpSms"), - "otpEmail": obj.get("otpEmail") + "u2f": UserServiceAuthFactorU2F.from_dict(obj["u2f"]) if obj.get("u2f") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_auth_factor_u2_f.py b/zitadel_client/models/user_service_auth_factor_u2_f.py index ae99c449..d73a4aac 100644 --- a/zitadel_client/models/user_service_auth_factor_u2_f.py +++ b/zitadel_client/models/user_service_auth_factor_u2_f.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceAuthFactorU2F(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_auth_factors.py b/zitadel_client/models/user_service_auth_factors.py new file mode 100644 index 00000000..119abaa3 --- /dev/null +++ b/zitadel_client/models/user_service_auth_factors.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserServiceAuthFactors(str, Enum): + """ + UserServiceAuthFactors + """ + + """ + allowed enum values + """ + OTP = 'OTP' + OTP_SMS = 'OTP_SMS' + OTP_EMAIL = 'OTP_EMAIL' + U2F = 'U2F' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserServiceAuthFactors from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/user_service_connect_error.py b/zitadel_client/models/user_service_connect_error.py new file mode 100644 index 00000000..d1005adc --- /dev/null +++ b/zitadel_client/models/user_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_any import UserServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[UserServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": UserServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/user_service_create_invite_code_request.py b/zitadel_client/models/user_service_create_invite_code_request.py index 6281598b..46836e66 100644 --- a/zitadel_client/models/user_service_create_invite_code_request.py +++ b/zitadel_client/models/user_service_create_invite_code_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_send_invite_code import UserServiceSendInviteCode from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class UserServiceCreateInviteCodeRequest(BaseModel): """ UserServiceCreateInviteCodeRequest """ # noqa: E501 - send_code: Optional[UserServiceSendInviteCode] = Field(default=None, alias="sendCode") + user_id: StrictStr = Field(alias="userId") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[UserServiceSendInviteCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod @@ -81,8 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": UserServiceSendInviteCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendCode": UserServiceSendInviteCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_create_invite_code_response.py b/zitadel_client/models/user_service_create_invite_code_response.py index 31bbd97f..608dabfd 100644 --- a/zitadel_client/models/user_service_create_invite_code_response.py +++ b/zitadel_client/models/user_service_create_invite_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -29,6 +29,7 @@ class UserServiceCreateInviteCodeResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None invite_code: Optional[StrictStr] = Field(default=None, description="The invite code is returned if the verification was set to return_code.", alias="inviteCode") + __properties: ClassVar[List[str]] = ["details", "inviteCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if invite_code (nullable) is None + # and model_fields_set contains the field + if self.invite_code is None and "invite_code" in self.model_fields_set: + _dict['inviteCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_create_passkey_registration_link_request.py b/zitadel_client/models/user_service_create_passkey_registration_link_request.py index c25c3bed..1a3e8362 100644 --- a/zitadel_client/models/user_service_create_passkey_registration_link_request.py +++ b/zitadel_client/models/user_service_create_passkey_registration_link_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_send_passkey_registration_link import UserServiceSendPasskeyRegistrationLink from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class UserServiceCreatePasskeyRegistrationLinkRequest(BaseModel): """ UserServiceCreatePasskeyRegistrationLinkRequest """ # noqa: E501 - send_link: Optional[UserServiceSendPasskeyRegistrationLink] = Field(default=None, alias="sendLink") + user_id: StrictStr = Field(alias="userId") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_link: Optional[UserServiceSendPasskeyRegistrationLink] = Field(default=None, alias="sendLink") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendLink"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() return _dict @classmethod @@ -81,8 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendLink": UserServiceSendPasskeyRegistrationLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None, - "returnCode": obj.get("returnCode") + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendLink": UserServiceSendPasskeyRegistrationLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_create_passkey_registration_link_response.py b/zitadel_client/models/user_service_create_passkey_registration_link_response.py index 602e88cf..87631727 100644 --- a/zitadel_client/models/user_service_create_passkey_registration_link_response.py +++ b/zitadel_client/models/user_service_create_passkey_registration_link_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_passkey_registration_code import UserServicePasskeyRegistrationCode from typing import Optional, Set @@ -30,6 +30,7 @@ class UserServiceCreatePasskeyRegistrationLinkResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None code: Optional[UserServicePasskeyRegistrationCode] = None + __properties: ClassVar[List[str]] = ["details", "code"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_create_user_request.py b/zitadel_client/models/user_service_create_user_request.py new file mode 100644 index 00000000..7e006f39 --- /dev/null +++ b/zitadel_client/models/user_service_create_user_request.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_human import UserServiceHuman +from zitadel_client.models.user_service_machine import UserServiceMachine +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceCreateUserRequest(BaseModel): + """ + UserServiceCreateUserRequest + """ # noqa: E501 + organization_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the organization the user belongs to.", alias="organizationId") + user_id: Optional[StrictStr] = Field(default=None, description="The ID is a unique identifier for the user in the instance. If not specified, it will be generated. You can set your own user id that is unique within the instance. This is useful in migration scenarios, for example if the user already has an ID in another Zitadel system. If not specified, it will be generated. It can't be changed after creation.", alias="userId") + username: Optional[StrictStr] = Field(default=None, description="The username is a unique identifier for the user in the organization. If not specified, Zitadel sets the username to the email for users of type human and to the user_id for users of type machine. It is used to identify the user in the organization and can be used for login.") + human: Optional[UserServiceHuman] = None + machine: Optional[UserServiceMachine] = None + __properties: ClassVar[List[str]] = ["organizationId", "userId", "username", "human", "machine"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceCreateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + # override the default output from pydantic by calling `to_dict()` of machine + if self.machine: + _dict['machine'] = self.machine.to_dict() + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceCreateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationId": obj.get("organizationId"), + "userId": obj.get("userId"), + "username": obj.get("username"), + "human": UserServiceHuman.from_dict(obj["human"]) if obj.get("human") is not None else None, + "machine": UserServiceMachine.from_dict(obj["machine"]) if obj.get("machine") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_create_user_response.py b/zitadel_client/models/user_service_create_user_response.py new file mode 100644 index 00000000..2ad46194 --- /dev/null +++ b/zitadel_client/models/user_service_create_user_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceCreateUserResponse(BaseModel): + """ + UserServiceCreateUserResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created user.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + email_code: Optional[StrictStr] = Field(default=None, description="The email verification code if it was requested by setting the email verification to return_code.", alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, description="The phone verification code if it was requested by setting the phone verification to return_code.", alias="phoneCode") + __properties: ClassVar[List[str]] = ["id", "creationDate", "emailCode", "phoneCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceCreateUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceCreateUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_deactivate_user_request.py b/zitadel_client/models/user_service_deactivate_user_request.py new file mode 100644 index 00000000..6a1aca29 --- /dev/null +++ b/zitadel_client/models/user_service_deactivate_user_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceDeactivateUserRequest(BaseModel): + """ + UserServiceDeactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceDeactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceDeactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_deactivate_user_response.py b/zitadel_client/models/user_service_deactivate_user_response.py index ff9753f1..e405fdaa 100644 --- a/zitadel_client/models/user_service_deactivate_user_response.py +++ b/zitadel_client/models/user_service_deactivate_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceDeactivateUserResponse(BaseModel): UserServiceDeactivateUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_delete_user_metadata_request.py b/zitadel_client/models/user_service_delete_user_metadata_request.py new file mode 100644 index 00000000..304ca51a --- /dev/null +++ b/zitadel_client/models/user_service_delete_user_metadata_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceDeleteUserMetadataRequest(BaseModel): + """ + UserServiceDeleteUserMetadataRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="ID of the user which metadata is to be deleted is stored on.", alias="userId") + keys: Optional[List[StrictStr]] = Field(default=None, description="The keys for the user metadata to be deleted.") + __properties: ClassVar[List[str]] = ["userId", "keys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceDeleteUserMetadataRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceDeleteUserMetadataRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "keys": obj.get("keys") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_delete_user_metadata_response.py b/zitadel_client/models/user_service_delete_user_metadata_response.py new file mode 100644 index 00000000..1557793d --- /dev/null +++ b/zitadel_client/models/user_service_delete_user_metadata_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceDeleteUserMetadataResponse(BaseModel): + """ + UserServiceDeleteUserMetadataResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceDeleteUserMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceDeleteUserMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/oidc_service_protobuf_any.py b/zitadel_client/models/user_service_delete_user_request.py similarity index 84% rename from zitadel_client/models/oidc_service_protobuf_any.py rename to zitadel_client/models/user_service_delete_user_request.py index 4f92153a..82885fa8 100644 --- a/zitadel_client/models/oidc_service_protobuf_any.py +++ b/zitadel_client/models/user_service_delete_user_request.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class OIDCServiceProtobufAny(BaseModel): +class UserServiceDeleteUserRequest(BaseModel): """ - OIDCServiceProtobufAny + UserServiceDeleteUserRequest """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OIDCServiceProtobufAny from a JSON string""" + """Create an instance of UserServiceDeleteUserRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OIDCServiceProtobufAny from a dict""" + """Create an instance of UserServiceDeleteUserRequest from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/user_service_delete_user_response.py b/zitadel_client/models/user_service_delete_user_response.py index 0b47a2ab..3ffe0779 100644 --- a/zitadel_client/models/user_service_delete_user_response.py +++ b/zitadel_client/models/user_service_delete_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceDeleteUserResponse(BaseModel): UserServiceDeleteUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_details.py b/zitadel_client/models/user_service_details.py index d72de17f..d01ddefd 100644 --- a/zitadel_client/models/user_service_details.py +++ b/zitadel_client/models/user_service_details.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +27,11 @@ class UserServiceDetails(BaseModel): """ UserServiceDetails """ # noqa: E501 - sequence: Optional[StrictStr] = Field(default=None, description="on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") - change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") - resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") - creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + sequence: Optional[Any] = Field(default=None, description="sequence represents the order of events. It's always counting on read: the sequence of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + resource_owner: Optional[StrictStr] = Field(default=None, description="resource_owner is the organization or instance_id an object belongs to", alias="resourceOwner") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if sequence (nullable) is None + # and model_fields_set contains the field + if self.sequence is None and "sequence" in self.model_fields_set: + _dict['sequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_display_name_query.py b/zitadel_client/models/user_service_display_name_query.py index 7f86be71..6a5fb533 100644 --- a/zitadel_client/models/user_service_display_name_query.py +++ b/zitadel_client/models/user_service_display_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceDisplayNameQuery(BaseModel): """ Query for users with a specific display name. """ # noqa: E501 - display_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="displayName") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + display_name: StrictStr = Field(alias="displayName") + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["displayName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "displayName": obj.get("displayName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_domain_query.py b/zitadel_client/models/user_service_domain_query.py new file mode 100644 index 00000000..a1e20dab --- /dev/null +++ b/zitadel_client/models/user_service_domain_query.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceDomainQuery(BaseModel): + """ + UserServiceDomainQuery + """ # noqa: E501 + include_without_domain: Optional[StrictBool] = Field(default=None, description="List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI.", alias="includeWithoutDomain") + domain: Optional[StrictStr] = Field(default=None, description="List only auth methods with specific domain.") + __properties: ClassVar[List[str]] = ["includeWithoutDomain", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceDomainQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceDomainQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "includeWithoutDomain": obj.get("includeWithoutDomain"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_email_query.py b/zitadel_client/models/user_service_email_query.py index 19e8f410..2aa6d2f5 100644 --- a/zitadel_client/models/user_service_email_query.py +++ b/zitadel_client/models/user_service_email_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceEmailQuery(BaseModel): """ Query for users with a specific email. """ # noqa: E501 - email_address: Annotated[str, Field(strict=True, max_length=200)] = Field(description="email address of the user", alias="emailAddress") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + email_address: StrictStr = Field(alias="emailAddress") + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["emailAddress", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "emailAddress": obj.get("emailAddress"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_first_name_query.py b/zitadel_client/models/user_service_first_name_query.py index bcec901b..9219b07e 100644 --- a/zitadel_client/models/user_service_first_name_query.py +++ b/zitadel_client/models/user_service_first_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceFirstNameQuery(BaseModel): """ Query for users with a specific first name. """ # noqa: E501 - first_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="firstName") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + first_name: StrictStr = Field(alias="firstName") + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["firstName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "firstName": obj.get("firstName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_form_data.py b/zitadel_client/models/user_service_form_data.py new file mode 100644 index 00000000..89ca35f4 --- /dev/null +++ b/zitadel_client/models/user_service_form_data.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceFormData(BaseModel): + """ + UserServiceFormData + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="The URL to which the form should be submitted using the POST method.") + fields: Optional[Dict[str, StrictStr]] = Field(default=None, description="The form fields to be submitted. Each field is represented as a key-value pair, where the key is the field / input name and the value is the field / input value. All fields need to be submitted as is and as input type \"text\".") + __properties: ClassVar[List[str]] = ["url", "fields"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceFormData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceFormData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "fields": obj.get("fields") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_get_user_by_id_request.py b/zitadel_client/models/user_service_get_user_by_id_request.py new file mode 100644 index 00000000..83382eb4 --- /dev/null +++ b/zitadel_client/models/user_service_get_user_by_id_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceGetUserByIDRequest(BaseModel): + """ + UserServiceGetUserByIDRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceGetUserByIDRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceGetUserByIDRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_get_user_by_id_response.py b/zitadel_client/models/user_service_get_user_by_id_response.py index b7583988..1dd9f515 100644 --- a/zitadel_client/models/user_service_get_user_by_id_response.py +++ b/zitadel_client/models/user_service_get_user_by_id_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_user import UserServiceUser from typing import Optional, Set @@ -30,6 +30,7 @@ class UserServiceGetUserByIDResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None user: Optional[UserServiceUser] = None + __properties: ClassVar[List[str]] = ["details", "user"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_hashed_password.py b/zitadel_client/models/user_service_hashed_password.py index dceead31..75b29c89 100644 --- a/zitadel_client/models/user_service_hashed_password.py +++ b/zitadel_client/models/user_service_hashed_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServiceHashedPassword(BaseModel): """ UserServiceHashedPassword """ # noqa: E501 - hash: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="\"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\"") + hash: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["hash", "changeRequired"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_human.py b/zitadel_client/models/user_service_human.py new file mode 100644 index 00000000..0b1e39e2 --- /dev/null +++ b/zitadel_client/models/user_service_human.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_profile import UserServiceProfile +from zitadel_client.models.user_service_set_human_email import UserServiceSetHumanEmail +from zitadel_client.models.user_service_set_human_phone import UserServiceSetHumanPhone +from zitadel_client.models.user_service_set_password import UserServiceSetPassword +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceHuman(BaseModel): + """ + UserServiceHuman + """ # noqa: E501 + profile: Optional[UserServiceProfile] = None + email: Optional[UserServiceSetHumanEmail] = None + phone: Optional[UserServiceSetHumanPhone] = None + password: Optional[UserServiceSetPassword] = None + __properties: ClassVar[List[str]] = ["profile", "email", "phone", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceHuman from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone + if self.phone: + _dict['phone'] = self.phone.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceHuman from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "profile": UserServiceProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "email": UserServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "phone": UserServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, + "password": UserServiceSetPassword.from_dict(obj["password"]) if obj.get("password") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_human_email.py b/zitadel_client/models/user_service_human_email.py index 1ab98c08..bbf121f6 100644 --- a/zitadel_client/models/user_service_human_email.py +++ b/zitadel_client/models/user_service_human_email.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServiceHumanEmail(BaseModel): """ UserServiceHumanEmail """ # noqa: E501 - email: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + email: Optional[StrictStr] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + __properties: ClassVar[List[str]] = ["email", "isVerified"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_human_mfa_init_skipped_request.py b/zitadel_client/models/user_service_human_mfa_init_skipped_request.py new file mode 100644 index 00000000..557be230 --- /dev/null +++ b/zitadel_client/models/user_service_human_mfa_init_skipped_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceHumanMFAInitSkippedRequest(BaseModel): + """ + UserServiceHumanMFAInitSkippedRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceHumanMFAInitSkippedRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceHumanMFAInitSkippedRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_human_mfa_init_skipped_response.py b/zitadel_client/models/user_service_human_mfa_init_skipped_response.py index 843e9a68..e714a2da 100644 --- a/zitadel_client/models/user_service_human_mfa_init_skipped_response.py +++ b/zitadel_client/models/user_service_human_mfa_init_skipped_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceHumanMFAInitSkippedResponse(BaseModel): UserServiceHumanMFAInitSkippedResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_human_phone.py b/zitadel_client/models/user_service_human_phone.py index e17bf8cf..741e96cf 100644 --- a/zitadel_client/models/user_service_human_phone.py +++ b/zitadel_client/models/user_service_human_phone.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServiceHumanPhone(BaseModel): """ UserServiceHumanPhone """ # noqa: E501 - phone: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None + phone: Optional[StrictStr] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + __properties: ClassVar[List[str]] = ["phone", "isVerified"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_human_profile.py b/zitadel_client/models/user_service_human_profile.py index 925f00de..02dc3562 100644 --- a/zitadel_client/models/user_service_human_profile.py +++ b/zitadel_client/models/user_service_human_profile.py @@ -18,8 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_gender import UserServiceGender from typing import Optional, Set from typing_extensions import Self @@ -28,13 +27,14 @@ class UserServiceHumanProfile(BaseModel): """ UserServiceHumanProfile """ # noqa: E501 - given_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="givenName") - family_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="familyName") - nick_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="nickName") - display_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="displayName") - preferred_language: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, alias="preferredLanguage") - gender: Optional[UserServiceGender] = UserServiceGender.GENDER_UNSPECIFIED - avatar_url: Optional[StrictStr] = Field(default=None, description="avatar URL of the user", alias="avatarUrl") + given_name: Optional[StrictStr] = Field(default=None, alias="givenName") + family_name: Optional[StrictStr] = Field(default=None, alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[UserServiceGender] = None + avatar_url: Optional[StrictStr] = Field(default=None, alias="avatarUrl") + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender", "avatarUrl"] model_config = ConfigDict( populate_by_name=True, @@ -75,6 +75,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + return _dict @classmethod @@ -92,7 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nickName": obj.get("nickName"), "displayName": obj.get("displayName"), "preferredLanguage": obj.get("preferredLanguage"), - "gender": obj.get("gender") if obj.get("gender") is not None else UserServiceGender.GENDER_UNSPECIFIED, + "gender": obj.get("gender"), "avatarUrl": obj.get("avatarUrl") }) return _obj diff --git a/zitadel_client/models/user_service_human_user.py b/zitadel_client/models/user_service_human_user.py index 7493564e..16f860be 100644 --- a/zitadel_client/models/user_service_human_user.py +++ b/zitadel_client/models/user_service_human_user.py @@ -32,7 +32,7 @@ class UserServiceHumanUser(BaseModel): UserServiceHumanUser """ # noqa: E501 user_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the user.", alias="userId") - state: Optional[UserServiceUserState] = UserServiceUserState.USER_STATE_UNSPECIFIED + state: Optional[UserServiceUserState] = None username: Optional[StrictStr] = Field(default=None, description="Username of the user, which can be globally unique or unique on organization level.") login_names: Optional[List[StrictStr]] = Field(default=None, description="Possible usable login names for the user.", alias="loginNames") preferred_login_name: Optional[StrictStr] = Field(default=None, description="Preferred login name of the user.", alias="preferredLoginName") @@ -40,8 +40,9 @@ class UserServiceHumanUser(BaseModel): email: Optional[UserServiceHumanEmail] = None phone: Optional[UserServiceHumanPhone] = None password_change_required: Optional[StrictBool] = Field(default=None, description="User is required to change the used password on the next login.", alias="passwordChangeRequired") - password_changed: Optional[datetime] = Field(default=None, description="The time the user last changed their password.", alias="passwordChanged") - mfa_init_skipped: Optional[datetime] = Field(default=None, description="The time the user last skipped MFA initialization.", alias="mfaInitSkipped") + password_changed: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="passwordChanged") + mfa_init_skipped: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="mfaInitSkipped") + __properties: ClassVar[List[str]] = ["userId", "state", "username", "loginNames", "preferredLoginName", "profile", "email", "phone", "passwordChangeRequired", "passwordChanged", "mfaInitSkipped"] model_config = ConfigDict( populate_by_name=True, @@ -104,7 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userId": obj.get("userId"), - "state": obj.get("state") if obj.get("state") is not None else UserServiceUserState.USER_STATE_UNSPECIFIED, + "state": obj.get("state"), "username": obj.get("username"), "loginNames": obj.get("loginNames"), "preferredLoginName": obj.get("preferredLoginName"), diff --git a/zitadel_client/models/user_service_id_filter.py b/zitadel_client/models/user_service_id_filter.py new file mode 100644 index 00000000..9508deb5 --- /dev/null +++ b/zitadel_client/models/user_service_id_filter.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceIDFilter(BaseModel): + """ + UserServiceIDFilter + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Only return resources that belong to this id.") + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceIDFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceIDFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_idp_information.py b/zitadel_client/models/user_service_idp_information.py index 9eae7d52..b70c6ca5 100644 --- a/zitadel_client/models/user_service_idp_information.py +++ b/zitadel_client/models/user_service_idp_information.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_idpldap_access_information import UserServiceIDPLDAPAccessInformation from zitadel_client.models.user_service_idpo_auth_access_information import UserServiceIDPOAuthAccessInformation from zitadel_client.models.user_service_idpsaml_access_information import UserServiceIDPSAMLAccessInformation @@ -29,13 +29,14 @@ class UserServiceIDPInformation(BaseModel): """ UserServiceIDPInformation """ # noqa: E501 - oauth: Optional[UserServiceIDPOAuthAccessInformation] = None + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") + raw_information: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="rawInformation") ldap: Optional[UserServiceIDPLDAPAccessInformation] = None + oauth: Optional[UserServiceIDPOAuthAccessInformation] = None saml: Optional[UserServiceIDPSAMLAccessInformation] = None - idp_id: Optional[StrictStr] = Field(default=None, description="ID of the identity provider", alias="idpId") - user_id: Optional[StrictStr] = Field(default=None, description="ID of the user of the identity provider", alias="userId") - user_name: Optional[StrictStr] = Field(default=None, description="username of the user of the identity provider", alias="userName") - raw_information: Optional[Dict[str, Any]] = Field(default=None, description="complete information returned by the identity provider", alias="rawInformation") + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName", "rawInformation", "ldap", "oauth", "saml"] model_config = ConfigDict( populate_by_name=True, @@ -76,6 +77,15 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + # override the default output from pydantic by calling `to_dict()` of oauth + if self.oauth: + _dict['oauth'] = self.oauth.to_dict() + # override the default output from pydantic by calling `to_dict()` of saml + if self.saml: + _dict['saml'] = self.saml.to_dict() return _dict @classmethod @@ -88,13 +98,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "oauth": UserServiceIDPOAuthAccessInformation.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, - "ldap": UserServiceIDPLDAPAccessInformation.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, - "saml": UserServiceIDPSAMLAccessInformation.from_dict(obj["saml"]) if obj.get("saml") is not None else None, "idpId": obj.get("idpId"), "userId": obj.get("userId"), "userName": obj.get("userName"), - "rawInformation": obj.get("rawInformation") + "rawInformation": obj.get("rawInformation"), + "ldap": UserServiceIDPLDAPAccessInformation.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, + "oauth": UserServiceIDPOAuthAccessInformation.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, + "saml": UserServiceIDPSAMLAccessInformation.from_dict(obj["saml"]) if obj.get("saml") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_idp_intent.py b/zitadel_client/models/user_service_idp_intent.py index 399da171..48fcee6e 100644 --- a/zitadel_client/models/user_service_idp_intent.py +++ b/zitadel_client/models/user_service_idp_intent.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +26,10 @@ class UserServiceIDPIntent(BaseModel): """ UserServiceIDPIntent """ # noqa: E501 - idp_intent_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the IDP intent", alias="idpIntentId") - idp_intent_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="token of the IDP intent", alias="idpIntentToken") - user_id: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="ID of the ZITADEL user if external user already linked", alias="userId") + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken", "userId"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_idp_link.py b/zitadel_client/models/user_service_idp_link.py index ec8ab841..c81592e0 100644 --- a/zitadel_client/models/user_service_idp_link.py +++ b/zitadel_client/models/user_service_idp_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +26,10 @@ class UserServiceIDPLink(BaseModel): """ UserServiceIDPLink """ # noqa: E501 - idp_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the identity provider", alias="idpId") - user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the user of the identity provider", alias="userId") - user_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="username of the user of the identity provider", alias="userName") + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + user_name: Optional[StrictStr] = Field(default=None, alias="userName") + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_idpldap_access_information.py b/zitadel_client/models/user_service_idpldap_access_information.py index 1c938e3c..afcccd06 100644 --- a/zitadel_client/models/user_service_idpldap_access_information.py +++ b/zitadel_client/models/user_service_idpldap_access_information.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,8 @@ class UserServiceIDPLDAPAccessInformation(BaseModel): """ UserServiceIDPLDAPAccessInformation """ # noqa: E501 - attributes: Optional[Dict[str, Any]] = None + attributes: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.") + __properties: ClassVar[List[str]] = ["attributes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_idpo_auth_access_information.py b/zitadel_client/models/user_service_idpo_auth_access_information.py index d92af674..d529893e 100644 --- a/zitadel_client/models/user_service_idpo_auth_access_information.py +++ b/zitadel_client/models/user_service_idpo_auth_access_information.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceIDPOAuthAccessInformation(BaseModel): """ # noqa: E501 access_token: Optional[StrictStr] = Field(default=None, alias="accessToken") id_token: Optional[StrictStr] = Field(default=None, alias="idToken") + __properties: ClassVar[List[str]] = ["accessToken", "idToken"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if id_token (nullable) is None + # and model_fields_set contains the field + if self.id_token is None and "id_token" in self.model_fields_set: + _dict['idToken'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_idpsaml_access_information.py b/zitadel_client/models/user_service_idpsaml_access_information.py index 05faaf8f..a5614a10 100644 --- a/zitadel_client/models/user_service_idpsaml_access_information.py +++ b/zitadel_client/models/user_service_idpsaml_access_information.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,7 @@ class UserServiceIDPSAMLAccessInformation(BaseModel): UserServiceIDPSAMLAccessInformation """ # noqa: E501 assertion: Optional[Union[StrictBytes, StrictStr]] = None + __properties: ClassVar[List[str]] = ["assertion"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_in_user_emails_query.py b/zitadel_client/models/user_service_in_user_emails_query.py index 939e6547..8794bfe1 100644 --- a/zitadel_client/models/user_service_in_user_emails_query.py +++ b/zitadel_client/models/user_service_in_user_emails_query.py @@ -26,7 +26,8 @@ class UserServiceInUserEmailsQuery(BaseModel): """ Query for users with email in list of emails. """ # noqa: E501 - user_emails: Optional[List[StrictStr]] = Field(default=None, description="the emails of the users to include", alias="userEmails") + user_emails: Optional[List[StrictStr]] = Field(default=None, alias="userEmails") + __properties: ClassVar[List[str]] = ["userEmails"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_in_user_id_query.py b/zitadel_client/models/user_service_in_user_id_query.py index 0f61c5f6..c22d39aa 100644 --- a/zitadel_client/models/user_service_in_user_id_query.py +++ b/zitadel_client/models/user_service_in_user_id_query.py @@ -26,7 +26,8 @@ class UserServiceInUserIDQuery(BaseModel): """ Query for users with ID in list of IDs. """ # noqa: E501 - user_ids: Optional[List[StrictStr]] = Field(default=None, description="the ids of the users to include", alias="userIds") + user_ids: Optional[List[StrictStr]] = Field(default=None, alias="userIds") + __properties: ClassVar[List[str]] = ["userIds"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_key.py b/zitadel_client/models/user_service_key.py new file mode 100644 index 00000000..a7077fb8 --- /dev/null +++ b/zitadel_client/models/user_service_key.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceKey(BaseModel): + """ + UserServiceKey + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the key.") + user_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user the key belongs to.", alias="userId") + organization_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the organization the key belongs to.", alias="organizationId") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["creationDate", "changeDate", "id", "userId", "organizationId", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "id": obj.get("id"), + "userId": obj.get("userId"), + "organizationId": obj.get("organizationId"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_key_field_name.py b/zitadel_client/models/user_service_key_field_name.py new file mode 100644 index 00000000..a33f4028 --- /dev/null +++ b/zitadel_client/models/user_service_key_field_name.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserServiceKeyFieldName(str, Enum): + """ + UserServiceKeyFieldName + """ + + """ + allowed enum values + """ + KEY_FIELD_NAME_UNSPECIFIED = 'KEY_FIELD_NAME_UNSPECIFIED' + KEY_FIELD_NAME_CREATED_DATE = 'KEY_FIELD_NAME_CREATED_DATE' + KEY_FIELD_NAME_ID = 'KEY_FIELD_NAME_ID' + KEY_FIELD_NAME_USER_ID = 'KEY_FIELD_NAME_USER_ID' + KEY_FIELD_NAME_ORGANIZATION_ID = 'KEY_FIELD_NAME_ORGANIZATION_ID' + KEY_FIELD_NAME_KEY_EXPIRATION_DATE = 'KEY_FIELD_NAME_KEY_EXPIRATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserServiceKeyFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/user_service_keys_search_filter.py b/zitadel_client/models/user_service_keys_search_filter.py new file mode 100644 index 00000000..aa801fd1 --- /dev/null +++ b/zitadel_client/models/user_service_keys_search_filter.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_id_filter import UserServiceIDFilter +from zitadel_client.models.user_service_timestamp_filter import UserServiceTimestampFilter +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceKeysSearchFilter(BaseModel): + """ + UserServiceKeysSearchFilter + """ # noqa: E501 + created_date_filter: Optional[UserServiceTimestampFilter] = Field(default=None, alias="createdDateFilter") + expiration_date_filter: Optional[UserServiceTimestampFilter] = Field(default=None, alias="expirationDateFilter") + key_id_filter: Optional[UserServiceIDFilter] = Field(default=None, alias="keyIdFilter") + organization_id_filter: Optional[UserServiceIDFilter] = Field(default=None, alias="organizationIdFilter") + user_id_filter: Optional[UserServiceIDFilter] = Field(default=None, alias="userIdFilter") + __properties: ClassVar[List[str]] = ["createdDateFilter", "expirationDateFilter", "keyIdFilter", "organizationIdFilter", "userIdFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceKeysSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of created_date_filter + if self.created_date_filter: + _dict['createdDateFilter'] = self.created_date_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of expiration_date_filter + if self.expiration_date_filter: + _dict['expirationDateFilter'] = self.expiration_date_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of key_id_filter + if self.key_id_filter: + _dict['keyIdFilter'] = self.key_id_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of organization_id_filter + if self.organization_id_filter: + _dict['organizationIdFilter'] = self.organization_id_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_id_filter + if self.user_id_filter: + _dict['userIdFilter'] = self.user_id_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceKeysSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDateFilter": UserServiceTimestampFilter.from_dict(obj["createdDateFilter"]) if obj.get("createdDateFilter") is not None else None, + "expirationDateFilter": UserServiceTimestampFilter.from_dict(obj["expirationDateFilter"]) if obj.get("expirationDateFilter") is not None else None, + "keyIdFilter": UserServiceIDFilter.from_dict(obj["keyIdFilter"]) if obj.get("keyIdFilter") is not None else None, + "organizationIdFilter": UserServiceIDFilter.from_dict(obj["organizationIdFilter"]) if obj.get("organizationIdFilter") is not None else None, + "userIdFilter": UserServiceIDFilter.from_dict(obj["userIdFilter"]) if obj.get("userIdFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_last_name_query.py b/zitadel_client/models/user_service_last_name_query.py index 132c0d21..11e226e1 100644 --- a/zitadel_client/models/user_service_last_name_query.py +++ b/zitadel_client/models/user_service_last_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceLastNameQuery(BaseModel): """ Query for users with a specific last name. """ # noqa: E501 - last_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="lastName") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + last_name: StrictStr = Field(alias="lastName") + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["lastName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "lastName": obj.get("lastName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_ldap_credentials.py b/zitadel_client/models/user_service_ldap_credentials.py index c72633ca..6ed25987 100644 --- a/zitadel_client/models/user_service_ldap_credentials.py +++ b/zitadel_client/models/user_service_ldap_credentials.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServiceLDAPCredentials(BaseModel): """ UserServiceLDAPCredentials """ # noqa: E501 - username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Username used to login through LDAP") - password: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Password used to login through LDAP") + username: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["username", "password"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_list_authentication_factors_request.py b/zitadel_client/models/user_service_list_authentication_factors_request.py new file mode 100644 index 00000000..b01aaff3 --- /dev/null +++ b/zitadel_client/models/user_service_list_authentication_factors_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState +from zitadel_client.models.user_service_auth_factors import UserServiceAuthFactors +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListAuthenticationFactorsRequest(BaseModel): + """ + UserServiceListAuthenticationFactorsRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + auth_factors: Optional[List[UserServiceAuthFactors]] = Field(default=None, alias="authFactors") + states: Optional[List[UserServiceAuthFactorState]] = None + __properties: ClassVar[List[str]] = ["userId", "authFactors", "states"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListAuthenticationFactorsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListAuthenticationFactorsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "authFactors": obj.get("authFactors"), + "states": obj.get("states") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_authentication_factors_response.py b/zitadel_client/models/user_service_list_authentication_factors_response.py index d4eaa298..9ba3339f 100644 --- a/zitadel_client/models/user_service_list_authentication_factors_response.py +++ b/zitadel_client/models/user_service_list_authentication_factors_response.py @@ -28,6 +28,7 @@ class UserServiceListAuthenticationFactorsResponse(BaseModel): UserServiceListAuthenticationFactorsResponse """ # noqa: E501 result: Optional[List[UserServiceAuthFactor]] = None + __properties: ClassVar[List[str]] = ["result"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_list_authentication_method_types_request.py b/zitadel_client/models/user_service_list_authentication_method_types_request.py new file mode 100644 index 00000000..0bc20c84 --- /dev/null +++ b/zitadel_client/models/user_service_list_authentication_method_types_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_domain_query import UserServiceDomainQuery +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListAuthenticationMethodTypesRequest(BaseModel): + """ + UserServiceListAuthenticationMethodTypesRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + domain_query: Optional[UserServiceDomainQuery] = Field(default=None, alias="domainQuery") + __properties: ClassVar[List[str]] = ["userId", "domainQuery"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListAuthenticationMethodTypesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_query + if self.domain_query: + _dict['domainQuery'] = self.domain_query.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListAuthenticationMethodTypesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "domainQuery": UserServiceDomainQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_authentication_method_types_response.py b/zitadel_client/models/user_service_list_authentication_method_types_response.py index 99129a1a..707df738 100644 --- a/zitadel_client/models/user_service_list_authentication_method_types_response.py +++ b/zitadel_client/models/user_service_list_authentication_method_types_response.py @@ -30,6 +30,7 @@ class UserServiceListAuthenticationMethodTypesResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceListDetails] = None auth_method_types: Optional[List[UserServiceAuthenticationMethodType]] = Field(default=None, alias="authMethodTypes") + __properties: ClassVar[List[str]] = ["details", "authMethodTypes"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_list_details.py b/zitadel_client/models/user_service_list_details.py index a84374f9..c71c5ce6 100644 --- a/zitadel_client/models/user_service_list_details.py +++ b/zitadel_client/models/user_service_list_details.py @@ -18,8 +18,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,10 @@ class UserServiceListDetails(BaseModel): """ UserServiceListDetails """ # noqa: E501 - total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") - processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") - timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + total_result: Optional[Any] = Field(default=None, alias="totalResult") + processed_sequence: Optional[Any] = Field(default=None, alias="processedSequence") + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if processed_sequence (nullable) is None + # and model_fields_set contains the field + if self.processed_sequence is None and "processed_sequence" in self.model_fields_set: + _dict['processedSequence'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_list_idp_links_request.py b/zitadel_client/models/user_service_list_idp_links_request.py index 52fbf1eb..f17f85a8 100644 --- a/zitadel_client/models/user_service_list_idp_links_request.py +++ b/zitadel_client/models/user_service_list_idp_links_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_list_query import UserServiceListQuery from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,9 @@ class UserServiceListIDPLinksRequest(BaseModel): """ UserServiceListIDPLinksRequest """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, alias="userId") query: Optional[UserServiceListQuery] = None + __properties: ClassVar[List[str]] = ["userId", "query"] model_config = ConfigDict( populate_by_name=True, @@ -83,6 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "query": UserServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_list_idp_links_response.py b/zitadel_client/models/user_service_list_idp_links_response.py index b3fad5dd..9379311c 100644 --- a/zitadel_client/models/user_service_list_idp_links_response.py +++ b/zitadel_client/models/user_service_list_idp_links_response.py @@ -30,6 +30,7 @@ class UserServiceListIDPLinksResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceListDetails] = None result: Optional[List[UserServiceIDPLink]] = None + __properties: ClassVar[List[str]] = ["details", "result"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_list_keys_request.py b/zitadel_client/models/user_service_list_keys_request.py new file mode 100644 index 00000000..dc3ff6bc --- /dev/null +++ b/zitadel_client/models/user_service_list_keys_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_key_field_name import UserServiceKeyFieldName +from zitadel_client.models.user_service_keys_search_filter import UserServiceKeysSearchFilter +from zitadel_client.models.user_service_pagination_request import UserServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListKeysRequest(BaseModel): + """ + UserServiceListKeysRequest + """ # noqa: E501 + pagination: Optional[UserServicePaginationRequest] = None + sorting_column: Optional[UserServiceKeyFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[UserServiceKeysSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListKeysRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListKeysRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": UserServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [UserServiceKeysSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_keys_response.py b/zitadel_client/models/user_service_list_keys_response.py new file mode 100644 index 00000000..b18240b6 --- /dev/null +++ b/zitadel_client/models/user_service_list_keys_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_key import UserServiceKey +from zitadel_client.models.user_service_pagination_response import UserServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListKeysResponse(BaseModel): + """ + UserServiceListKeysResponse + """ # noqa: E501 + pagination: Optional[UserServicePaginationResponse] = None + result: Optional[List[UserServiceKey]] = None + __properties: ClassVar[List[str]] = ["pagination", "result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListKeysResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in result (list) + _items = [] + if self.result: + for _item_result in self.result: + if _item_result: + _items.append(_item_result.to_dict()) + _dict['result'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListKeysResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": UserServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [UserServiceKey.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_passkeys_request.py b/zitadel_client/models/user_service_list_passkeys_request.py new file mode 100644 index 00000000..cc2d093d --- /dev/null +++ b/zitadel_client/models/user_service_list_passkeys_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListPasskeysRequest(BaseModel): + """ + UserServiceListPasskeysRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListPasskeysRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListPasskeysRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_passkeys_response.py b/zitadel_client/models/user_service_list_passkeys_response.py index ee169eeb..86a7f162 100644 --- a/zitadel_client/models/user_service_list_passkeys_response.py +++ b/zitadel_client/models/user_service_list_passkeys_response.py @@ -30,6 +30,7 @@ class UserServiceListPasskeysResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceListDetails] = None result: Optional[List[UserServicePasskey]] = None + __properties: ClassVar[List[str]] = ["details", "result"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_list_personal_access_tokens_request.py b/zitadel_client/models/user_service_list_personal_access_tokens_request.py new file mode 100644 index 00000000..07949601 --- /dev/null +++ b/zitadel_client/models/user_service_list_personal_access_tokens_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_pagination_request import UserServicePaginationRequest +from zitadel_client.models.user_service_personal_access_token_field_name import UserServicePersonalAccessTokenFieldName +from zitadel_client.models.user_service_personal_access_tokens_search_filter import UserServicePersonalAccessTokensSearchFilter +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListPersonalAccessTokensRequest(BaseModel): + """ + UserServiceListPersonalAccessTokensRequest + """ # noqa: E501 + pagination: Optional[UserServicePaginationRequest] = None + sorting_column: Optional[UserServicePersonalAccessTokenFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[UserServicePersonalAccessTokensSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListPersonalAccessTokensRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListPersonalAccessTokensRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": UserServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [UserServicePersonalAccessTokensSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_personal_access_tokens_response.py b/zitadel_client/models/user_service_list_personal_access_tokens_response.py new file mode 100644 index 00000000..ee70b36d --- /dev/null +++ b/zitadel_client/models/user_service_list_personal_access_tokens_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_pagination_response import UserServicePaginationResponse +from zitadel_client.models.user_service_personal_access_token import UserServicePersonalAccessToken +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListPersonalAccessTokensResponse(BaseModel): + """ + UserServiceListPersonalAccessTokensResponse + """ # noqa: E501 + pagination: Optional[UserServicePaginationResponse] = None + result: Optional[List[UserServicePersonalAccessToken]] = None + __properties: ClassVar[List[str]] = ["pagination", "result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListPersonalAccessTokensResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in result (list) + _items = [] + if self.result: + for _item_result in self.result: + if _item_result: + _items.append(_item_result.to_dict()) + _dict['result'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListPersonalAccessTokensResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": UserServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [UserServicePersonalAccessToken.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_query.py b/zitadel_client/models/user_service_list_query.py index 70efb20f..33cbe86c 100644 --- a/zitadel_client/models/user_service_list_query.py +++ b/zitadel_client/models/user_service_list_query.py @@ -17,18 +17,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self class UserServiceListQuery(BaseModel): """ - Object unspecific list filters like offset, limit and asc/desc. + UserServiceListQuery """ # noqa: E501 - offset: Optional[StrictStr] = None - limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") - asc: Optional[StrictBool] = Field(default=None, description="default is descending") + offset: Optional[Any] = None + limit: Optional[StrictInt] = None + asc: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_list_user_metadata_request.py b/zitadel_client/models/user_service_list_user_metadata_request.py new file mode 100644 index 00000000..180d65dd --- /dev/null +++ b/zitadel_client/models/user_service_list_user_metadata_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_metadata_search_filter import UserServiceMetadataSearchFilter +from zitadel_client.models.user_service_pagination_request import UserServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListUserMetadataRequest(BaseModel): + """ + UserServiceListUserMetadataRequest + """ # noqa: E501 + user_id: StrictStr = Field(description="ID of the user under which the metadata is to be listed.", alias="userId") + pagination: Optional[UserServicePaginationRequest] = None + filters: Optional[List[UserServiceMetadataSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["userId", "pagination", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListUserMetadataRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListUserMetadataRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "pagination": UserServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "filters": [UserServiceMetadataSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_user_metadata_response.py b/zitadel_client/models/user_service_list_user_metadata_response.py new file mode 100644 index 00000000..7ad94560 --- /dev/null +++ b/zitadel_client/models/user_service_list_user_metadata_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_metadata import UserServiceMetadata +from zitadel_client.models.user_service_pagination_response import UserServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceListUserMetadataResponse(BaseModel): + """ + UserServiceListUserMetadataResponse + """ # noqa: E501 + pagination: Optional[UserServicePaginationResponse] = None + metadata: Optional[List[UserServiceMetadata]] = Field(default=None, description="The user metadata requested.") + __properties: ClassVar[List[str]] = ["pagination", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceListUserMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceListUserMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": UserServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "metadata": [UserServiceMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_list_users_request.py b/zitadel_client/models/user_service_list_users_request.py index 163c2436..bae37e78 100644 --- a/zitadel_client/models/user_service_list_users_request.py +++ b/zitadel_client/models/user_service_list_users_request.py @@ -30,8 +30,9 @@ class UserServiceListUsersRequest(BaseModel): UserServiceListUsersRequest """ # noqa: E501 query: Optional[UserServiceListQuery] = None - sorting_column: Optional[UserServiceUserFieldName] = Field(default=UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") - queries: Optional[List[UserServiceSearchQuery]] = None + sorting_column: Optional[UserServiceUserFieldName] = Field(default=None, alias="sortingColumn") + queries: Optional[List[UserServiceSearchQuery]] = Field(default=None, description="criteria the client is looking for") + __properties: ClassVar[List[str]] = ["query", "sortingColumn", "queries"] model_config = ConfigDict( populate_by_name=True, @@ -95,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "query": UserServiceListQuery.from_dict(obj["query"]) if obj.get("query") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, + "sortingColumn": obj.get("sortingColumn"), "queries": [UserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_list_users_response.py b/zitadel_client/models/user_service_list_users_response.py index 3533851c..7949ba16 100644 --- a/zitadel_client/models/user_service_list_users_response.py +++ b/zitadel_client/models/user_service_list_users_response.py @@ -30,8 +30,9 @@ class UserServiceListUsersResponse(BaseModel): UserServiceListUsersResponse """ # noqa: E501 details: Optional[UserServiceListDetails] = None - sorting_column: Optional[UserServiceUserFieldName] = Field(default=UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") + sorting_column: Optional[UserServiceUserFieldName] = Field(default=None, alias="sortingColumn") result: Optional[List[UserServiceUser]] = None + __properties: ClassVar[List[str]] = ["details", "sortingColumn", "result"] model_config = ConfigDict( populate_by_name=True, @@ -95,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, + "sortingColumn": obj.get("sortingColumn"), "result": [UserServiceUser.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) return _obj diff --git a/zitadel_client/models/settings_service_protobuf_any.py b/zitadel_client/models/user_service_lock_user_request.py similarity index 85% rename from zitadel_client/models/settings_service_protobuf_any.py rename to zitadel_client/models/user_service_lock_user_request.py index 1a5eca25..b52ddb66 100644 --- a/zitadel_client/models/settings_service_protobuf_any.py +++ b/zitadel_client/models/user_service_lock_user_request.py @@ -18,15 +18,16 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self -class SettingsServiceProtobufAny(BaseModel): +class UserServiceLockUserRequest(BaseModel): """ - SettingsServiceProtobufAny + UserServiceLockUserRequest """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, alias="@type") + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SettingsServiceProtobufAny from a JSON string""" + """Create an instance of UserServiceLockUserRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SettingsServiceProtobufAny from a dict""" + """Create an instance of UserServiceLockUserRequest from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "@type": obj.get("@type") + "userId": obj.get("userId") }) return _obj diff --git a/zitadel_client/models/user_service_lock_user_response.py b/zitadel_client/models/user_service_lock_user_response.py index bdac6ea9..372b5448 100644 --- a/zitadel_client/models/user_service_lock_user_response.py +++ b/zitadel_client/models/user_service_lock_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceLockUserResponse(BaseModel): UserServiceLockUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_login_name_query.py b/zitadel_client/models/user_service_login_name_query.py index a2280e57..66c3dd83 100644 --- a/zitadel_client/models/user_service_login_name_query.py +++ b/zitadel_client/models/user_service_login_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceLoginNameQuery(BaseModel): """ Query for users with a specific state. """ # noqa: E501 - login_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="loginName") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + login_name: StrictStr = Field(alias="loginName") + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["loginName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "loginName": obj.get("loginName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_machine.py b/zitadel_client/models/user_service_machine.py new file mode 100644 index 00000000..017617d7 --- /dev/null +++ b/zitadel_client/models/user_service_machine.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceMachine(BaseModel): + """ + UserServiceMachine + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The machine users name is a human readable field that helps identifying the user.") + description: Optional[StrictStr] = Field(default=None, description="The description is a field that helps to remember the purpose of the user.") + __properties: ClassVar[List[str]] = ["name", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceMachine from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceMachine from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_machine_user.py b/zitadel_client/models/user_service_machine_user.py index 8fdc9c9a..92a95e36 100644 --- a/zitadel_client/models/user_service_machine_user.py +++ b/zitadel_client/models/user_service_machine_user.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_access_token_type import UserServiceAccessTokenType from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,8 @@ class UserServiceMachineUser(BaseModel): name: Optional[StrictStr] = None description: Optional[StrictStr] = None has_secret: Optional[StrictBool] = Field(default=None, alias="hasSecret") - access_token_type: Optional[UserServiceAccessTokenType] = Field(default=UserServiceAccessTokenType.ACCESS_TOKEN_TYPE_BEARER, alias="accessTokenType") + access_token_type: Optional[UserServiceAccessTokenType] = Field(default=None, alias="accessTokenType") + __properties: ClassVar[List[str]] = ["name", "description", "hasSecret", "accessTokenType"] model_config = ConfigDict( populate_by_name=True, @@ -86,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "description": obj.get("description"), "hasSecret": obj.get("hasSecret"), - "accessTokenType": obj.get("accessTokenType") if obj.get("accessTokenType") is not None else UserServiceAccessTokenType.ACCESS_TOKEN_TYPE_BEARER + "accessTokenType": obj.get("accessTokenType") }) return _obj diff --git a/zitadel_client/models/user_service_metadata.py b/zitadel_client/models/user_service_metadata.py new file mode 100644 index 00000000..c91f70bf --- /dev/null +++ b/zitadel_client/models/user_service_metadata.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceMetadata(BaseModel): + """ + UserServiceMetadata + """ # noqa: E501 + key: Optional[StrictStr] = Field(default=None, description="Key in the metadata key/value pair.") + value: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="Value in the metadata key/value pair.") + __properties: ClassVar[List[str]] = ["key", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_metadata_key_filter.py b/zitadel_client/models/user_service_metadata_key_filter.py new file mode 100644 index 00000000..cbf64105 --- /dev/null +++ b/zitadel_client/models/user_service_metadata_key_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_text_filter_method import UserServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceMetadataKeyFilter(BaseModel): + """ + UserServiceMetadataKeyFilter + """ # noqa: E501 + key: Optional[StrictStr] = None + method: Optional[UserServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["key", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceMetadataKeyFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceMetadataKeyFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/session_service_challenges_web_auth_n.py b/zitadel_client/models/user_service_metadata_search_filter.py similarity index 72% rename from zitadel_client/models/session_service_challenges_web_auth_n.py rename to zitadel_client/models/user_service_metadata_search_filter.py index 08a79dab..1437e224 100644 --- a/zitadel_client/models/session_service_challenges_web_auth_n.py +++ b/zitadel_client/models/user_service_metadata_search_filter.py @@ -18,15 +18,17 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_metadata_key_filter import UserServiceMetadataKeyFilter from typing import Optional, Set from typing_extensions import Self -class SessionServiceChallengesWebAuthN(BaseModel): +class UserServiceMetadataSearchFilter(BaseModel): """ - SessionServiceChallengesWebAuthN + UserServiceMetadataSearchFilter """ # noqa: E501 - public_key_credential_request_options: Optional[Dict[str, Any]] = Field(default=None, description="Options for Assertion Generaration (dictionary PublicKeyCredentialRequestOptions). Generated helper methods transform the field to JSON, for use in a WebauthN client. See also: https://www.w3.org/TR/webauthn/#dictdef-publickeycredentialrequestoptions", alias="publicKeyCredentialRequestOptions") + key_filter: Optional[UserServiceMetadataKeyFilter] = Field(default=None, alias="keyFilter") + __properties: ClassVar[List[str]] = ["keyFilter"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionServiceChallengesWebAuthN from a JSON string""" + """Create an instance of UserServiceMetadataSearchFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -67,11 +69,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of key_filter + if self.key_filter: + _dict['keyFilter'] = self.key_filter.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionServiceChallengesWebAuthN from a dict""" + """Create an instance of UserServiceMetadataSearchFilter from a dict""" if obj is None: return None @@ -79,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "publicKeyCredentialRequestOptions": obj.get("publicKeyCredentialRequestOptions") + "keyFilter": UserServiceMetadataKeyFilter.from_dict(obj["keyFilter"]) if obj.get("keyFilter") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_nick_name_query.py b/zitadel_client/models/user_service_nick_name_query.py index 08f61b7c..fc00de4e 100644 --- a/zitadel_client/models/user_service_nick_name_query.py +++ b/zitadel_client/models/user_service_nick_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceNickNameQuery(BaseModel): """ Query for users with a specific nickname. """ # noqa: E501 - nick_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="nickName") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + nick_name: StrictStr = Field(alias="nickName") + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["nickName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "nickName": obj.get("nickName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_not_query.py b/zitadel_client/models/user_service_not_query.py index 8842f113..41a12dfd 100644 --- a/zitadel_client/models/user_service_not_query.py +++ b/zitadel_client/models/user_service_not_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,7 @@ class UserServiceNotQuery(BaseModel): Negate the sub-condition. """ # noqa: E501 query: Optional[UserServiceSearchQuery] = None + __properties: ClassVar[List[str]] = ["query"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_or_query.py b/zitadel_client/models/user_service_or_query.py index 2c289daf..4dde7c89 100644 --- a/zitadel_client/models/user_service_or_query.py +++ b/zitadel_client/models/user_service_or_query.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,8 @@ class UserServiceOrQuery(BaseModel): """ Connect multiple sub-condition with and OR operator. """ # noqa: E501 - queries: Optional[List[UserServiceSearchQuery]] = Field(default=None, description="the sub queries to 'OR'") + queries: Optional[List[UserServiceSearchQuery]] = None + __properties: ClassVar[List[str]] = ["queries"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_organization.py b/zitadel_client/models/user_service_organization.py index 65dfd534..f9df8ed7 100644 --- a/zitadel_client/models/user_service_organization.py +++ b/zitadel_client/models/user_service_organization.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,8 +26,9 @@ class UserServiceOrganization(BaseModel): """ UserServiceOrganization """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, alias="orgId") org_domain: Optional[StrictStr] = Field(default=None, alias="orgDomain") + org_id: Optional[StrictStr] = Field(default=None, alias="orgId") + __properties: ClassVar[List[str]] = ["orgDomain", "orgId"] model_config = ConfigDict( populate_by_name=True, @@ -80,8 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "orgDomain": obj.get("orgDomain") + "orgDomain": obj.get("orgDomain"), + "orgId": obj.get("orgId") }) return _obj diff --git a/zitadel_client/models/user_service_organization_id_query.py b/zitadel_client/models/user_service_organization_id_query.py index a7121a62..b2c37bae 100644 --- a/zitadel_client/models/user_service_organization_id_query.py +++ b/zitadel_client/models/user_service_organization_id_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class UserServiceOrganizationIdQuery(BaseModel): """ Query for users under a specific organization as resource owner. """ # noqa: E501 - organization_id: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="organizationId") + organization_id: StrictStr = Field(alias="organizationId") + __properties: ClassVar[List[str]] = ["organizationId"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_pagination_request.py b/zitadel_client/models/user_service_pagination_request.py new file mode 100644 index 00000000..dd98a4a0 --- /dev/null +++ b/zitadel_client/models/user_service_pagination_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServicePaginationRequest(BaseModel): + """ + UserServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServicePaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServicePaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_pagination_response.py b/zitadel_client/models/user_service_pagination_response.py new file mode 100644 index 00000000..c96dfdbe --- /dev/null +++ b/zitadel_client/models/user_service_pagination_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServicePaginationResponse(BaseModel): + """ + UserServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServicePaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServicePaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_passkey.py b/zitadel_client/models/user_service_passkey.py index 6ebab941..38535b13 100644 --- a/zitadel_client/models/user_service_passkey.py +++ b/zitadel_client/models/user_service_passkey.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_auth_factor_state import UserServiceAuthFactorState from typing import Optional, Set from typing_extensions import Self @@ -29,8 +28,9 @@ class UserServicePasskey(BaseModel): UserServicePasskey """ # noqa: E501 id: Optional[StrictStr] = None - state: Optional[UserServiceAuthFactorState] = UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED - name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + state: Optional[UserServiceAuthFactorState] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "state", "name"] model_config = ConfigDict( populate_by_name=True, @@ -84,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "state": obj.get("state") if obj.get("state") is not None else UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED, + "state": obj.get("state"), "name": obj.get("name") }) return _obj diff --git a/zitadel_client/models/user_service_passkey_registration_code.py b/zitadel_client/models/user_service_passkey_registration_code.py index 0e671fd4..59d3263e 100644 --- a/zitadel_client/models/user_service_passkey_registration_code.py +++ b/zitadel_client/models/user_service_passkey_registration_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServicePasskeyRegistrationCode(BaseModel): """ UserServicePasskeyRegistrationCode """ # noqa: E501 - id: Annotated[str, Field(strict=True, max_length=200)] = Field(description="\"id to the one time code generated by ZITADEL\"") - code: Annotated[str, Field(strict=True, max_length=200)] = Field(description="\"one time code generated by ZITADEL\"") + id: StrictStr + code: StrictStr + __properties: ClassVar[List[str]] = ["id", "code"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_password.py b/zitadel_client/models/user_service_password.py index 6ffe00d3..0486c879 100644 --- a/zitadel_client/models/user_service_password.py +++ b/zitadel_client/models/user_service_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServicePassword(BaseModel): """ UserServicePassword """ # noqa: E501 - password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] + password: StrictStr change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + __properties: ClassVar[List[str]] = ["password", "changeRequired"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_password_reset_request.py b/zitadel_client/models/user_service_password_reset_request.py index 5e1cf6bf..1f363999 100644 --- a/zitadel_client/models/user_service_password_reset_request.py +++ b/zitadel_client/models/user_service_password_reset_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_send_password_reset_link import UserServiceSendPasswordResetLink from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class UserServicePasswordResetRequest(BaseModel): """ UserServicePasswordResetRequest """ # noqa: E501 - send_link: Optional[UserServiceSendPasswordResetLink] = Field(default=None, alias="sendLink") + user_id: StrictStr = Field(alias="userId") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_link: Optional[UserServiceSendPasswordResetLink] = Field(default=None, alias="sendLink") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendLink"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_link + if self.send_link: + _dict['sendLink'] = self.send_link.to_dict() return _dict @classmethod @@ -81,8 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendLink": UserServiceSendPasswordResetLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None, - "returnCode": obj.get("returnCode") + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendLink": UserServiceSendPasswordResetLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_password_reset_response.py b/zitadel_client/models/user_service_password_reset_response.py index 7c0b5340..034cb6f7 100644 --- a/zitadel_client/models/user_service_password_reset_response.py +++ b/zitadel_client/models/user_service_password_reset_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class UserServicePasswordResetResponse(BaseModel): UserServicePasswordResetResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the medium was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_personal_access_token.py b/zitadel_client/models/user_service_personal_access_token.py new file mode 100644 index 00000000..fcfe107b --- /dev/null +++ b/zitadel_client/models/user_service_personal_access_token.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServicePersonalAccessToken(BaseModel): + """ + UserServicePersonalAccessToken + """ # noqa: E501 + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the personal access token.") + user_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user the personal access token belongs to.", alias="userId") + organization_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the organization the personal access token belongs to.", alias="organizationId") + expiration_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["creationDate", "changeDate", "id", "userId", "organizationId", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServicePersonalAccessToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServicePersonalAccessToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "id": obj.get("id"), + "userId": obj.get("userId"), + "organizationId": obj.get("organizationId"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_personal_access_token_field_name.py b/zitadel_client/models/user_service_personal_access_token_field_name.py new file mode 100644 index 00000000..2e181528 --- /dev/null +++ b/zitadel_client/models/user_service_personal_access_token_field_name.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserServicePersonalAccessTokenFieldName(str, Enum): + """ + UserServicePersonalAccessTokenFieldName + """ + + """ + allowed enum values + """ + PERSONAL_ACCESS_TOKEN_FIELD_NAME_UNSPECIFIED = 'PERSONAL_ACCESS_TOKEN_FIELD_NAME_UNSPECIFIED' + PERSONAL_ACCESS_TOKEN_FIELD_NAME_CREATED_DATE = 'PERSONAL_ACCESS_TOKEN_FIELD_NAME_CREATED_DATE' + PERSONAL_ACCESS_TOKEN_FIELD_NAME_ID = 'PERSONAL_ACCESS_TOKEN_FIELD_NAME_ID' + PERSONAL_ACCESS_TOKEN_FIELD_NAME_USER_ID = 'PERSONAL_ACCESS_TOKEN_FIELD_NAME_USER_ID' + PERSONAL_ACCESS_TOKEN_FIELD_NAME_ORGANIZATION_ID = 'PERSONAL_ACCESS_TOKEN_FIELD_NAME_ORGANIZATION_ID' + PERSONAL_ACCESS_TOKEN_FIELD_NAME_EXPIRATION_DATE = 'PERSONAL_ACCESS_TOKEN_FIELD_NAME_EXPIRATION_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserServicePersonalAccessTokenFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/user_service_personal_access_tokens_search_filter.py b/zitadel_client/models/user_service_personal_access_tokens_search_filter.py new file mode 100644 index 00000000..19eab47b --- /dev/null +++ b/zitadel_client/models/user_service_personal_access_tokens_search_filter.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_id_filter import UserServiceIDFilter +from zitadel_client.models.user_service_timestamp_filter import UserServiceTimestampFilter +from typing import Optional, Set +from typing_extensions import Self + +class UserServicePersonalAccessTokensSearchFilter(BaseModel): + """ + UserServicePersonalAccessTokensSearchFilter + """ # noqa: E501 + created_date_filter: Optional[UserServiceTimestampFilter] = Field(default=None, alias="createdDateFilter") + expiration_date_filter: Optional[UserServiceTimestampFilter] = Field(default=None, alias="expirationDateFilter") + organization_id_filter: Optional[UserServiceIDFilter] = Field(default=None, alias="organizationIdFilter") + token_id_filter: Optional[UserServiceIDFilter] = Field(default=None, alias="tokenIdFilter") + user_id_filter: Optional[UserServiceIDFilter] = Field(default=None, alias="userIdFilter") + __properties: ClassVar[List[str]] = ["createdDateFilter", "expirationDateFilter", "organizationIdFilter", "tokenIdFilter", "userIdFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServicePersonalAccessTokensSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of created_date_filter + if self.created_date_filter: + _dict['createdDateFilter'] = self.created_date_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of expiration_date_filter + if self.expiration_date_filter: + _dict['expirationDateFilter'] = self.expiration_date_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of organization_id_filter + if self.organization_id_filter: + _dict['organizationIdFilter'] = self.organization_id_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of token_id_filter + if self.token_id_filter: + _dict['tokenIdFilter'] = self.token_id_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_id_filter + if self.user_id_filter: + _dict['userIdFilter'] = self.user_id_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServicePersonalAccessTokensSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdDateFilter": UserServiceTimestampFilter.from_dict(obj["createdDateFilter"]) if obj.get("createdDateFilter") is not None else None, + "expirationDateFilter": UserServiceTimestampFilter.from_dict(obj["expirationDateFilter"]) if obj.get("expirationDateFilter") is not None else None, + "organizationIdFilter": UserServiceIDFilter.from_dict(obj["organizationIdFilter"]) if obj.get("organizationIdFilter") is not None else None, + "tokenIdFilter": UserServiceIDFilter.from_dict(obj["tokenIdFilter"]) if obj.get("tokenIdFilter") is not None else None, + "userIdFilter": UserServiceIDFilter.from_dict(obj["userIdFilter"]) if obj.get("userIdFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_phone_query.py b/zitadel_client/models/user_service_phone_query.py index 5b2befff..a851b0e0 100644 --- a/zitadel_client/models/user_service_phone_query.py +++ b/zitadel_client/models/user_service_phone_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServicePhoneQuery(BaseModel): """ Query for users with a specific phone. """ # noqa: E501 - number: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="Phone number of the user") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + number: StrictStr + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["number", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "number": obj.get("number"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_profile.py b/zitadel_client/models/user_service_profile.py new file mode 100644 index 00000000..829f78fc --- /dev/null +++ b/zitadel_client/models/user_service_profile.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_gender import UserServiceGender +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceProfile(BaseModel): + """ + UserServiceProfile + """ # noqa: E501 + given_name: Optional[StrictStr] = Field(default=None, description="The given name is the first name of the user. For example, it can be used to personalize notifications and login UIs.", alias="givenName") + family_name: Optional[StrictStr] = Field(default=None, description="The family name is the last name of the user. For example, it can be used to personalize user interfaces and notifications.", alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, description="The nick name is the users short name. For example, it can be used to personalize user interfaces and notifications.", alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, description="The display name is how a user should primarily be displayed in lists. It can also for example be used to personalize user interfaces and notifications.", alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, description="The users preferred language is the language that systems should use to interact with the user. It has the format of a [BCP-47 language tag](https://datatracker.ietf.org/doc/html/rfc3066). It is used by Zitadel where no higher prioritized preferred language can be used. For example, browser settings can overwrite a users preferred_language. Notification messages and standard login UIs use the users preferred language if it is supported and allowed on the instance. Else, the default language of the instance is used.", alias="preferredLanguage") + gender: Optional[UserServiceGender] = None + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceProfile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if given_name (nullable) is None + # and model_fields_set contains the field + if self.given_name is None and "given_name" in self.model_fields_set: + _dict['givenName'] = None + + # set to None if family_name (nullable) is None + # and model_fields_set contains the field + if self.family_name is None and "family_name" in self.model_fields_set: + _dict['familyName'] = None + + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "givenName": obj.get("givenName"), + "familyName": obj.get("familyName"), + "nickName": obj.get("nickName"), + "displayName": obj.get("displayName"), + "preferredLanguage": obj.get("preferredLanguage"), + "gender": obj.get("gender") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_reactivate_user_request.py b/zitadel_client/models/user_service_reactivate_user_request.py new file mode 100644 index 00000000..1d4ff51b --- /dev/null +++ b/zitadel_client/models/user_service_reactivate_user_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceReactivateUserRequest(BaseModel): + """ + UserServiceReactivateUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceReactivateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceReactivateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_reactivate_user_response.py b/zitadel_client/models/user_service_reactivate_user_response.py index 3e8215d1..7a8cd73f 100644 --- a/zitadel_client/models/user_service_reactivate_user_response.py +++ b/zitadel_client/models/user_service_reactivate_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceReactivateUserResponse(BaseModel): UserServiceReactivateUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_redirect_urls.py b/zitadel_client/models/user_service_redirect_urls.py index 91d8be0f..276f82a7 100644 --- a/zitadel_client/models/user_service_redirect_urls.py +++ b/zitadel_client/models/user_service_redirect_urls.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServiceRedirectURLs(BaseModel): """ UserServiceRedirectURLs """ # noqa: E501 - success_url: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2048)]] = Field(default=None, description="URL on which the user will be redirected after a successful login", alias="successUrl") - failure_url: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2048)]] = Field(default=None, description="URL on which the user will be redirected after a failed login", alias="failureUrl") + success_url: Optional[StrictStr] = Field(default=None, alias="successUrl") + failure_url: Optional[StrictStr] = Field(default=None, alias="failureUrl") + __properties: ClassVar[List[str]] = ["successUrl", "failureUrl"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_register_passkey_request.py b/zitadel_client/models/user_service_register_passkey_request.py index 31484169..57bcc567 100644 --- a/zitadel_client/models/user_service_register_passkey_request.py +++ b/zitadel_client/models/user_service_register_passkey_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_passkey_authenticator import UserServicePasskeyAuthenticator from zitadel_client.models.user_service_passkey_registration_code import UserServicePasskeyRegistrationCode from typing import Optional, Set @@ -28,9 +28,11 @@ class UserServiceRegisterPasskeyRequest(BaseModel): """ UserServiceRegisterPasskeyRequest """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") code: Optional[UserServicePasskeyRegistrationCode] = None - authenticator: Optional[UserServicePasskeyAuthenticator] = UserServicePasskeyAuthenticator.PASSKEY_AUTHENTICATOR_UNSPECIFIED - domain: Optional[StrictStr] = Field(default=None, description="\"Domain on which the user is authenticated.\"") + authenticator: Optional[UserServicePasskeyAuthenticator] = None + domain: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["userId", "code", "authenticator", "domain"] model_config = ConfigDict( populate_by_name=True, @@ -86,8 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "code": UserServicePasskeyRegistrationCode.from_dict(obj["code"]) if obj.get("code") is not None else None, - "authenticator": obj.get("authenticator") if obj.get("authenticator") is not None else UserServicePasskeyAuthenticator.PASSKEY_AUTHENTICATOR_UNSPECIFIED, + "authenticator": obj.get("authenticator"), "domain": obj.get("domain") }) return _obj diff --git a/zitadel_client/models/user_service_register_passkey_response.py b/zitadel_client/models/user_service_register_passkey_response.py index 3100ab3f..32ba6be5 100644 --- a/zitadel_client/models/user_service_register_passkey_response.py +++ b/zitadel_client/models/user_service_register_passkey_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,8 @@ class UserServiceRegisterPasskeyResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None passkey_id: Optional[StrictStr] = Field(default=None, alias="passkeyId") - public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="Options for Credential Creation (dictionary PublicKeyCredentialCreationOptions). Generated helper methods transform the field to JSON, for use in a WebauthN client. See also: https://www.w3.org/TR/webauthn/#dictdef-publickeycredentialcreationoptions", alias="publicKeyCredentialCreationOptions") + public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") + __properties: ClassVar[List[str]] = ["details", "passkeyId", "publicKeyCredentialCreationOptions"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_register_totp_request.py b/zitadel_client/models/user_service_register_totp_request.py new file mode 100644 index 00000000..ed633047 --- /dev/null +++ b/zitadel_client/models/user_service_register_totp_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRegisterTOTPRequest(BaseModel): + """ + UserServiceRegisterTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRegisterTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRegisterTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_register_totp_response.py b/zitadel_client/models/user_service_register_totp_response.py index ade605f0..01793738 100644 --- a/zitadel_client/models/user_service_register_totp_response.py +++ b/zitadel_client/models/user_service_register_totp_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -30,6 +30,7 @@ class UserServiceRegisterTOTPResponse(BaseModel): details: Optional[UserServiceDetails] = None uri: Optional[StrictStr] = None secret: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["details", "uri", "secret"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_register_u2_f_request.py b/zitadel_client/models/user_service_register_u2_f_request.py index f735ae3b..61943f26 100644 --- a/zitadel_client/models/user_service_register_u2_f_request.py +++ b/zitadel_client/models/user_service_register_u2_f_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,9 @@ class UserServiceRegisterU2FRequest(BaseModel): """ UserServiceRegisterU2FRequest """ # noqa: E501 - domain: Optional[StrictStr] = Field(default=None, description="\"Domain on which the user is authenticated.\"") + user_id: StrictStr = Field(alias="userId") + domain: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["userId", "domain"] model_config = ConfigDict( populate_by_name=True, @@ -79,6 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "domain": obj.get("domain") }) return _obj diff --git a/zitadel_client/models/user_service_register_u2_f_response.py b/zitadel_client/models/user_service_register_u2_f_response.py index d370521b..c3c7e74d 100644 --- a/zitadel_client/models/user_service_register_u2_f_response.py +++ b/zitadel_client/models/user_service_register_u2_f_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,8 @@ class UserServiceRegisterU2FResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None u2f_id: Optional[StrictStr] = Field(default=None, alias="u2fId") - public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="Options for Credential Creation (dictionary PublicKeyCredentialCreationOptions). Generated helper methods transform the field to JSON, for use in a WebauthN client. See also: https://www.w3.org/TR/webauthn/#dictdef-publickeycredentialcreationoptions", alias="publicKeyCredentialCreationOptions") + public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredentialCreationOptions") + __properties: ClassVar[List[str]] = ["details", "u2fId", "publicKeyCredentialCreationOptions"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_remove_idp_link_request.py b/zitadel_client/models/user_service_remove_idp_link_request.py new file mode 100644 index 00000000..eac18645 --- /dev/null +++ b/zitadel_client/models/user_service_remove_idp_link_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveIDPLinkRequest(BaseModel): + """ + UserServiceRemoveIDPLinkRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + idp_id: StrictStr = Field(alias="idpId") + linked_user_id: StrictStr = Field(alias="linkedUserId") + __properties: ClassVar[List[str]] = ["userId", "idpId", "linkedUserId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveIDPLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveIDPLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "idpId": obj.get("idpId"), + "linkedUserId": obj.get("linkedUserId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_idp_link_response.py b/zitadel_client/models/user_service_remove_idp_link_response.py index 81d71189..2dda8c12 100644 --- a/zitadel_client/models/user_service_remove_idp_link_response.py +++ b/zitadel_client/models/user_service_remove_idp_link_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceRemoveIDPLinkResponse(BaseModel): UserServiceRemoveIDPLinkResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_remove_key_request.py b/zitadel_client/models/user_service_remove_key_request.py new file mode 100644 index 00000000..9dc510df --- /dev/null +++ b/zitadel_client/models/user_service_remove_key_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveKeyRequest(BaseModel): + """ + UserServiceRemoveKeyRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The users resource ID.", alias="userId") + key_id: Optional[StrictStr] = Field(default=None, description="The keys ID.", alias="keyId") + __properties: ClassVar[List[str]] = ["userId", "keyId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "keyId": obj.get("keyId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_key_response.py b/zitadel_client/models/user_service_remove_key_response.py new file mode 100644 index 00000000..b50f160d --- /dev/null +++ b/zitadel_client/models/user_service_remove_key_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveKeyResponse(BaseModel): + """ + UserServiceRemoveKeyResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_otp_email_request.py b/zitadel_client/models/user_service_remove_otp_email_request.py new file mode 100644 index 00000000..6b26b93a --- /dev/null +++ b/zitadel_client/models/user_service_remove_otp_email_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveOTPEmailRequest(BaseModel): + """ + UserServiceRemoveOTPEmailRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPEmailRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPEmailRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_otp_email_response.py b/zitadel_client/models/user_service_remove_otp_email_response.py index 636c88d6..a671e87d 100644 --- a/zitadel_client/models/user_service_remove_otp_email_response.py +++ b/zitadel_client/models/user_service_remove_otp_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceRemoveOTPEmailResponse(BaseModel): UserServiceRemoveOTPEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_remove_otpsms_request.py b/zitadel_client/models/user_service_remove_otpsms_request.py new file mode 100644 index 00000000..0a05a9c2 --- /dev/null +++ b/zitadel_client/models/user_service_remove_otpsms_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveOTPSMSRequest(BaseModel): + """ + UserServiceRemoveOTPSMSRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPSMSRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveOTPSMSRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_otpsms_response.py b/zitadel_client/models/user_service_remove_otpsms_response.py index b7fec456..3eb1eb86 100644 --- a/zitadel_client/models/user_service_remove_otpsms_response.py +++ b/zitadel_client/models/user_service_remove_otpsms_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceRemoveOTPSMSResponse(BaseModel): UserServiceRemoveOTPSMSResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_remove_passkey_request.py b/zitadel_client/models/user_service_remove_passkey_request.py new file mode 100644 index 00000000..0b6fc562 --- /dev/null +++ b/zitadel_client/models/user_service_remove_passkey_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemovePasskeyRequest(BaseModel): + """ + UserServiceRemovePasskeyRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + passkey_id: StrictStr = Field(alias="passkeyId") + __properties: ClassVar[List[str]] = ["userId", "passkeyId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemovePasskeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemovePasskeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "passkeyId": obj.get("passkeyId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_passkey_response.py b/zitadel_client/models/user_service_remove_passkey_response.py index 606d3b9d..a8df95eb 100644 --- a/zitadel_client/models/user_service_remove_passkey_response.py +++ b/zitadel_client/models/user_service_remove_passkey_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceRemovePasskeyResponse(BaseModel): UserServiceRemovePasskeyResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_remove_personal_access_token_request.py b/zitadel_client/models/user_service_remove_personal_access_token_request.py new file mode 100644 index 00000000..344137de --- /dev/null +++ b/zitadel_client/models/user_service_remove_personal_access_token_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemovePersonalAccessTokenRequest(BaseModel): + """ + UserServiceRemovePersonalAccessTokenRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The users resource ID.", alias="userId") + token_id: Optional[StrictStr] = Field(default=None, description="The tokens ID.", alias="tokenId") + __properties: ClassVar[List[str]] = ["userId", "tokenId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemovePersonalAccessTokenRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemovePersonalAccessTokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "tokenId": obj.get("tokenId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_personal_access_token_response.py b/zitadel_client/models/user_service_remove_personal_access_token_response.py new file mode 100644 index 00000000..4a675e5d --- /dev/null +++ b/zitadel_client/models/user_service_remove_personal_access_token_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemovePersonalAccessTokenResponse(BaseModel): + """ + UserServiceRemovePersonalAccessTokenResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemovePersonalAccessTokenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemovePersonalAccessTokenResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_phone_request.py b/zitadel_client/models/user_service_remove_phone_request.py new file mode 100644 index 00000000..290dd2c3 --- /dev/null +++ b/zitadel_client/models/user_service_remove_phone_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemovePhoneRequest(BaseModel): + """ + UserServiceRemovePhoneRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemovePhoneRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemovePhoneRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_phone_response.py b/zitadel_client/models/user_service_remove_phone_response.py index 4849f1f7..ab691710 100644 --- a/zitadel_client/models/user_service_remove_phone_response.py +++ b/zitadel_client/models/user_service_remove_phone_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceRemovePhoneResponse(BaseModel): UserServiceRemovePhoneResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_remove_secret_request.py b/zitadel_client/models/user_service_remove_secret_request.py new file mode 100644 index 00000000..2b52c6d5 --- /dev/null +++ b/zitadel_client/models/user_service_remove_secret_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveSecretRequest(BaseModel): + """ + UserServiceRemoveSecretRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The users resource ID.", alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveSecretRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveSecretRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_secret_response.py b/zitadel_client/models/user_service_remove_secret_response.py new file mode 100644 index 00000000..0dacbf92 --- /dev/null +++ b/zitadel_client/models/user_service_remove_secret_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveSecretResponse(BaseModel): + """ + UserServiceRemoveSecretResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveSecretResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveSecretResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_totp_request.py b/zitadel_client/models/user_service_remove_totp_request.py new file mode 100644 index 00000000..3ab0fb1d --- /dev/null +++ b/zitadel_client/models/user_service_remove_totp_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveTOTPRequest(BaseModel): + """ + UserServiceRemoveTOTPRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveTOTPRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveTOTPRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_totp_response.py b/zitadel_client/models/user_service_remove_totp_response.py index cc52debd..c90e2cca 100644 --- a/zitadel_client/models/user_service_remove_totp_response.py +++ b/zitadel_client/models/user_service_remove_totp_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceRemoveTOTPResponse(BaseModel): UserServiceRemoveTOTPResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_remove_u2_f_request.py b/zitadel_client/models/user_service_remove_u2_f_request.py new file mode 100644 index 00000000..045177c3 --- /dev/null +++ b/zitadel_client/models/user_service_remove_u2_f_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceRemoveU2FRequest(BaseModel): + """ + UserServiceRemoveU2FRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + u2f_id: StrictStr = Field(alias="u2fId") + __properties: ClassVar[List[str]] = ["userId", "u2fId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceRemoveU2FRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceRemoveU2FRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "u2fId": obj.get("u2fId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_remove_u2_f_response.py b/zitadel_client/models/user_service_remove_u2_f_response.py index 1da26bf4..6a20cb6d 100644 --- a/zitadel_client/models/user_service_remove_u2_f_response.py +++ b/zitadel_client/models/user_service_remove_u2_f_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceRemoveU2FResponse(BaseModel): UserServiceRemoveU2FResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_resend_email_code_request.py b/zitadel_client/models/user_service_resend_email_code_request.py index 87f47c0e..034516dd 100644 --- a/zitadel_client/models/user_service_resend_email_code_request.py +++ b/zitadel_client/models/user_service_resend_email_code_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class UserServiceResendEmailCodeRequest(BaseModel): """ UserServiceResendEmailCodeRequest """ # noqa: E501 - send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + user_id: StrictStr = Field(alias="userId") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod @@ -81,8 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_resend_email_code_response.py b/zitadel_client/models/user_service_resend_email_code_response.py index 008936c7..d12745c7 100644 --- a/zitadel_client/models/user_service_resend_email_code_response.py +++ b/zitadel_client/models/user_service_resend_email_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class UserServiceResendEmailCodeResponse(BaseModel): UserServiceResendEmailCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_resend_invite_code_request.py b/zitadel_client/models/user_service_resend_invite_code_request.py new file mode 100644 index 00000000..6713b6b1 --- /dev/null +++ b/zitadel_client/models/user_service_resend_invite_code_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceResendInviteCodeRequest(BaseModel): + """ + UserServiceResendInviteCodeRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceResendInviteCodeRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceResendInviteCodeRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_resend_invite_code_response.py b/zitadel_client/models/user_service_resend_invite_code_response.py index 26e1a6ed..33afe217 100644 --- a/zitadel_client/models/user_service_resend_invite_code_response.py +++ b/zitadel_client/models/user_service_resend_invite_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceResendInviteCodeResponse(BaseModel): UserServiceResendInviteCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_resend_phone_code_request.py b/zitadel_client/models/user_service_resend_phone_code_request.py index 63af82ff..d2ede256 100644 --- a/zitadel_client/models/user_service_resend_phone_code_request.py +++ b/zitadel_client/models/user_service_resend_phone_code_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,8 +26,10 @@ class UserServiceResendPhoneCodeRequest(BaseModel): """ UserServiceResendPhoneCodeRequest """ # noqa: E501 - send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + user_id: StrictStr = Field(alias="userId") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -80,8 +82,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode") + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendCode": obj.get("sendCode") }) return _obj diff --git a/zitadel_client/models/user_service_resend_phone_code_response.py b/zitadel_client/models/user_service_resend_phone_code_response.py index 9d67dbb2..764375b4 100644 --- a/zitadel_client/models/user_service_resend_phone_code_response.py +++ b/zitadel_client/models/user_service_resend_phone_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class UserServiceResendPhoneCodeResponse(BaseModel): UserServiceResendPhoneCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_retrieve_identity_provider_intent_request.py b/zitadel_client/models/user_service_retrieve_identity_provider_intent_request.py index 599a6e45..77b6ba22 100644 --- a/zitadel_client/models/user_service_retrieve_identity_provider_intent_request.py +++ b/zitadel_client/models/user_service_retrieve_identity_provider_intent_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,9 @@ class UserServiceRetrieveIdentityProviderIntentRequest(BaseModel): """ UserServiceRetrieveIdentityProviderIntentRequest """ # noqa: E501 - idp_intent_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="token of the idp intent, previously returned on the success response of the IDP callback", alias="idpIntentToken") + idp_intent_id: Optional[StrictStr] = Field(default=None, alias="idpIntentId") + idp_intent_token: Optional[StrictStr] = Field(default=None, alias="idpIntentToken") + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken"] model_config = ConfigDict( populate_by_name=True, @@ -80,6 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "idpIntentId": obj.get("idpIntentId"), "idpIntentToken": obj.get("idpIntentToken") }) return _obj diff --git a/zitadel_client/models/user_service_retrieve_identity_provider_intent_response.py b/zitadel_client/models/user_service_retrieve_identity_provider_intent_response.py index 56586413..8eacd41d 100644 --- a/zitadel_client/models/user_service_retrieve_identity_provider_intent_response.py +++ b/zitadel_client/models/user_service_retrieve_identity_provider_intent_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_add_human_user_request import UserServiceAddHumanUserRequest from zitadel_client.models.user_service_details import UserServiceDetails from zitadel_client.models.user_service_idp_information import UserServiceIDPInformation @@ -31,8 +31,9 @@ class UserServiceRetrieveIdentityProviderIntentResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None idp_information: Optional[UserServiceIDPInformation] = Field(default=None, alias="idpInformation") - user_id: Optional[StrictStr] = Field(default=None, description="ID of the user in ZITADEL if external user is linked", alias="userId") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") add_human_user: Optional[UserServiceAddHumanUserRequest] = Field(default=None, alias="addHumanUser") + __properties: ClassVar[List[str]] = ["details", "idpInformation", "userId", "addHumanUser"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_search_query.py b/zitadel_client/models/user_service_search_query.py index 7a66876b..da7a9fca 100644 --- a/zitadel_client/models/user_service_search_query.py +++ b/zitadel_client/models/user_service_search_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_display_name_query import UserServiceDisplayNameQuery from zitadel_client.models.user_service_email_query import UserServiceEmailQuery from zitadel_client.models.user_service_first_name_query import UserServiceFirstNameQuery @@ -39,22 +39,23 @@ class UserServiceSearchQuery(BaseModel): """ UserServiceSearchQuery """ # noqa: E501 - user_name_query: Optional[UserServiceUserNameQuery] = Field(default=None, alias="userNameQuery") - first_name_query: Optional[UserServiceFirstNameQuery] = Field(default=None, alias="firstNameQuery") - last_name_query: Optional[UserServiceLastNameQuery] = Field(default=None, alias="lastNameQuery") - nick_name_query: Optional[UserServiceNickNameQuery] = Field(default=None, alias="nickNameQuery") + and_query: Optional[UserServiceAndQuery] = Field(default=None, alias="andQuery") display_name_query: Optional[UserServiceDisplayNameQuery] = Field(default=None, alias="displayNameQuery") email_query: Optional[UserServiceEmailQuery] = Field(default=None, alias="emailQuery") - state_query: Optional[UserServiceStateQuery] = Field(default=None, alias="stateQuery") - type_query: Optional[UserServiceTypeQuery] = Field(default=None, alias="typeQuery") - login_name_query: Optional[UserServiceLoginNameQuery] = Field(default=None, alias="loginNameQuery") + first_name_query: Optional[UserServiceFirstNameQuery] = Field(default=None, alias="firstNameQuery") + in_user_emails_query: Optional[UserServiceInUserEmailsQuery] = Field(default=None, alias="inUserEmailsQuery") in_user_ids_query: Optional[UserServiceInUserIDQuery] = Field(default=None, alias="inUserIdsQuery") - or_query: Optional[UserServiceOrQuery] = Field(default=None, alias="orQuery") - and_query: Optional[UserServiceAndQuery] = Field(default=None, alias="andQuery") + last_name_query: Optional[UserServiceLastNameQuery] = Field(default=None, alias="lastNameQuery") + login_name_query: Optional[UserServiceLoginNameQuery] = Field(default=None, alias="loginNameQuery") + nick_name_query: Optional[UserServiceNickNameQuery] = Field(default=None, alias="nickNameQuery") not_query: Optional[UserServiceNotQuery] = Field(default=None, alias="notQuery") - in_user_emails_query: Optional[UserServiceInUserEmailsQuery] = Field(default=None, alias="inUserEmailsQuery") + or_query: Optional[UserServiceOrQuery] = Field(default=None, alias="orQuery") organization_id_query: Optional[UserServiceOrganizationIdQuery] = Field(default=None, alias="organizationIdQuery") phone_query: Optional[UserServicePhoneQuery] = Field(default=None, alias="phoneQuery") + state_query: Optional[UserServiceStateQuery] = Field(default=None, alias="stateQuery") + type_query: Optional[UserServiceTypeQuery] = Field(default=None, alias="typeQuery") + user_name_query: Optional[UserServiceUserNameQuery] = Field(default=None, alias="userNameQuery") + __properties: ClassVar[List[str]] = ["andQuery", "displayNameQuery", "emailQuery", "firstNameQuery", "inUserEmailsQuery", "inUserIdsQuery", "lastNameQuery", "loginNameQuery", "nickNameQuery", "notQuery", "orQuery", "organizationIdQuery", "phoneQuery", "stateQuery", "typeQuery", "userNameQuery"] model_config = ConfigDict( populate_by_name=True, @@ -95,6 +96,54 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of and_query + if self.and_query: + _dict['andQuery'] = self.and_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of display_name_query + if self.display_name_query: + _dict['displayNameQuery'] = self.display_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of email_query + if self.email_query: + _dict['emailQuery'] = self.email_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of first_name_query + if self.first_name_query: + _dict['firstNameQuery'] = self.first_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of in_user_emails_query + if self.in_user_emails_query: + _dict['inUserEmailsQuery'] = self.in_user_emails_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of in_user_ids_query + if self.in_user_ids_query: + _dict['inUserIdsQuery'] = self.in_user_ids_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of last_name_query + if self.last_name_query: + _dict['lastNameQuery'] = self.last_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of login_name_query + if self.login_name_query: + _dict['loginNameQuery'] = self.login_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of nick_name_query + if self.nick_name_query: + _dict['nickNameQuery'] = self.nick_name_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of not_query + if self.not_query: + _dict['notQuery'] = self.not_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of or_query + if self.or_query: + _dict['orQuery'] = self.or_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of organization_id_query + if self.organization_id_query: + _dict['organizationIdQuery'] = self.organization_id_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of phone_query + if self.phone_query: + _dict['phoneQuery'] = self.phone_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of state_query + if self.state_query: + _dict['stateQuery'] = self.state_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of type_query + if self.type_query: + _dict['typeQuery'] = self.type_query.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_name_query + if self.user_name_query: + _dict['userNameQuery'] = self.user_name_query.to_dict() return _dict @classmethod @@ -107,22 +156,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userNameQuery": UserServiceUserNameQuery.from_dict(obj["userNameQuery"]) if obj.get("userNameQuery") is not None else None, - "firstNameQuery": UserServiceFirstNameQuery.from_dict(obj["firstNameQuery"]) if obj.get("firstNameQuery") is not None else None, - "lastNameQuery": UserServiceLastNameQuery.from_dict(obj["lastNameQuery"]) if obj.get("lastNameQuery") is not None else None, - "nickNameQuery": UserServiceNickNameQuery.from_dict(obj["nickNameQuery"]) if obj.get("nickNameQuery") is not None else None, + "andQuery": UserServiceAndQuery.from_dict(obj["andQuery"]) if obj.get("andQuery") is not None else None, "displayNameQuery": UserServiceDisplayNameQuery.from_dict(obj["displayNameQuery"]) if obj.get("displayNameQuery") is not None else None, "emailQuery": UserServiceEmailQuery.from_dict(obj["emailQuery"]) if obj.get("emailQuery") is not None else None, - "stateQuery": UserServiceStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None, - "typeQuery": UserServiceTypeQuery.from_dict(obj["typeQuery"]) if obj.get("typeQuery") is not None else None, - "loginNameQuery": UserServiceLoginNameQuery.from_dict(obj["loginNameQuery"]) if obj.get("loginNameQuery") is not None else None, + "firstNameQuery": UserServiceFirstNameQuery.from_dict(obj["firstNameQuery"]) if obj.get("firstNameQuery") is not None else None, + "inUserEmailsQuery": UserServiceInUserEmailsQuery.from_dict(obj["inUserEmailsQuery"]) if obj.get("inUserEmailsQuery") is not None else None, "inUserIdsQuery": UserServiceInUserIDQuery.from_dict(obj["inUserIdsQuery"]) if obj.get("inUserIdsQuery") is not None else None, - "orQuery": UserServiceOrQuery.from_dict(obj["orQuery"]) if obj.get("orQuery") is not None else None, - "andQuery": UserServiceAndQuery.from_dict(obj["andQuery"]) if obj.get("andQuery") is not None else None, + "lastNameQuery": UserServiceLastNameQuery.from_dict(obj["lastNameQuery"]) if obj.get("lastNameQuery") is not None else None, + "loginNameQuery": UserServiceLoginNameQuery.from_dict(obj["loginNameQuery"]) if obj.get("loginNameQuery") is not None else None, + "nickNameQuery": UserServiceNickNameQuery.from_dict(obj["nickNameQuery"]) if obj.get("nickNameQuery") is not None else None, "notQuery": UserServiceNotQuery.from_dict(obj["notQuery"]) if obj.get("notQuery") is not None else None, - "inUserEmailsQuery": UserServiceInUserEmailsQuery.from_dict(obj["inUserEmailsQuery"]) if obj.get("inUserEmailsQuery") is not None else None, + "orQuery": UserServiceOrQuery.from_dict(obj["orQuery"]) if obj.get("orQuery") is not None else None, "organizationIdQuery": UserServiceOrganizationIdQuery.from_dict(obj["organizationIdQuery"]) if obj.get("organizationIdQuery") is not None else None, - "phoneQuery": UserServicePhoneQuery.from_dict(obj["phoneQuery"]) if obj.get("phoneQuery") is not None else None + "phoneQuery": UserServicePhoneQuery.from_dict(obj["phoneQuery"]) if obj.get("phoneQuery") is not None else None, + "stateQuery": UserServiceStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None, + "typeQuery": UserServiceTypeQuery.from_dict(obj["typeQuery"]) if obj.get("typeQuery") is not None else None, + "userNameQuery": UserServiceUserNameQuery.from_dict(obj["userNameQuery"]) if obj.get("userNameQuery") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_send_email_code_request.py b/zitadel_client/models/user_service_send_email_code_request.py index b156f1aa..27e7c723 100644 --- a/zitadel_client/models/user_service_send_email_code_request.py +++ b/zitadel_client/models/user_service_send_email_code_request.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode from typing import Optional, Set from typing_extensions import Self @@ -27,8 +27,10 @@ class UserServiceSendEmailCodeRequest(BaseModel): """ UserServiceSendEmailCodeRequest """ # noqa: E501 - send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + user_id: StrictStr = Field(alias="userId") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod @@ -81,8 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") + "userId": obj.get("userId"), + "returnCode": obj.get("returnCode"), + "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_send_email_code_response.py b/zitadel_client/models/user_service_send_email_code_response.py index f0dc4ba2..92c201f1 100644 --- a/zitadel_client/models/user_service_send_email_code_response.py +++ b/zitadel_client/models/user_service_send_email_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class UserServiceSendEmailCodeResponse(BaseModel): UserServiceSendEmailCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_send_email_verification_code.py b/zitadel_client/models/user_service_send_email_verification_code.py index 65c6ad14..a526541a 100644 --- a/zitadel_client/models/user_service_send_email_verification_code.py +++ b/zitadel_client/models/user_service_send_email_verification_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class UserServiceSendEmailVerificationCode(BaseModel): """ UserServiceSendEmailVerificationCode """ # noqa: E501 - url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the verification mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + url_template: Optional[StrictStr] = Field(default=None, description="Optionally set a url_template, which will be used in the verification mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_send_invite_code.py b/zitadel_client/models/user_service_send_invite_code.py index 657f57f7..7f87554a 100644 --- a/zitadel_client/models/user_service_send_invite_code.py +++ b/zitadel_client/models/user_service_send_invite_code.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServiceSendInviteCode(BaseModel): """ UserServiceSendInviteCode """ # noqa: E501 - url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the invite mail sent by ZITADEL to guide the user to your invitation page. If no template is set and no previous code was created, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") - application_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set an application name, which will be used in the invite mail sent by ZITADEL. If no application name is set and no previous code was created, ZITADEL will be used as default.", alias="applicationName") + url_template: Optional[StrictStr] = Field(default=None, description="Optionally set a url_template, which will be used in the invite mail sent by ZITADEL to guide the user to your invitation page. If no template is set and no previous code was created, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + application_name: Optional[StrictStr] = Field(default=None, description="Optionally set an application name, which will be used in the invite mail sent by ZITADEL. If no application name is set and no previous code was created, ZITADEL will be used as default.", alias="applicationName") + __properties: ClassVar[List[str]] = ["urlTemplate", "applicationName"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +69,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + + # set to None if application_name (nullable) is None + # and model_fields_set contains the field + if self.application_name is None and "application_name" in self.model_fields_set: + _dict['applicationName'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_send_passkey_registration_link.py b/zitadel_client/models/user_service_send_passkey_registration_link.py index c1a9e4e9..bb337b1c 100644 --- a/zitadel_client/models/user_service_send_passkey_registration_link.py +++ b/zitadel_client/models/user_service_send_passkey_registration_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,8 @@ class UserServiceSendPasskeyRegistrationLink(BaseModel): """ UserServiceSendPasskeyRegistrationLink """ # noqa: E501 - url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your passkey registration page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, CodeID, Code", alias="urlTemplate") + url_template: Optional[StrictStr] = Field(default=None, description="Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your passkey registration page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, CodeID, Code", alias="urlTemplate") + __properties: ClassVar[List[str]] = ["urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_send_password_reset_link.py b/zitadel_client/models/user_service_send_password_reset_link.py index f720b783..182d3cd2 100644 --- a/zitadel_client/models/user_service_send_password_reset_link.py +++ b/zitadel_client/models/user_service_send_password_reset_link.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_notification_type import UserServiceNotificationType from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceSendPasswordResetLink(BaseModel): """ UserServiceSendPasswordResetLink """ # noqa: E501 - notification_type: Optional[UserServiceNotificationType] = Field(default=UserServiceNotificationType.NOTIFICATION_TYPE_UNSPECIFIED, alias="notificationType") - url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the password reset mail sent by ZITADEL to guide the user to your password change page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + notification_type: Optional[UserServiceNotificationType] = Field(default=None, alias="notificationType") + url_template: Optional[StrictStr] = Field(default=None, description="Optionally set a url_template, which will be used in the password reset mail sent by ZITADEL to guide the user to your password change page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + __properties: ClassVar[List[str]] = ["notificationType", "urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if url_template (nullable) is None + # and model_fields_set contains the field + if self.url_template is None and "url_template" in self.model_fields_set: + _dict['urlTemplate'] = None + return _dict @classmethod @@ -82,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "notificationType": obj.get("notificationType") if obj.get("notificationType") is not None else UserServiceNotificationType.NOTIFICATION_TYPE_UNSPECIFIED, + "notificationType": obj.get("notificationType"), "urlTemplate": obj.get("urlTemplate") }) return _obj diff --git a/zitadel_client/models/user_service_set_email_request.py b/zitadel_client/models/user_service_set_email_request.py index 73ffb7f8..d3436f24 100644 --- a/zitadel_client/models/user_service_set_email_request.py +++ b/zitadel_client/models/user_service_set_email_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode from typing import Optional, Set from typing_extensions import Self @@ -28,10 +27,12 @@ class UserServiceSetEmailRequest(BaseModel): """ UserServiceSetEmailRequest """ # noqa: E501 - email: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + user_id: StrictStr = Field(alias="userId") + email: StrictStr is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "email", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod @@ -84,10 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "email": obj.get("email"), - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, + "isVerified": obj.get("isVerified"), "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") + "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_set_email_response.py b/zitadel_client/models/user_service_set_email_response.py index 5e838779..93120c05 100644 --- a/zitadel_client/models/user_service_set_email_response.py +++ b/zitadel_client/models/user_service_set_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class UserServiceSetEmailResponse(BaseModel): UserServiceSetEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_set_human_email.py b/zitadel_client/models/user_service_set_human_email.py index b556de16..7d0eed24 100644 --- a/zitadel_client/models/user_service_set_human_email.py +++ b/zitadel_client/models/user_service_set_human_email.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_send_email_verification_code import UserServiceSendEmailVerificationCode from typing import Optional, Set from typing_extensions import Self @@ -28,10 +27,11 @@ class UserServiceSetHumanEmail(BaseModel): """ UserServiceSetHumanEmail """ # noqa: E501 - email: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + email: StrictStr is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["email", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of send_code + if self.send_code: + _dict['sendCode'] = self.send_code.to_dict() return _dict @classmethod @@ -85,9 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "email": obj.get("email"), - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, + "isVerified": obj.get("isVerified"), "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") + "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_set_human_phone.py b/zitadel_client/models/user_service_set_human_phone.py index c24484f4..0d01245b 100644 --- a/zitadel_client/models/user_service_set_human_phone.py +++ b/zitadel_client/models/user_service_set_human_phone.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +26,11 @@ class UserServiceSetHumanPhone(BaseModel): """ UserServiceSetHumanPhone """ # noqa: E501 - phone: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None - send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + phone: Optional[StrictStr] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["phone", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -84,9 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), + "isVerified": obj.get("isVerified"), "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") + "sendCode": obj.get("sendCode") }) return _obj diff --git a/zitadel_client/models/user_service_set_human_profile.py b/zitadel_client/models/user_service_set_human_profile.py index 7da0a092..a3586faf 100644 --- a/zitadel_client/models/user_service_set_human_profile.py +++ b/zitadel_client/models/user_service_set_human_profile.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_gender import UserServiceGender from typing import Optional, Set from typing_extensions import Self @@ -28,12 +27,13 @@ class UserServiceSetHumanProfile(BaseModel): """ UserServiceSetHumanProfile """ # noqa: E501 - given_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="givenName") - family_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="familyName") - nick_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="nickName") - display_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="displayName") - preferred_language: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, alias="preferredLanguage") - gender: Optional[UserServiceGender] = UserServiceGender.GENDER_UNSPECIFIED + given_name: StrictStr = Field(alias="givenName") + family_name: StrictStr = Field(alias="familyName") + nick_name: Optional[StrictStr] = Field(default=None, alias="nickName") + display_name: Optional[StrictStr] = Field(default=None, alias="displayName") + preferred_language: Optional[StrictStr] = Field(default=None, alias="preferredLanguage") + gender: Optional[UserServiceGender] = None + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +74,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict['nickName'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['displayName'] = None + + # set to None if preferred_language (nullable) is None + # and model_fields_set contains the field + if self.preferred_language is None and "preferred_language" in self.model_fields_set: + _dict['preferredLanguage'] = None + return _dict @classmethod @@ -91,7 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nickName": obj.get("nickName"), "displayName": obj.get("displayName"), "preferredLanguage": obj.get("preferredLanguage"), - "gender": obj.get("gender") if obj.get("gender") is not None else UserServiceGender.GENDER_UNSPECIFIED + "gender": obj.get("gender") }) return _obj diff --git a/zitadel_client/models/user_service_set_metadata_entry.py b/zitadel_client/models/user_service_set_metadata_entry.py index 259dfba1..fef2f281 100644 --- a/zitadel_client/models/user_service_set_metadata_entry.py +++ b/zitadel_client/models/user_service_set_metadata_entry.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Union -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, Union from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,9 @@ class UserServiceSetMetadataEntry(BaseModel): """ UserServiceSetMetadataEntry """ # noqa: E501 - key: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - value: Union[Annotated[bytes, Field(min_length=1, strict=True, max_length=500000)], Annotated[str, Field(min_length=1, strict=True, max_length=500000)]] = Field(description="The value has to be base64 encoded.") + key: StrictStr + value: Union[StrictBytes, StrictStr] + __properties: ClassVar[List[str]] = ["key", "value"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_set_password.py b/zitadel_client/models/user_service_set_password.py index 7f88c236..75402c60 100644 --- a/zitadel_client/models/user_service_set_password.py +++ b/zitadel_client/models/user_service_set_password.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_hashed_password import UserServiceHashedPassword from zitadel_client.models.user_service_password import UserServicePassword from typing import Optional, Set @@ -29,10 +28,11 @@ class UserServiceSetPassword(BaseModel): """ UserServiceSetPassword """ # noqa: E501 - password: Optional[UserServicePassword] = None hashed_password: Optional[UserServiceHashedPassword] = Field(default=None, alias="hashedPassword") - current_password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="currentPassword") - verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during password reset request\"", alias="verificationCode") + password: Optional[UserServicePassword] = None + current_password: Optional[StrictStr] = Field(default=None, alias="currentPassword") + verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + __properties: ClassVar[List[str]] = ["hashedPassword", "password", "currentPassword", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +73,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of hashed_password + if self.hashed_password: + _dict['hashedPassword'] = self.hashed_password.to_dict() + # override the default output from pydantic by calling `to_dict()` of password + if self.password: + _dict['password'] = self.password.to_dict() return _dict @classmethod @@ -85,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, "hashedPassword": UserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, + "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, "currentPassword": obj.get("currentPassword"), "verificationCode": obj.get("verificationCode") }) diff --git a/zitadel_client/models/user_service_set_password_request.py b/zitadel_client/models/user_service_set_password_request.py index 0c6dc3a4..f211c77a 100644 --- a/zitadel_client/models/user_service_set_password_request.py +++ b/zitadel_client/models/user_service_set_password_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_password import UserServicePassword from typing import Optional, Set from typing_extensions import Self @@ -28,9 +27,11 @@ class UserServiceSetPasswordRequest(BaseModel): """ UserServiceSetPasswordRequest """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") new_password: Optional[UserServicePassword] = Field(default=None, alias="newPassword") - current_password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="currentPassword") - verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during password reset request\"", alias="verificationCode") + current_password: Optional[StrictStr] = Field(default=None, alias="currentPassword") + verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + __properties: ClassVar[List[str]] = ["userId", "newPassword", "currentPassword", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of new_password + if self.new_password: + _dict['newPassword'] = self.new_password.to_dict() return _dict @classmethod @@ -83,6 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "newPassword": UserServicePassword.from_dict(obj["newPassword"]) if obj.get("newPassword") is not None else None, "currentPassword": obj.get("currentPassword"), "verificationCode": obj.get("verificationCode") diff --git a/zitadel_client/models/user_service_set_password_response.py b/zitadel_client/models/user_service_set_password_response.py index 4399d060..d65b5a38 100644 --- a/zitadel_client/models/user_service_set_password_response.py +++ b/zitadel_client/models/user_service_set_password_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceSetPasswordResponse(BaseModel): UserServiceSetPasswordResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_set_phone_request.py b/zitadel_client/models/user_service_set_phone_request.py index c9620f94..d9b2b006 100644 --- a/zitadel_client/models/user_service_set_phone_request.py +++ b/zitadel_client/models/user_service_set_phone_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,10 +26,12 @@ class UserServiceSetPhoneRequest(BaseModel): """ UserServiceSetPhoneRequest """ # noqa: E501 - phone: Annotated[str, Field(min_length=1, strict=True, max_length=200)] - send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") - return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + user_id: StrictStr = Field(alias="userId") + phone: StrictStr is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") + __properties: ClassVar[List[str]] = ["userId", "phone", "isVerified", "returnCode", "sendCode"] model_config = ConfigDict( populate_by_name=True, @@ -83,10 +84,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), + "isVerified": obj.get("isVerified"), "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") + "sendCode": obj.get("sendCode") }) return _obj diff --git a/zitadel_client/models/user_service_set_phone_response.py b/zitadel_client/models/user_service_set_phone_response.py index fb4d58ac..8372ed1e 100644 --- a/zitadel_client/models/user_service_set_phone_response.py +++ b/zitadel_client/models/user_service_set_phone_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class UserServiceSetPhoneResponse(BaseModel): UserServiceSetPhoneResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + verification_code: Optional[StrictStr] = Field(default=None, description="in case the verification was set to return_code, the code will be returned", alias="verificationCode") + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if verification_code (nullable) is None + # and model_fields_set contains the field + if self.verification_code is None and "verification_code" in self.model_fields_set: + _dict['verificationCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_set_user_metadata_request.py b/zitadel_client/models/user_service_set_user_metadata_request.py new file mode 100644 index 00000000..831be55c --- /dev/null +++ b/zitadel_client/models/user_service_set_user_metadata_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.user_service_metadata import UserServiceMetadata +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceSetUserMetadataRequest(BaseModel): + """ + UserServiceSetUserMetadataRequest + """ # noqa: E501 + user_id: StrictStr = Field(description="ID of the user under which the metadata gets set.", alias="userId") + metadata: Optional[List[UserServiceMetadata]] = Field(default=None, description="Metadata to bet set. The values have to be base64 encoded.") + __properties: ClassVar[List[str]] = ["userId", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceSetUserMetadataRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item_metadata in self.metadata: + if _item_metadata: + _items.append(_item_metadata.to_dict()) + _dict['metadata'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceSetUserMetadataRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "metadata": [UserServiceMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_set_user_metadata_response.py b/zitadel_client/models/user_service_set_user_metadata_response.py new file mode 100644 index 00000000..d1298746 --- /dev/null +++ b/zitadel_client/models/user_service_set_user_metadata_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceSetUserMetadataResponse(BaseModel): + """ + UserServiceSetUserMetadataResponse + """ # noqa: E501 + set_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="setDate") + __properties: ClassVar[List[str]] = ["setDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceSetUserMetadataResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceSetUserMetadataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "setDate": obj.get("setDate") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_start_identity_provider_intent_request.py b/zitadel_client/models/user_service_start_identity_provider_intent_request.py index 862c36f4..eb7c3a50 100644 --- a/zitadel_client/models/user_service_start_identity_provider_intent_request.py +++ b/zitadel_client/models/user_service_start_identity_provider_intent_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_ldap_credentials import UserServiceLDAPCredentials from zitadel_client.models.user_service_redirect_urls import UserServiceRedirectURLs from typing import Optional, Set @@ -29,9 +28,10 @@ class UserServiceStartIdentityProviderIntentRequest(BaseModel): """ UserServiceStartIdentityProviderIntentRequest """ # noqa: E501 - idp_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID for existing identity provider", alias="idpId") - urls: Optional[UserServiceRedirectURLs] = None + idp_id: Optional[StrictStr] = Field(default=None, alias="idpId") ldap: Optional[UserServiceLDAPCredentials] = None + urls: Optional[UserServiceRedirectURLs] = None + __properties: ClassVar[List[str]] = ["idpId", "ldap", "urls"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +72,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of ldap + if self.ldap: + _dict['ldap'] = self.ldap.to_dict() + # override the default output from pydantic by calling `to_dict()` of urls + if self.urls: + _dict['urls'] = self.urls.to_dict() return _dict @classmethod @@ -85,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "idpId": obj.get("idpId"), - "urls": UserServiceRedirectURLs.from_dict(obj["urls"]) if obj.get("urls") is not None else None, - "ldap": UserServiceLDAPCredentials.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None + "ldap": UserServiceLDAPCredentials.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, + "urls": UserServiceRedirectURLs.from_dict(obj["urls"]) if obj.get("urls") is not None else None }) return _obj diff --git a/zitadel_client/models/user_service_start_identity_provider_intent_response.py b/zitadel_client/models/user_service_start_identity_provider_intent_response.py index eebf2021..3409d512 100644 --- a/zitadel_client/models/user_service_start_identity_provider_intent_response.py +++ b/zitadel_client/models/user_service_start_identity_provider_intent_response.py @@ -18,8 +18,9 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, Optional, Union from zitadel_client.models.user_service_details import UserServiceDetails +from zitadel_client.models.user_service_form_data import UserServiceFormData from zitadel_client.models.user_service_idp_intent import UserServiceIDPIntent from typing import Optional, Set from typing_extensions import Self @@ -29,9 +30,11 @@ class UserServiceStartIdentityProviderIntentResponse(BaseModel): UserServiceStartIdentityProviderIntentResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None - auth_url: Optional[StrictStr] = Field(default=None, description="URL to which the client should redirect", alias="authUrl") + auth_url: Optional[StrictStr] = Field(default=None, alias="authUrl") + form_data: Optional[UserServiceFormData] = Field(default=None, alias="formData") idp_intent: Optional[UserServiceIDPIntent] = Field(default=None, alias="idpIntent") - post_form: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="POST call information", alias="postForm") + post_form: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="POST call information Deprecated: Use form_data instead", alias="postForm") + __properties: ClassVar[List[str]] = ["details", "authUrl", "formData", "idpIntent", "postForm"] model_config = ConfigDict( populate_by_name=True, @@ -72,6 +75,15 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of form_data + if self.form_data: + _dict['formData'] = self.form_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of idp_intent + if self.idp_intent: + _dict['idpIntent'] = self.idp_intent.to_dict() return _dict @classmethod @@ -86,6 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "authUrl": obj.get("authUrl"), + "formData": UserServiceFormData.from_dict(obj["formData"]) if obj.get("formData") is not None else None, "idpIntent": UserServiceIDPIntent.from_dict(obj["idpIntent"]) if obj.get("idpIntent") is not None else None, "postForm": obj.get("postForm") }) diff --git a/zitadel_client/models/user_service_state_query.py b/zitadel_client/models/user_service_state_query.py index bee9785f..43f68354 100644 --- a/zitadel_client/models/user_service_state_query.py +++ b/zitadel_client/models/user_service_state_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from zitadel_client.models.user_service_user_state import UserServiceUserState from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceStateQuery(BaseModel): Query for users with a specific state. """ # noqa: E501 state: UserServiceUserState + __properties: ClassVar[List[str]] = ["state"] model_config = ConfigDict( populate_by_name=True, @@ -80,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "state": obj.get("state") if obj.get("state") is not None else UserServiceUserState.USER_STATE_UNSPECIFIED + "state": obj.get("state") }) return _obj diff --git a/zitadel_client/models/user_service_text_filter_method.py b/zitadel_client/models/user_service_text_filter_method.py new file mode 100644 index 00000000..fa82bcd4 --- /dev/null +++ b/zitadel_client/models/user_service_text_filter_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserServiceTextFilterMethod(str, Enum): + """ + UserServiceTextFilterMethod + """ + + """ + allowed enum values + """ + TEXT_FILTER_METHOD_EQUALS = 'TEXT_FILTER_METHOD_EQUALS' + TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE = 'TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE' + TEXT_FILTER_METHOD_STARTS_WITH = 'TEXT_FILTER_METHOD_STARTS_WITH' + TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_FILTER_METHOD_CONTAINS = 'TEXT_FILTER_METHOD_CONTAINS' + TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE' + TEXT_FILTER_METHOD_ENDS_WITH = 'TEXT_FILTER_METHOD_ENDS_WITH' + TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserServiceTextFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/user_service_timestamp_filter.py b/zitadel_client/models/user_service_timestamp_filter.py new file mode 100644 index 00000000..d30d1501 --- /dev/null +++ b/zitadel_client/models/user_service_timestamp_filter.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_timestamp_filter_method import UserServiceTimestampFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceTimestampFilter(BaseModel): + """ + UserServiceTimestampFilter + """ # noqa: E501 + timestamp: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.") + method: Optional[UserServiceTimestampFilterMethod] = None + __properties: ClassVar[List[str]] = ["timestamp", "method"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceTimestampFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceTimestampFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "method": obj.get("method") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_timestamp_filter_method.py b/zitadel_client/models/user_service_timestamp_filter_method.py new file mode 100644 index 00000000..c7100e8e --- /dev/null +++ b/zitadel_client/models/user_service_timestamp_filter_method.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class UserServiceTimestampFilterMethod(str, Enum): + """ + UserServiceTimestampFilterMethod + """ + + """ + allowed enum values + """ + TIMESTAMP_FILTER_METHOD_EQUALS = 'TIMESTAMP_FILTER_METHOD_EQUALS' + TIMESTAMP_FILTER_METHOD_AFTER = 'TIMESTAMP_FILTER_METHOD_AFTER' + TIMESTAMP_FILTER_METHOD_AFTER_OR_EQUALS = 'TIMESTAMP_FILTER_METHOD_AFTER_OR_EQUALS' + TIMESTAMP_FILTER_METHOD_BEFORE = 'TIMESTAMP_FILTER_METHOD_BEFORE' + TIMESTAMP_FILTER_METHOD_BEFORE_OR_EQUALS = 'TIMESTAMP_FILTER_METHOD_BEFORE_OR_EQUALS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UserServiceTimestampFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/user_service_type_query.py b/zitadel_client/models/user_service_type_query.py index 822503ef..fa511de3 100644 --- a/zitadel_client/models/user_service_type_query.py +++ b/zitadel_client/models/user_service_type_query.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from zitadel_client.models.user_service_type import UserServiceType from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceTypeQuery(BaseModel): Query for users with a specific type. """ # noqa: E501 type: UserServiceType + __properties: ClassVar[List[str]] = ["type"] model_config = ConfigDict( populate_by_name=True, @@ -80,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else UserServiceType.TYPE_UNSPECIFIED + "type": obj.get("type") }) return _obj diff --git a/zitadel_client/models/user_service_unlock_user_request.py b/zitadel_client/models/user_service_unlock_user_request.py new file mode 100644 index 00000000..cee2f6d6 --- /dev/null +++ b/zitadel_client/models/user_service_unlock_user_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceUnlockUserRequest(BaseModel): + """ + UserServiceUnlockUserRequest + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") + __properties: ClassVar[List[str]] = ["userId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceUnlockUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceUnlockUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_unlock_user_response.py b/zitadel_client/models/user_service_unlock_user_response.py index 70da444e..7d87502d 100644 --- a/zitadel_client/models/user_service_unlock_user_response.py +++ b/zitadel_client/models/user_service_unlock_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceUnlockUserResponse(BaseModel): UserServiceUnlockUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_update_human_user_request.py b/zitadel_client/models/user_service_update_human_user_request.py index 6327a7aa..ced387aa 100644 --- a/zitadel_client/models/user_service_update_human_user_request.py +++ b/zitadel_client/models/user_service_update_human_user_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_set_human_email import UserServiceSetHumanEmail from zitadel_client.models.user_service_set_human_phone import UserServiceSetHumanPhone from zitadel_client.models.user_service_set_human_profile import UserServiceSetHumanProfile @@ -31,11 +30,13 @@ class UserServiceUpdateHumanUserRequest(BaseModel): """ UserServiceUpdateHumanUserRequest """ # noqa: E501 - username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + username: Optional[StrictStr] = None profile: Optional[UserServiceSetHumanProfile] = None email: Optional[UserServiceSetHumanEmail] = None phone: Optional[UserServiceSetHumanPhone] = None password: Optional[UserServiceSetPassword] = None + __properties: ClassVar[List[str]] = ["userId", "username", "profile", "email", "phone", "password"] model_config = ConfigDict( populate_by_name=True, @@ -88,6 +89,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of password if self.password: _dict['password'] = self.password.to_dict() + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + return _dict @classmethod @@ -100,6 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "username": obj.get("username"), "profile": UserServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, "email": UserServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, diff --git a/zitadel_client/models/user_service_update_human_user_response.py b/zitadel_client/models/user_service_update_human_user_response.py index 8c946ab6..380537f3 100644 --- a/zitadel_client/models/user_service_update_human_user_response.py +++ b/zitadel_client/models/user_service_update_human_user_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -30,6 +30,7 @@ class UserServiceUpdateHumanUserResponse(BaseModel): details: Optional[UserServiceDetails] = None email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + __properties: ClassVar[List[str]] = ["details", "emailCode", "phoneCode"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +74,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + return _dict @classmethod diff --git a/zitadel_client/models/user_service_update_user_request.py b/zitadel_client/models/user_service_update_user_request.py new file mode 100644 index 00000000..2d8c987e --- /dev/null +++ b/zitadel_client/models/user_service_update_user_request.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.user_service_human import UserServiceHuman +from zitadel_client.models.user_service_machine import UserServiceMachine +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceUpdateUserRequest(BaseModel): + """ + UserServiceUpdateUserRequest + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The user id is the users unique identifier in the instance. It can't be changed.", alias="userId") + username: Optional[StrictStr] = Field(default=None, description="Set a new username that is unique within the instance. Beware that active tokens and sessions are invalidated when the username is changed.") + human: Optional[UserServiceHuman] = None + machine: Optional[UserServiceMachine] = None + __properties: ClassVar[List[str]] = ["userId", "username", "human", "machine"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceUpdateUserRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + # override the default output from pydantic by calling `to_dict()` of machine + if self.machine: + _dict['machine'] = self.machine.to_dict() + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceUpdateUserRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "username": obj.get("username"), + "human": UserServiceHuman.from_dict(obj["human"]) if obj.get("human") is not None else None, + "machine": UserServiceMachine.from_dict(obj["machine"]) if obj.get("machine") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/user_service_update_user_response.py b/zitadel_client/models/user_service_update_user_response.py new file mode 100644 index 00000000..741d90f1 --- /dev/null +++ b/zitadel_client/models/user_service_update_user_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserServiceUpdateUserResponse(BaseModel): + """ + UserServiceUpdateUserResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + email_code: Optional[StrictStr] = Field(default=None, description="In case the email verification was set to return_code, the code will be returned", alias="emailCode") + phone_code: Optional[StrictStr] = Field(default=None, description="In case the phone verification was set to return_code, the code will be returned", alias="phoneCode") + __properties: ClassVar[List[str]] = ["changeDate", "emailCode", "phoneCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserServiceUpdateUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email_code (nullable) is None + # and model_fields_set contains the field + if self.email_code is None and "email_code" in self.model_fields_set: + _dict['emailCode'] = None + + # set to None if phone_code (nullable) is None + # and model_fields_set contains the field + if self.phone_code is None and "phone_code" in self.model_fields_set: + _dict['phoneCode'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserServiceUpdateUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate"), + "emailCode": obj.get("emailCode"), + "phoneCode": obj.get("phoneCode") + }) + return _obj + + diff --git a/zitadel_client/models/user_service_user.py b/zitadel_client/models/user_service_user.py index c48f1712..34af4ee9 100644 --- a/zitadel_client/models/user_service_user.py +++ b/zitadel_client/models/user_service_user.py @@ -32,12 +32,13 @@ class UserServiceUser(BaseModel): """ # noqa: E501 user_id: Optional[StrictStr] = Field(default=None, alias="userId") details: Optional[UserServiceDetails] = None - state: Optional[UserServiceUserState] = UserServiceUserState.USER_STATE_UNSPECIFIED + state: Optional[UserServiceUserState] = None username: Optional[StrictStr] = None login_names: Optional[List[StrictStr]] = Field(default=None, alias="loginNames") preferred_login_name: Optional[StrictStr] = Field(default=None, alias="preferredLoginName") human: Optional[UserServiceHumanUser] = None machine: Optional[UserServiceMachineUser] = None + __properties: ClassVar[List[str]] = ["userId", "details", "state", "username", "loginNames", "preferredLoginName", "human", "machine"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +79,15 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # override the default output from pydantic by calling `to_dict()` of human + if self.human: + _dict['human'] = self.human.to_dict() + # override the default output from pydantic by calling `to_dict()` of machine + if self.machine: + _dict['machine'] = self.machine.to_dict() return _dict @classmethod @@ -92,7 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userId": obj.get("userId"), "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "state": obj.get("state") if obj.get("state") is not None else UserServiceUserState.USER_STATE_UNSPECIFIED, + "state": obj.get("state"), "username": obj.get("username"), "loginNames": obj.get("loginNames"), "preferredLoginName": obj.get("preferredLoginName"), diff --git a/zitadel_client/models/user_service_user_name_query.py b/zitadel_client/models/user_service_user_name_query.py index 59f5f161..71498ab7 100644 --- a/zitadel_client/models/user_service_user_name_query.py +++ b/zitadel_client/models/user_service_user_name_query.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_text_query_method import UserServiceTextQueryMethod from typing import Optional, Set from typing_extensions import Self @@ -28,8 +27,9 @@ class UserServiceUserNameQuery(BaseModel): """ Query for users with a specific user name. """ # noqa: E501 - user_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="userName") - method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + user_name: StrictStr = Field(alias="userName") + method: Optional[UserServiceTextQueryMethod] = None + __properties: ClassVar[List[str]] = ["userName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userName": obj.get("userName"), - "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + "method": obj.get("method") }) return _obj diff --git a/zitadel_client/models/user_service_verify_email_request.py b/zitadel_client/models/user_service_verify_email_request.py index 44e368eb..e0d2c47d 100644 --- a/zitadel_client/models/user_service_verify_email_request.py +++ b/zitadel_client/models/user_service_verify_email_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,9 @@ class UserServiceVerifyEmailRequest(BaseModel): """ UserServiceVerifyEmailRequest """ # noqa: E501 - verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during the set email request\"", alias="verificationCode") + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") + __properties: ClassVar[List[str]] = ["userId", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -80,6 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "verificationCode": obj.get("verificationCode") }) return _obj diff --git a/zitadel_client/models/user_service_verify_email_response.py b/zitadel_client/models/user_service_verify_email_response.py index e151bb2e..685dc0e5 100644 --- a/zitadel_client/models/user_service_verify_email_response.py +++ b/zitadel_client/models/user_service_verify_email_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceVerifyEmailResponse(BaseModel): UserServiceVerifyEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_verify_invite_code_request.py b/zitadel_client/models/user_service_verify_invite_code_request.py index ae071c25..5bc7010c 100644 --- a/zitadel_client/models/user_service_verify_invite_code_request.py +++ b/zitadel_client/models/user_service_verify_invite_code_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,9 @@ class UserServiceVerifyInviteCodeRequest(BaseModel): """ UserServiceVerifyInviteCodeRequest """ # noqa: E501 - verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during the invite code request\"", alias="verificationCode") + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") + __properties: ClassVar[List[str]] = ["userId", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -80,6 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "verificationCode": obj.get("verificationCode") }) return _obj diff --git a/zitadel_client/models/user_service_verify_invite_code_response.py b/zitadel_client/models/user_service_verify_invite_code_response.py index d25e0814..a7a9c4b4 100644 --- a/zitadel_client/models/user_service_verify_invite_code_response.py +++ b/zitadel_client/models/user_service_verify_invite_code_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceVerifyInviteCodeResponse(BaseModel): UserServiceVerifyInviteCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_verify_passkey_registration_request.py b/zitadel_client/models/user_service_verify_passkey_registration_request.py index c0526cfe..ae71807c 100644 --- a/zitadel_client/models/user_service_verify_passkey_registration_request.py +++ b/zitadel_client/models/user_service_verify_passkey_registration_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,11 @@ class UserServiceVerifyPasskeyRegistrationRequest(BaseModel): """ UserServiceVerifyPasskeyRegistrationRequest """ # noqa: E501 - public_key_credential: Dict[str, Any] = Field(description="PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential", alias="publicKeyCredential") - passkey_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="passkeyName") + user_id: StrictStr = Field(alias="userId") + passkey_id: StrictStr = Field(alias="passkeyId") + public_key_credential: Dict[str, Any] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + passkey_name: StrictStr = Field(alias="passkeyName") + __properties: ClassVar[List[str]] = ["userId", "passkeyId", "publicKeyCredential", "passkeyName"] model_config = ConfigDict( populate_by_name=True, @@ -81,6 +83,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), + "passkeyId": obj.get("passkeyId"), "publicKeyCredential": obj.get("publicKeyCredential"), "passkeyName": obj.get("passkeyName") }) diff --git a/zitadel_client/models/user_service_verify_passkey_registration_response.py b/zitadel_client/models/user_service_verify_passkey_registration_response.py index b9cfd53d..1d02a4df 100644 --- a/zitadel_client/models/user_service_verify_passkey_registration_response.py +++ b/zitadel_client/models/user_service_verify_passkey_registration_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceVerifyPasskeyRegistrationResponse(BaseModel): UserServiceVerifyPasskeyRegistrationResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_verify_phone_request.py b/zitadel_client/models/user_service_verify_phone_request.py index 3c4a798d..9b73b0f5 100644 --- a/zitadel_client/models/user_service_verify_phone_request.py +++ b/zitadel_client/models/user_service_verify_phone_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,9 @@ class UserServiceVerifyPhoneRequest(BaseModel): """ UserServiceVerifyPhoneRequest """ # noqa: E501 - verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during the set phone request\"", alias="verificationCode") + user_id: StrictStr = Field(alias="userId") + verification_code: StrictStr = Field(alias="verificationCode") + __properties: ClassVar[List[str]] = ["userId", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -80,6 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "verificationCode": obj.get("verificationCode") }) return _obj diff --git a/zitadel_client/models/user_service_verify_phone_response.py b/zitadel_client/models/user_service_verify_phone_response.py index a0e91052..6d1fecbb 100644 --- a/zitadel_client/models/user_service_verify_phone_response.py +++ b/zitadel_client/models/user_service_verify_phone_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceVerifyPhoneResponse(BaseModel): UserServiceVerifyPhoneResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_verify_totp_registration_request.py b/zitadel_client/models/user_service_verify_totp_registration_request.py index e9e2731c..f63810b3 100644 --- a/zitadel_client/models/user_service_verify_totp_registration_request.py +++ b/zitadel_client/models/user_service_verify_totp_registration_request.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,9 @@ class UserServiceVerifyTOTPRegistrationRequest(BaseModel): """ UserServiceVerifyTOTPRegistrationRequest """ # noqa: E501 - code: StrictStr = Field(description="Code generated by TOTP app or device") + user_id: StrictStr = Field(alias="userId") + code: StrictStr + __properties: ClassVar[List[str]] = ["userId", "code"] model_config = ConfigDict( populate_by_name=True, @@ -79,6 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), "code": obj.get("code") }) return _obj diff --git a/zitadel_client/models/user_service_verify_totp_registration_response.py b/zitadel_client/models/user_service_verify_totp_registration_response.py index 65245d50..dee98177 100644 --- a/zitadel_client/models/user_service_verify_totp_registration_response.py +++ b/zitadel_client/models/user_service_verify_totp_registration_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceVerifyTOTPRegistrationResponse(BaseModel): UserServiceVerifyTOTPRegistrationResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/user_service_verify_u2_f_registration_request.py b/zitadel_client/models/user_service_verify_u2_f_registration_request.py index bc215227..49cba98e 100644 --- a/zitadel_client/models/user_service_verify_u2_f_registration_request.py +++ b/zitadel_client/models/user_service_verify_u2_f_registration_request.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict from typing import Optional, Set from typing_extensions import Self @@ -27,8 +26,11 @@ class UserServiceVerifyU2FRegistrationRequest(BaseModel): """ UserServiceVerifyU2FRegistrationRequest """ # noqa: E501 - public_key_credential: Dict[str, Any] = Field(description="PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential", alias="publicKeyCredential") - token_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="tokenName") + user_id: StrictStr = Field(alias="userId") + u2f_id: StrictStr = Field(alias="u2fId") + public_key_credential: Dict[str, Any] = Field(description="`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language. The JSON representation for `Struct` is JSON object.", alias="publicKeyCredential") + token_name: StrictStr = Field(alias="tokenName") + __properties: ClassVar[List[str]] = ["userId", "u2fId", "publicKeyCredential", "tokenName"] model_config = ConfigDict( populate_by_name=True, @@ -81,6 +83,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "userId": obj.get("userId"), + "u2fId": obj.get("u2fId"), "publicKeyCredential": obj.get("publicKeyCredential"), "tokenName": obj.get("tokenName") }) diff --git a/zitadel_client/models/user_service_verify_u2_f_registration_response.py b/zitadel_client/models/user_service_verify_u2_f_registration_response.py index b41cd7e2..62fdc59e 100644 --- a/zitadel_client/models/user_service_verify_u2_f_registration_response.py +++ b/zitadel_client/models/user_service_verify_u2_f_registration_response.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, Optional from zitadel_client.models.user_service_details import UserServiceDetails from typing import Optional, Set from typing_extensions import Self @@ -28,6 +28,7 @@ class UserServiceVerifyU2FRegistrationResponse(BaseModel): UserServiceVerifyU2FRegistrationResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, diff --git a/zitadel_client/models/web_key_service_activate_web_key_request.py b/zitadel_client/models/web_key_service_activate_web_key_request.py new file mode 100644 index 00000000..79b7123f --- /dev/null +++ b/zitadel_client/models/web_key_service_activate_web_key_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceActivateWebKeyRequest(BaseModel): + """ + WebKeyServiceActivateWebKeyRequest + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceActivateWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceActivateWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_activate_web_key_response.py b/zitadel_client/models/web_key_service_activate_web_key_response.py new file mode 100644 index 00000000..b6918095 --- /dev/null +++ b/zitadel_client/models/web_key_service_activate_web_key_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceActivateWebKeyResponse(BaseModel): + """ + WebKeyServiceActivateWebKeyResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + __properties: ClassVar[List[str]] = ["changeDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceActivateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceActivateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_any.py b/zitadel_client/models/web_key_service_any.py new file mode 100644 index 00000000..5368be91 --- /dev/null +++ b/zitadel_client/models/web_key_service_any.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/web_key_service_connect_error.py b/zitadel_client/models/web_key_service_connect_error.py new file mode 100644 index 00000000..6125d40b --- /dev/null +++ b/zitadel_client/models/web_key_service_connect_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_any import WebKeyServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[WebKeyServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceConnectError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceConnectError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "detail": WebKeyServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/web_key_service_create_web_key_request.py b/zitadel_client/models/web_key_service_create_web_key_request.py index 0e416a5b..7f3c440e 100644 --- a/zitadel_client/models/web_key_service_create_web_key_request.py +++ b/zitadel_client/models/web_key_service_create_web_key_request.py @@ -18,9 +18,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA -from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.web_key_service_ecdsa import WebKeyServiceECDSA +from zitadel_client.models.web_key_service_rsa import WebKeyServiceRSA from typing import Optional, Set from typing_extensions import Self @@ -28,9 +28,10 @@ class WebKeyServiceCreateWebKeyRequest(BaseModel): """ WebKeyServiceCreateWebKeyRequest """ # noqa: E501 - rsa: Optional[WebKeyServiceBetaRSA] = None - ecdsa: Optional[WebKeyServiceBetaECDSA] = None + ecdsa: Optional[WebKeyServiceECDSA] = None ed25519: Optional[Dict[str, Any]] = None + rsa: Optional[WebKeyServiceRSA] = None + __properties: ClassVar[List[str]] = ["ecdsa", "ed25519", "rsa"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +72,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of ecdsa + if self.ecdsa: + _dict['ecdsa'] = self.ecdsa.to_dict() + # override the default output from pydantic by calling `to_dict()` of rsa + if self.rsa: + _dict['rsa'] = self.rsa.to_dict() return _dict @classmethod @@ -83,9 +90,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "rsa": WebKeyServiceBetaRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None, - "ecdsa": WebKeyServiceBetaECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, - "ed25519": obj.get("ed25519") + "ecdsa": WebKeyServiceECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, + "ed25519": obj.get("ed25519"), + "rsa": WebKeyServiceRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None }) return _obj diff --git a/zitadel_client/models/web_key_service_create_web_key_response.py b/zitadel_client/models/web_key_service_create_web_key_response.py new file mode 100644 index 00000000..e73b3f07 --- /dev/null +++ b/zitadel_client/models/web_key_service_create_web_key_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceCreateWebKeyResponse(BaseModel): + """ + WebKeyServiceCreateWebKeyResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created key.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + __properties: ClassVar[List[str]] = ["id", "creationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceCreateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceCreateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_delete_web_key_request.py b/zitadel_client/models/web_key_service_delete_web_key_request.py new file mode 100644 index 00000000..4c55dda2 --- /dev/null +++ b/zitadel_client/models/web_key_service_delete_web_key_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceDeleteWebKeyRequest(BaseModel): + """ + WebKeyServiceDeleteWebKeyRequest + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceDeleteWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceDeleteWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_delete_web_key_response.py b/zitadel_client/models/web_key_service_delete_web_key_response.py new file mode 100644 index 00000000..49ba451e --- /dev/null +++ b/zitadel_client/models/web_key_service_delete_web_key_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceDeleteWebKeyResponse(BaseModel): + """ + WebKeyServiceDeleteWebKeyResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["deletionDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceDeleteWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceDeleteWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_ecdsa.py b/zitadel_client/models/web_key_service_ecdsa.py new file mode 100644 index 00000000..ed47690c --- /dev/null +++ b/zitadel_client/models/web_key_service_ecdsa.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.web_key_service_ecdsa_curve import WebKeyServiceECDSACurve +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceECDSA(BaseModel): + """ + WebKeyServiceECDSA + """ # noqa: E501 + curve: Optional[WebKeyServiceECDSACurve] = None + __properties: ClassVar[List[str]] = ["curve"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceECDSA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceECDSA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "curve": obj.get("curve") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_ecdsa_curve.py b/zitadel_client/models/web_key_service_ecdsa_curve.py new file mode 100644 index 00000000..07afee80 --- /dev/null +++ b/zitadel_client/models/web_key_service_ecdsa_curve.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceECDSACurve(str, Enum): + """ + WebKeyServiceECDSACurve + """ + + """ + allowed enum values + """ + ECDSA_CURVE_UNSPECIFIED = 'ECDSA_CURVE_UNSPECIFIED' + ECDSA_CURVE_P256 = 'ECDSA_CURVE_P256' + ECDSA_CURVE_P384 = 'ECDSA_CURVE_P384' + ECDSA_CURVE_P512 = 'ECDSA_CURVE_P512' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceECDSACurve from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_list_web_keys_response.py b/zitadel_client/models/web_key_service_list_web_keys_response.py new file mode 100644 index 00000000..603df87e --- /dev/null +++ b/zitadel_client/models/web_key_service_list_web_keys_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_web_key import WebKeyServiceWebKey +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceListWebKeysResponse(BaseModel): + """ + WebKeyServiceListWebKeysResponse + """ # noqa: E501 + web_keys: Optional[List[WebKeyServiceWebKey]] = Field(default=None, alias="webKeys") + __properties: ClassVar[List[str]] = ["webKeys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceListWebKeysResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in web_keys (list) + _items = [] + if self.web_keys: + for _item_web_keys in self.web_keys: + if _item_web_keys: + _items.append(_item_web_keys.to_dict()) + _dict['webKeys'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceListWebKeysResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "webKeys": [WebKeyServiceWebKey.from_dict(_item) for _item in obj["webKeys"]] if obj.get("webKeys") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_rsa.py b/zitadel_client/models/web_key_service_rsa.py new file mode 100644 index 00000000..f548a876 --- /dev/null +++ b/zitadel_client/models/web_key_service_rsa.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.web_key_service_rsa_bits import WebKeyServiceRSABits +from zitadel_client.models.web_key_service_rsa_hasher import WebKeyServiceRSAHasher +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceRSA(BaseModel): + """ + WebKeyServiceRSA + """ # noqa: E501 + bits: Optional[WebKeyServiceRSABits] = None + hasher: Optional[WebKeyServiceRSAHasher] = None + __properties: ClassVar[List[str]] = ["bits", "hasher"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceRSA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceRSA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bits": obj.get("bits"), + "hasher": obj.get("hasher") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_rsa_bits.py b/zitadel_client/models/web_key_service_rsa_bits.py new file mode 100644 index 00000000..bc6523bf --- /dev/null +++ b/zitadel_client/models/web_key_service_rsa_bits.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceRSABits(str, Enum): + """ + WebKeyServiceRSABits + """ + + """ + allowed enum values + """ + RSA_BITS_UNSPECIFIED = 'RSA_BITS_UNSPECIFIED' + RSA_BITS_2048 = 'RSA_BITS_2048' + RSA_BITS_3072 = 'RSA_BITS_3072' + RSA_BITS_4096 = 'RSA_BITS_4096' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceRSABits from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_rsa_hasher.py b/zitadel_client/models/web_key_service_rsa_hasher.py new file mode 100644 index 00000000..d3992a8d --- /dev/null +++ b/zitadel_client/models/web_key_service_rsa_hasher.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceRSAHasher(str, Enum): + """ + WebKeyServiceRSAHasher + """ + + """ + allowed enum values + """ + RSA_HASHER_UNSPECIFIED = 'RSA_HASHER_UNSPECIFIED' + RSA_HASHER_SHA256 = 'RSA_HASHER_SHA256' + RSA_HASHER_SHA384 = 'RSA_HASHER_SHA384' + RSA_HASHER_SHA512 = 'RSA_HASHER_SHA512' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceRSAHasher from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_state.py b/zitadel_client/models/web_key_service_state.py new file mode 100644 index 00000000..8b6f25a5 --- /dev/null +++ b/zitadel_client/models/web_key_service_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceState(str, Enum): + """ + WebKeyServiceState + """ + + """ + allowed enum values + """ + STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' + STATE_INITIAL = 'STATE_INITIAL' + STATE_ACTIVE = 'STATE_ACTIVE' + STATE_INACTIVE = 'STATE_INACTIVE' + STATE_REMOVED = 'STATE_REMOVED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_web_key.py b/zitadel_client/models/web_key_service_web_key.py new file mode 100644 index 00000000..562ab910 --- /dev/null +++ b/zitadel_client/models/web_key_service_web_key.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.web_key_service_ecdsa import WebKeyServiceECDSA +from zitadel_client.models.web_key_service_rsa import WebKeyServiceRSA +from zitadel_client.models.web_key_service_state import WebKeyServiceState +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceWebKey(BaseModel): + """ + WebKeyServiceWebKey + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the key.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + state: Optional[WebKeyServiceState] = None + ecdsa: Optional[WebKeyServiceECDSA] = None + ed25519: Optional[Dict[str, Any]] = None + rsa: Optional[WebKeyServiceRSA] = None + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "state", "ecdsa", "ed25519", "rsa"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceWebKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ecdsa + if self.ecdsa: + _dict['ecdsa'] = self.ecdsa.to_dict() + # override the default output from pydantic by calling `to_dict()` of rsa + if self.rsa: + _dict['rsa'] = self.rsa.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceWebKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "state": obj.get("state"), + "ecdsa": WebKeyServiceECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, + "ed25519": obj.get("ed25519"), + "rsa": WebKeyServiceRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None + }) + return _obj + + diff --git a/zitadel_client/zitadel.py b/zitadel_client/zitadel.py index b46b7b5b..9b271c55 100644 --- a/zitadel_client/zitadel.py +++ b/zitadel_client/zitadel.py @@ -1,14 +1,29 @@ from types import TracebackType from typing import Callable, Optional, Type, TypeVar -from zitadel_client.api import ActionServiceApi, SAMLServiceApi, WebKeyServiceApi +from zitadel_client.api.beta_action_service_api import BetaActionServiceApi +from zitadel_client.api.beta_app_service_api import BetaAppServiceApi +from zitadel_client.api.beta_authorization_service_api import BetaAuthorizationServiceApi +from zitadel_client.api.beta_feature_service_api import BetaFeatureServiceApi +from zitadel_client.api.beta_instance_service_api import BetaInstanceServiceApi +from zitadel_client.api.beta_internal_permission_service_api import BetaInternalPermissionServiceApi +from zitadel_client.api.beta_oidc_service_api import BetaOIDCServiceApi +from zitadel_client.api.beta_organization_service_api import BetaOrganizationServiceApi +from zitadel_client.api.beta_project_service_api import BetaProjectServiceApi +from zitadel_client.api.beta_session_service_api import BetaSessionServiceApi +from zitadel_client.api.beta_settings_service_api import BetaSettingsServiceApi +from zitadel_client.api.beta_telemetry_service_api import BetaTelemetryServiceApi +from zitadel_client.api.beta_user_service_api import BetaUserServiceApi +from zitadel_client.api.beta_web_key_service_api import BetaWebKeyServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi from zitadel_client.api.organization_service_api import OrganizationServiceApi +from zitadel_client.api.saml_service_api import SAMLServiceApi from zitadel_client.api.session_service_api import SessionServiceApi from zitadel_client.api.settings_service_api import SettingsServiceApi from zitadel_client.api.user_service_api import UserServiceApi +from zitadel_client.api.web_key_service_api import WebKeyServiceApi from zitadel_client.api_client import ApiClient from zitadel_client.auth.authenticator import Authenticator from zitadel_client.auth.client_credentials_authenticator import ClientCredentialsAuthenticator @@ -26,17 +41,52 @@ class Zitadel: organizations, sessions, settings, users, and more. Attributes: - configuration (Configuration): The configuration instance containing authentication and endpoint details. - actions (ActionServiceApi): Service API for actions management. - features (FeatureServiceApi): Service API for feature management. - idps (IdentityProviderServiceApi): Service API for identity provider operations. - oidc (OIDCServiceApi): Service API for OIDC-related operations. - organizations (OrganizationServiceApi): Service API for organization-related operations. - saml (SAMLServiceApi): Service API for SAML management. - sessions (SessionServiceApi): Service API for session management. - settings (SettingsServiceApi): Service API for settings management. - users (UserServiceApi): Service API for user management. - webkeys (WebKeyServiceApi): Service API for webkeys management. + features (FeatureServiceApi) + Endpoints for feature management. + idps (IdentityProviderServiceApi) + Endpoints for identity-provider operations. + oidc (OIDCServiceApi) + Endpoints for OIDC-related operations. + organizations (OrganizationServiceApi) + Endpoints for organization management. + saml (SAMLServiceApi) + Endpoints for SAML identity-provider management. + sessions (SessionServiceApi) + Endpoints for session lifecycle management. + settings (SettingsServiceApi) + Endpoints for organization- and instance-level settings. + users (UserServiceApi) + Endpoints for end-user management. + webkeys (WebKeyServiceApi) + Endpoints for WebCrypto keys (JWKS). + beta_projects (BetaProjectServiceApi) + Preview endpoints for project management. + beta_apps (BetaAppServiceApi) + Preview endpoints for application registration. + beta_oidc (BetaOIDCServiceApi) + Preview endpoints for OIDC features not yet GA. + beta_users (BetaUserServiceApi) + Preview endpoints for advanced user management. + beta_organizations (BetaOrganizationServiceApi) + Preview endpoints for organization features. + beta_settings (BetaSettingsServiceApi) + Preview endpoints for settings not yet GA. + beta_permissions (BetaInternalPermissionServiceApi) + Preview endpoints for fine-grained permission management. + beta_authorizations (BetaAuthorizationServiceApi) + Preview endpoints for authorization workflows. + beta_sessions (BetaSessionServiceApi) + Preview endpoints for session features not yet GA. + beta_instance (BetaInstanceServiceApi) + Preview endpoints for instance-level operations. + beta_telemetry (BetaTelemetryServiceApi) + Preview endpoints for telemetry and observability. + beta_features (BetaFeatureServiceApi) + Preview endpoints for new feature toggles. + beta_webkeys (BetaWebKeyServiceApi) + Preview endpoints for WebCrypto keys in Beta. + beta_actions (BetaActionServiceApi) + Preview endpoints for custom action workflows. """ def __init__( @@ -63,7 +113,6 @@ def __init__( mutate_config(self.configuration) client = ApiClient(configuration=self.configuration) - self.actions = ActionServiceApi(client) self.features = FeatureServiceApi(client) self.idps = IdentityProviderServiceApi(client) self.oidc = OIDCServiceApi(client) @@ -72,8 +121,21 @@ def __init__( self.sessions = SessionServiceApi(client) self.settings = SettingsServiceApi(client) self.users = UserServiceApi(client) - self.users = UserServiceApi(client) self.webkeys = WebKeyServiceApi(client) + self.beta_projects = BetaProjectServiceApi(client) + self.beta_apps = BetaAppServiceApi(client) + self.beta_oidc = BetaOIDCServiceApi(client) + self.beta_users = BetaUserServiceApi(client) + self.beta_organizations = BetaOrganizationServiceApi(client) + self.beta_settings = BetaSettingsServiceApi(client) + self.beta_permissions = BetaInternalPermissionServiceApi(client) + self.beta_authorizations = BetaAuthorizationServiceApi(client) + self.beta_sessions = BetaSessionServiceApi(client) + self.beta_instance = BetaInstanceServiceApi(client) + self.beta_telemetry = BetaTelemetryServiceApi(client) + self.beta_features = BetaFeatureServiceApi(client) + self.beta_webkeys = BetaWebKeyServiceApi(client) + self.beta_actions = BetaActionServiceApi(client) # noinspection PyArgumentList T = TypeVar("T", bound="Zitadel")