Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/postgresflex/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
da4701b7dbe20e984aef89711bb9ba716e19fcba
6ed77ae6dc13702b717ac772479bf25d0a30374a
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,35 @@

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Self
from typing_extensions import Annotated, Self


class CreateDatabasePayload(BaseModel):
"""
CreateDatabasePayload
""" # noqa: E501

name: StrictStr = Field(description="The name of the database.")
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
)
owner: Optional[StrictStr] = Field(default=None, description="The owner of the database.")
__properties: ClassVar[List[str]] = ["name", "owner"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not isinstance(value, str):
value = str(value)

if not re.match(r"^[a-z_][a-z0-9_]*$", value):
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,35 @@

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Self
from typing_extensions import Annotated, Self


class DatabaseRoles(BaseModel):
"""
The name and the roles for a database for a user.
""" # noqa: E501

name: StrictStr = Field(description="The name of the database.")
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
)
roles: List[StrictStr] = Field(description="The name and the roles for a database")
__properties: ClassVar[List[str]] = ["name", "roles"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not isinstance(value, str):
value = str(value)

if not re.match(r"^[a-z_][a-z0-9_]*$", value):
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Self
from typing_extensions import Annotated, Self


class GetDatabaseResponse(BaseModel):
Expand All @@ -29,10 +30,22 @@ class GetDatabaseResponse(BaseModel):
""" # noqa: E501

id: StrictInt = Field(description="The id of the database.")
name: StrictStr = Field(description="The name of the database.")
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
)
owner: StrictStr = Field(description="The owner of the database.")
__properties: ClassVar[List[str]] = ["id", "name", "owner"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not isinstance(value, str):
value = str(value)

if not re.match(r"^[a-z_][a-z0-9_]*$", value):
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class InstanceNetworkAccessScope(str, Enum):
"""
The access scope of the instance. It defines if the instance is public or airgapped.
The access scope of the instance. It defines if the instance is public or airgapped. ⚠️ **Note:** \"SNA\" value for the \"network.accessScope\" field is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
"""

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Self
from typing_extensions import Annotated, Self


class ListDatabase(BaseModel):
Expand All @@ -29,10 +30,22 @@ class ListDatabase(BaseModel):
""" # noqa: E501

id: StrictInt = Field(description="The id of the database.")
name: StrictStr = Field(description="The name of the database.")
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
)
owner: StrictStr = Field(description="The owner of the database.")
__properties: ClassVar[List[str]] = ["id", "name", "owner"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not isinstance(value, str):
value = str(value)

if not re.match(r"^[a-z_][a-z0-9_]*$", value):
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,39 @@

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Self
from typing_extensions import Annotated, Self


class PartialUpdateDatabasePayload(BaseModel):
"""
PartialUpdateDatabasePayload
""" # noqa: E501

name: Optional[StrictStr] = Field(default=None, description="The name of the database.")
name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=63)]] = Field(
default=None,
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." ',
)
owner: Optional[StrictStr] = Field(default=None, description="The owner of the database.")
__properties: ClassVar[List[str]] = ["name", "owner"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if value is None:
return value

if not isinstance(value, str):
value = str(value)

if not re.match(r"^[a-z_][a-z0-9_]*$", value):
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,35 @@

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Self
from typing_extensions import Annotated, Self


class UpdateDatabasePayload(BaseModel):
"""
UpdateDatabasePayload
""" # noqa: E501

name: StrictStr = Field(description="The name of the database.")
name: Annotated[str, Field(min_length=1, strict=True, max_length=63)] = Field(
description='"The name of the database." "Database name must be 1–63 characters long, start with a lowercase letter or underscore, and contain only lowercase letters, numbers, or underscores." '
)
owner: StrictStr = Field(description="The owner of the database.")
__properties: ClassVar[List[str]] = ["name", "owner"]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not isinstance(value, str):
value = str(value)

if not re.match(r"^[a-z_][a-z0-9_]*$", value):
raise ValueError(r"must validate the regular expression /^[a-z_][a-z0-9_]*$/")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down
Loading