Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generator: Update SDK /services/mongodbflex#1044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bahkauv70 merged 2 commits intomainfromgenerator-bot-14755959776/mongodbflex
May 5, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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: 2 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,8 @@
- Added API calls for folder management
- `serverupdate`: [v1.0.1](services/serverupdate/CHANGELOG.md#v101-2025-05-05)
- **Minor change:** Use stderr by default.
- `mongodbflex`: [v1.0.0](services/mongodbflex/CHANGELOG.md#v100-2025-05-05)
- **Breaking Change:** Introduce typed enum constants for status attributes

## Release (2025-04-30)
- `stackitmarketplace`: [v0.4.0](services/stackitmarketplace/CHANGELOG.md#v040-2025-04-16)
Expand Down
3 changes: 3 additions & 0 deletionsservices/mongodbflex/CHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
## v1.0.0 (2025-05-05)
- **Breaking Change:** Introduce typed enum constants for status attributes

## v0.3.0 (2025-01-21)

- **Breaking change**: Delete endpoint made private.
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
# coding: utf-8

import sys

import os


"""
STACKIT MongoDB Service API

Expand All@@ -12,8 +17,6 @@
Do not edit the class manually.
""" # noqa: E501 docstring might be too long

import os


class HostConfiguration:
def __init__(
Expand All@@ -30,6 +33,7 @@ def __init__(
"as a function argument instead of being set in the client configuration.\n"
"Once all services have migrated, the methods to specify the region in the client configuration "
"will be removed.",
file=sys.stderr,
)
"""Constructor
"""
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,7 +18,7 @@
importpprint
fromtypingimportAny,ClassVar,Dict,List,Optional,Set

frompydanticimportBaseModel,ConfigDict,Field,StrictInt,StrictStr
frompydanticimportBaseModel,ConfigDict,Field,StrictInt,StrictStr,field_validator
fromtyping_extensionsimportSelf

fromstackit.mongodbflex.models.aclimportACL
Expand All@@ -38,7 +38,7 @@ class Instance(BaseModel):
name:Optional[StrictStr]=None
options:Optional[Dict[str,StrictStr]]=None
replicas:Optional[StrictInt]=None
status:Optional[StrictStr]=None
status:Optional[StrictStr]=Field(default=None,description="The current status of the instance.")
storage:Optional[Storage]=None
version:Optional[StrictStr]=None
__properties:ClassVar[List[str]]= [
Expand All@@ -54,6 +54,16 @@ class Instance(BaseModel):
"version",
]

@field_validator("status")
defstatus_validate_enum(cls,value):
"""Validates the enum"""
ifvalueisNone:
returnvalue

ifvaluenotinset(["READY","PENDING","PROCESSING","FAILED","UNKNOWN"]):
raiseValueError("must be one of enum values ('READY', 'PENDING', 'PROCESSING', 'FAILED', 'UNKNOWN')")
returnvalue

model_config=ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,7 +18,7 @@
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, StrictStr
from pydantic import BaseModel, ConfigDict,Field,StrictStr, field_validator
from typing_extensions import Self


Expand All@@ -29,9 +29,19 @@ class InstanceListInstance(BaseModel):

id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
status: Optional[StrictStr] = None
status: Optional[StrictStr] =Field(default=None, description="The current status of the instance.")
__properties: ClassVar[List[str]] = ["id", "name", "status"]

@field_validator("status")
def status_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(["READY", "PENDING", "PROCESSING", "FAILED", "UNKNOWN"]):
raise ValueError("must be one of enum values ('READY', 'PENDING', 'PROCESSING', 'FAILED', 'UNKNOWN')")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp