stackit-mongodbflex 1.3.0__tar.gz → 1.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/PKG-INFO +1 -1
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/pyproject.toml +1 -1
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/create_instance_payload.py +14 -3
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/create_user_payload.py +28 -4
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/partial_update_instance_payload.py +17 -3
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/partial_update_user_payload.py +17 -3
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/update_instance_payload.py +14 -3
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/update_user_payload.py +14 -3
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/.gitignore +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/LICENSE.md +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/NOTICE.txt +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/README.md +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/__init__.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api/__init__.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api/default_api.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api_client.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/configuration.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/exceptions.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/__init__.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/acl.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/backup.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/backup_schedule.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/clone_instance_payload.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/clone_instance_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/create_instance_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/create_user_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/data_point.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/error.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/flavor.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/get_backup_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/get_user_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/handlers_instances_slow_queries_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/handlers_instances_suggested_indexes_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/host.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/host_metric.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/instance.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/instance_flavor.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/instance_list_instance.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/instance_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/instance_response_user.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_backups_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_flavors_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_instances_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_metrics_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_restore_jobs_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_storages_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_user.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_users_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_versions_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/mongodbatlas_operation.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/mongodbatlas_stats.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/restore_instance_payload.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/restore_instance_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/restore_instance_status.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/shape.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/slow_query.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/storage.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/storage_range.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/suggested_index.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/update_backup_schedule_payload.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/update_instance_response.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/user.py +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/py.typed +0 -0
- {stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/rest.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stackit-mongodbflex
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: STACKIT MongoDB Service API
|
|
5
5
|
Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
|
|
6
6
|
Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
|
|
@@ -16,11 +16,12 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
21
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
22
23
|
from pydantic_core import to_jsonable_python
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
+
from typing_extensions import Annotated, Self
|
|
24
25
|
|
|
25
26
|
from stackit.mongodbflex.models.acl import ACL
|
|
26
27
|
from stackit.mongodbflex.models.storage import Storage
|
|
@@ -37,7 +38,7 @@ class CreateInstancePayload(BaseModel):
|
|
|
37
38
|
backup_schedule: StrictStr = Field(alias="backupSchedule")
|
|
38
39
|
flavor_id: StrictStr = Field(alias="flavorId")
|
|
39
40
|
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels field is not certain/clear")
|
|
40
|
-
name:
|
|
41
|
+
name: Annotated[str, Field(min_length=3, strict=True, max_length=63)]
|
|
41
42
|
options: Dict[str, StrictStr]
|
|
42
43
|
replicas: StrictInt
|
|
43
44
|
storage: Storage
|
|
@@ -54,6 +55,16 @@ class CreateInstancePayload(BaseModel):
|
|
|
54
55
|
"version",
|
|
55
56
|
]
|
|
56
57
|
|
|
58
|
+
@field_validator("name")
|
|
59
|
+
def name_validate_regular_expression(cls, value):
|
|
60
|
+
"""Validates the regular expression"""
|
|
61
|
+
if not isinstance(value, str):
|
|
62
|
+
value = str(value)
|
|
63
|
+
|
|
64
|
+
if not re.match(r"^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$", value):
|
|
65
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$/")
|
|
66
|
+
return value
|
|
67
|
+
|
|
57
68
|
model_config = ConfigDict(
|
|
58
69
|
validate_by_name=True,
|
|
59
70
|
validate_by_alias=True,
|
|
@@ -16,11 +16,12 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
21
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
23
|
from pydantic_core import to_jsonable_python
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
+
from typing_extensions import Annotated, Self
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class CreateUserPayload(BaseModel):
|
|
@@ -28,13 +29,36 @@ class CreateUserPayload(BaseModel):
|
|
|
28
29
|
CreateUserPayload
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
|
|
31
|
-
database:
|
|
32
|
+
database: Annotated[str, Field(min_length=3, strict=True, max_length=63)]
|
|
32
33
|
roles: List[StrictStr] = Field(
|
|
33
34
|
description="The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.**"
|
|
34
35
|
)
|
|
35
|
-
username: Optional[
|
|
36
|
+
username: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=63)]] = None
|
|
36
37
|
__properties: ClassVar[List[str]] = ["database", "roles", "username"]
|
|
37
38
|
|
|
39
|
+
@field_validator("database")
|
|
40
|
+
def database_validate_regular_expression(cls, value):
|
|
41
|
+
"""Validates the regular expression"""
|
|
42
|
+
if not isinstance(value, str):
|
|
43
|
+
value = str(value)
|
|
44
|
+
|
|
45
|
+
if not re.match(r"^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$", value):
|
|
46
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$/")
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
@field_validator("username")
|
|
50
|
+
def username_validate_regular_expression(cls, value):
|
|
51
|
+
"""Validates the regular expression"""
|
|
52
|
+
if value is None:
|
|
53
|
+
return value
|
|
54
|
+
|
|
55
|
+
if not isinstance(value, str):
|
|
56
|
+
value = str(value)
|
|
57
|
+
|
|
58
|
+
if not re.match(r"^[A-Za-z][A-Za-z0-9-]{1,61}[A-Za-z0-9]$", value):
|
|
59
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z][A-Za-z0-9-]{1,61}[A-Za-z0-9]$/")
|
|
60
|
+
return value
|
|
61
|
+
|
|
38
62
|
model_config = ConfigDict(
|
|
39
63
|
validate_by_name=True,
|
|
40
64
|
validate_by_alias=True,
|
|
@@ -16,11 +16,12 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
21
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
22
23
|
from pydantic_core import to_jsonable_python
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
+
from typing_extensions import Annotated, Self
|
|
24
25
|
|
|
25
26
|
from stackit.mongodbflex.models.acl import ACL
|
|
26
27
|
from stackit.mongodbflex.models.storage import Storage
|
|
@@ -35,7 +36,7 @@ class PartialUpdateInstancePayload(BaseModel):
|
|
|
35
36
|
backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule")
|
|
36
37
|
flavor_id: Optional[StrictStr] = Field(default=None, alias="flavorId")
|
|
37
38
|
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels field is not certain/clear")
|
|
38
|
-
name: Optional[
|
|
39
|
+
name: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=63)]] = None
|
|
39
40
|
options: Optional[Dict[str, StrictStr]] = None
|
|
40
41
|
replicas: Optional[StrictInt] = None
|
|
41
42
|
storage: Optional[Storage] = None
|
|
@@ -52,6 +53,19 @@ class PartialUpdateInstancePayload(BaseModel):
|
|
|
52
53
|
"version",
|
|
53
54
|
]
|
|
54
55
|
|
|
56
|
+
@field_validator("name")
|
|
57
|
+
def name_validate_regular_expression(cls, value):
|
|
58
|
+
"""Validates the regular expression"""
|
|
59
|
+
if value is None:
|
|
60
|
+
return value
|
|
61
|
+
|
|
62
|
+
if not isinstance(value, str):
|
|
63
|
+
value = str(value)
|
|
64
|
+
|
|
65
|
+
if not re.match(r"^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$", value):
|
|
66
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$/")
|
|
67
|
+
return value
|
|
68
|
+
|
|
55
69
|
model_config = ConfigDict(
|
|
56
70
|
validate_by_name=True,
|
|
57
71
|
validate_by_alias=True,
|
|
@@ -16,11 +16,12 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
21
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
23
|
from pydantic_core import to_jsonable_python
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
+
from typing_extensions import Annotated, Self
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class PartialUpdateUserPayload(BaseModel):
|
|
@@ -28,13 +29,26 @@ class PartialUpdateUserPayload(BaseModel):
|
|
|
28
29
|
PartialUpdateUserPayload
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
|
|
31
|
-
database: Optional[
|
|
32
|
+
database: Optional[Annotated[str, Field(min_length=3, strict=True, max_length=63)]] = None
|
|
32
33
|
roles: Optional[List[StrictStr]] = Field(
|
|
33
34
|
default=None,
|
|
34
35
|
description="The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.**",
|
|
35
36
|
)
|
|
36
37
|
__properties: ClassVar[List[str]] = ["database", "roles"]
|
|
37
38
|
|
|
39
|
+
@field_validator("database")
|
|
40
|
+
def database_validate_regular_expression(cls, value):
|
|
41
|
+
"""Validates the regular expression"""
|
|
42
|
+
if value is None:
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
if not isinstance(value, str):
|
|
46
|
+
value = str(value)
|
|
47
|
+
|
|
48
|
+
if not re.match(r"^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$", value):
|
|
49
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$/")
|
|
50
|
+
return value
|
|
51
|
+
|
|
38
52
|
model_config = ConfigDict(
|
|
39
53
|
validate_by_name=True,
|
|
40
54
|
validate_by_alias=True,
|
|
@@ -16,11 +16,12 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
21
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
22
23
|
from pydantic_core import to_jsonable_python
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
+
from typing_extensions import Annotated, Self
|
|
24
25
|
|
|
25
26
|
from stackit.mongodbflex.models.acl import ACL
|
|
26
27
|
from stackit.mongodbflex.models.storage import Storage
|
|
@@ -35,7 +36,7 @@ class UpdateInstancePayload(BaseModel):
|
|
|
35
36
|
backup_schedule: StrictStr = Field(alias="backupSchedule")
|
|
36
37
|
flavor_id: StrictStr = Field(alias="flavorId")
|
|
37
38
|
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels field is not certain/clear")
|
|
38
|
-
name:
|
|
39
|
+
name: Annotated[str, Field(min_length=3, strict=True, max_length=63)]
|
|
39
40
|
options: Dict[str, StrictStr]
|
|
40
41
|
replicas: StrictInt
|
|
41
42
|
storage: Storage
|
|
@@ -52,6 +53,16 @@ class UpdateInstancePayload(BaseModel):
|
|
|
52
53
|
"version",
|
|
53
54
|
]
|
|
54
55
|
|
|
56
|
+
@field_validator("name")
|
|
57
|
+
def name_validate_regular_expression(cls, value):
|
|
58
|
+
"""Validates the regular expression"""
|
|
59
|
+
if not isinstance(value, str):
|
|
60
|
+
value = str(value)
|
|
61
|
+
|
|
62
|
+
if not re.match(r"^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$", value):
|
|
63
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$/")
|
|
64
|
+
return value
|
|
65
|
+
|
|
55
66
|
model_config = ConfigDict(
|
|
56
67
|
validate_by_name=True,
|
|
57
68
|
validate_by_alias=True,
|
|
@@ -16,11 +16,12 @@ from __future__ import annotations
|
|
|
16
16
|
|
|
17
17
|
import json
|
|
18
18
|
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
19
20
|
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
21
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
23
|
from pydantic_core import to_jsonable_python
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
+
from typing_extensions import Annotated, Self
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class UpdateUserPayload(BaseModel):
|
|
@@ -28,12 +29,22 @@ class UpdateUserPayload(BaseModel):
|
|
|
28
29
|
UpdateUserPayload
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
|
|
31
|
-
database:
|
|
32
|
+
database: Annotated[str, Field(min_length=3, strict=True, max_length=63)]
|
|
32
33
|
roles: List[StrictStr] = Field(
|
|
33
34
|
description="The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.**"
|
|
34
35
|
)
|
|
35
36
|
__properties: ClassVar[List[str]] = ["database", "roles"]
|
|
36
37
|
|
|
38
|
+
@field_validator("database")
|
|
39
|
+
def database_validate_regular_expression(cls, value):
|
|
40
|
+
"""Validates the regular expression"""
|
|
41
|
+
if not isinstance(value, str):
|
|
42
|
+
value = str(value)
|
|
43
|
+
|
|
44
|
+
if not re.match(r"^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$", value):
|
|
45
|
+
raise ValueError(r"must validate the regular expression /^[A-Za-z_][A-Za-z0-9-_]{1,61}[A-Za-z0-9_]$/")
|
|
46
|
+
return value
|
|
47
|
+
|
|
37
48
|
model_config = ConfigDict(
|
|
38
49
|
validate_by_name=True,
|
|
39
50
|
validate_by_alias=True,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api/__init__.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api/default_api.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api_client.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/api_response.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/configuration.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/exceptions.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/__init__.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/acl.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/backup.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/data_point.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/error.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/flavor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/host.py
RENAMED
|
File without changes
|
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/instance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/list_user.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/shape.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/slow_query.py
RENAMED
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/storage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_mongodbflex-1.3.0 → stackit_mongodbflex-1.4.0}/src/stackit/mongodbflex/models/user.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|