common

Serializable contracts shared by API domains; no runtime dependencies.

class bedrock_server_manager.api.models.common.APIRequest

Strict input validation before side effects.

model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.APIResponse

Validated transport output.

model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.APIErrorResponse(*, code: ~typing.Literal['validation_error', 'not_found', 'conflict', 'forbidden', 'unauthorized', 'http_error', 'operation_canceled', 'invalid_server_name', 'server_start_failed', 'server_stop_failed', 'server_error', 'application_error', 'internal_error', 'unavailable', 'operation_incomplete', 'file_error', 'storage_error', 'configuration_error', 'network_error', 'system_error'], message: str, details: dict[str, ~pydantic.types.JsonValue] = <factory>)

Safe serialized failure; Python callers receive exceptions.

model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.SuccessResponse(*, status: Literal['success'] = 'success', message: str | None = None)
model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.ActionResponse(*, status: Literal['success', 'skipped', 'partial'] = 'success', message: str)
model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'json_schema_extra': <function action_response_schema>, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.PlayerInfo(*, name: str, xuid: str)
model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.StateRevision(*, epoch: str | None = None, revision: Annotated[int | None, Ge(ge=1), Le(le=9007199254740991)] = None)

Optional for legacy producers; compare revisions only within an epoch.

model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.ServerSummary(*, epoch: str | None = None, revision: Annotated[int | None, ~annotated_types.Ge(ge=1), ~annotated_types.Le(le=9007199254740991)] = None, players_available: bool = True, name: str, status: str, version: str, player_count: Annotated[int, ~annotated_types.Ge(ge=0)] = 0, players: list[PlayerInfo] = <factory>)
model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.ErrorEnvelope(*, error: APIErrorResponse)
model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class bedrock_server_manager.api.models.common.PartialResponse(*, status: Literal['success', 'partial'] = 'success', message: str | None = None)
model_config = {'allow_inf_nan': False, 'extra': 'forbid', 'frozen': True, 'hide_input_in_errors': True, 'revalidate_instances': 'always', 'strict': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].