# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T11:04:38+00:00
from __future__ import annotations
from datetime import datetime
from typing import Any, Dict, List, Optional
from pydantic import AnyUrl, BaseModel, Field, constr
class MicrovisorV1AccountConfig(BaseModel):
date_updated: Optional[datetime] = None
key: Optional[str] = Field(
None, description='The config key; up to 100 characters.'
)
url: Optional[AnyUrl] = Field(None, description='The absolute URL of the Config.')
value: Optional[str] = Field(
None, description='The config value; up to 4096 characters.'
)
class MicrovisorV1AccountSecret(BaseModel):
date_rotated: Optional[datetime] = None
key: Optional[str] = Field(
None, description='The secret key; up to 100 characters.'
)
url: Optional[AnyUrl] = Field(None, description='The absolute URL of the Secret.')
class MicrovisorV1App(BaseModel):
account_sid: Optional[
constr(pattern=r'^AC[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(None, description='The unique SID identifier of the Account.')
date_created: Optional[datetime] = Field(
None,
description='The date that this App was created, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.',
)
date_updated: Optional[datetime] = Field(
None,
description='The date that this App was last updated, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.',
)
hash: Optional[str] = Field(
None,
description='App manifest hash represented as `hash_algorithm:hash_value`.',
)
links: Optional[Dict[str, Any]] = None
sid: Optional[
constr(pattern=r'^KA[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None, description='A 34-character string that uniquely identifies this App.'
)
unique_name: Optional[str] = Field(
None,
description='A developer-defined string that uniquely identifies the App. This value must be unique for all Apps on this Account. The `unique_name` value may be used as an alternative to the `sid` in the URL path to address the resource.',
)
url: Optional[AnyUrl] = Field(None, description='The URL of this resource.')
class MicrovisorV1AppAppManifest(BaseModel):
app_sid: Optional[
constr(pattern=r'^KA[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None, description='A 34-character string that uniquely identifies this App.'
)
encoded_bytes: Optional[str] = Field(
None, description='The base-64 encoded manifest'
)
hash: Optional[str] = Field(
None,
description='App manifest hash represented as `hash_algorithm:hash_value`.',
)
url: Optional[AnyUrl] = Field(
None, description='The absolute URL of this Manifest.'
)
class MicrovisorV1Device(BaseModel):
account_sid: Optional[
constr(pattern=r'^AC[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(None, description='The unique SID identifier of the Account.')
app: Optional[Any] = Field(
None,
description='Information about the target App and the App reported by this Device. Contains the properties `target_sid`, `date_targeted`, `update_status` (one of `up-to-date`, `pending` and `error`), `update_error_code`, `reported_sid` and `date_reported`.',
)
date_created: Optional[datetime] = Field(
None,
description='The date that this Device was created, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.',
)
date_updated: Optional[datetime] = Field(
None,
description='The date that this Device was last updated, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.',
)
links: Optional[Dict[str, Any]] = Field(
None, description='The absolute URLs of related resources.'
)
logging: Optional[Any] = Field(
None,
description='Object specifying whether application logging is enabled for this Device. Contains the properties `enabled` and `date_expires`.',
)
sid: Optional[
constr(pattern=r'^UV[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None, description='A 34-character string that uniquely identifies this Device.'
)
unique_name: Optional[str] = Field(
None,
description='A developer-defined string that uniquely identifies the Device. This value must be unique for all Devices on this Account. The `unique_name` value may be used as an alternative to the `sid` in the URL path to address the resource.',
)
url: Optional[AnyUrl] = Field(None, description='The URL of this resource.')
class MicrovisorV1DeviceDeviceConfig(BaseModel):
date_updated: Optional[datetime] = None
device_sid: Optional[
constr(pattern=r'^UV[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None,
description='A 34-character string that uniquely identifies the parent Device.',
)
key: Optional[str] = Field(
None, description='The config key; up to 100 characters.'
)
url: Optional[AnyUrl] = Field(None, description='The absolute URL of the Config.')
value: Optional[str] = Field(
None, description='The config value; up to 4096 characters.'
)
class MicrovisorV1DeviceDeviceSecret(BaseModel):
date_rotated: Optional[datetime] = None
device_sid: Optional[
constr(pattern=r'^UV[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None,
description='A 34-character string that uniquely identifies the parent Device.',
)
key: Optional[str] = Field(
None, description='The secret key; up to 100 characters.'
)
url: Optional[AnyUrl] = Field(None, description='The absolute URL of the Secret.')
class Meta(BaseModel):
first_page_url: Optional[AnyUrl] = None
key: Optional[str] = None
next_page_url: Optional[AnyUrl] = None
page: Optional[int] = None
page_size: Optional[int] = None
previous_page_url: Optional[AnyUrl] = None
url: Optional[AnyUrl] = None
class V1AppsGetResponse(BaseModel):
apps: Optional[List[MicrovisorV1App]] = None
meta: Optional[Meta] = None
class V1ConfigsGetResponse(BaseModel):
configs: Optional[List[MicrovisorV1AccountConfig]] = None
meta: Optional[Meta] = None
class V1ConfigsPostRequest(BaseModel):
Key: str = Field(..., description='The config key; up to 100 characters.')
Value: str = Field(..., description='The config value; up to 4096 characters.')
class V1ConfigsKeyPostRequest(BaseModel):
Value: str = Field(..., description='The config value; up to 4096 characters.')
class V1DevicesGetResponse(BaseModel):
devices: Optional[List[MicrovisorV1Device]] = None
meta: Optional[Meta] = None
class V1DevicesDeviceSidConfigsGetResponse(BaseModel):
configs: Optional[List[MicrovisorV1DeviceDeviceConfig]] = None
meta: Optional[Meta] = None
class V1DevicesDeviceSidConfigsPostRequest(BaseModel):
Key: str = Field(..., description='The config key; up to 100 characters.')
Value: str = Field(..., description='The config value; up to 4096 characters.')
class V1DevicesDeviceSidConfigsKeyPostRequest(BaseModel):
Value: str = Field(..., description='The config value; up to 4096 characters.')
class V1DevicesDeviceSidSecretsGetResponse(BaseModel):
meta: Optional[Meta] = None
secrets: Optional[List[MicrovisorV1DeviceDeviceSecret]] = None
class V1DevicesDeviceSidSecretsPostRequest(BaseModel):
Key: str = Field(..., description='The secret key; up to 100 characters.')
Value: str = Field(..., description='The secret value; up to 4096 characters.')
class V1DevicesDeviceSidSecretsKeyPostRequest(BaseModel):
Value: str = Field(..., description='The secret value; up to 4096 characters.')
class V1DevicesSidPostRequest(BaseModel):
LoggingEnabled: Optional[bool] = Field(
None,
description='A Boolean flag specifying whether to enable application logging. Logs will be enabled or extended for 24 hours.',
)
TargetApp: Optional[str] = Field(
None,
description='The SID or unique name of the App to be targeted to the Device.',
)
UniqueName: Optional[str] = Field(
None,
description='A unique and addressable name to be assigned to this Device by the developer. It may be used in place of the Device SID.',
)
class V1SecretsGetResponse(BaseModel):
meta: Optional[Meta] = None
secrets: Optional[List[MicrovisorV1AccountSecret]] = None
class V1SecretsPostRequest(BaseModel):
Key: str = Field(..., description='The secret key; up to 100 characters.')
Value: str = Field(..., description='The secret value; up to 4096 characters.')
class V1SecretsKeyPostRequest(BaseModel):
Value: str = Field(..., description='The secret value; up to 4096 characters.')