Skip to content
Merged
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
7 changes: 7 additions & 0 deletions packages_generated/instance/src/v1/content.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {
IpState,
PrivateNICState,
SecurityGroupState,
ServerFilesystemState,
ServerIpState,
ServerState,
SnapshotState,
Expand All @@ -27,6 +28,12 @@ export const SECURITY_GROUP_TRANSIENT_STATUSES: SecurityGroupState[] = [
'syncing',
]

/** Lists transient statutes of the enum {@link ServerFilesystemState}. */
export const SERVER_FILESYSTEM_TRANSIENT_STATUSES: ServerFilesystemState[] = [
'attaching',
'detaching',
]

/** Lists transient statutes of the enum {@link ServerIpState}. */
export const SERVER_IP_TRANSIENT_STATUSES: ServerIpState[] = ['pending']

Expand Down
2 changes: 2 additions & 0 deletions packages_generated/instance/src/v1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ export type {
ServerActionRequestVolumeBackupTemplate,
ServerActionResponse,
ServerCompatibleTypes,
ServerFilesystem,
ServerFilesystemState,
ServerIp,
ServerIpIpFamily,
ServerIpProvisioningMode,
Expand Down
18 changes: 18 additions & 0 deletions packages_generated/instance/src/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import type {
ServerActionRequestVolumeBackupTemplate,
ServerActionResponse,
ServerCompatibleTypes,
ServerFilesystem,
ServerIp,
ServerIpv6,
ServerLocation,
Expand Down Expand Up @@ -303,6 +304,19 @@ const unmarshalSecurityGroupSummary = (data: unknown): SecurityGroupSummary => {
} as SecurityGroupSummary
}

const unmarshalServerFilesystem = (data: unknown): ServerFilesystem => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'ServerFilesystem' failed as data isn't a dictionary.`,
)
}

return {
filesystemId: data.filesystem_id,
state: data.state,
} as ServerFilesystem
}

const unmarshalServerIp = (data: unknown): ServerIp => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down Expand Up @@ -409,6 +423,10 @@ const unmarshalServer = (data: unknown): Server => {
dynamicIpRequired: data.dynamic_ip_required,
enableIpv6: data.enable_ipv6,
endOfService: data.end_of_service,
filesystems: unmarshalArrayOfObject(
data.filesystems,
unmarshalServerFilesystem,
),
hostname: data.hostname,
id: data.id,
image: data.image ? unmarshalImage(data.image) : undefined,
Expand Down
15 changes: 15 additions & 0 deletions packages_generated/instance/src/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export type ServerAction =
| 'reboot'
| 'enable_routed_ip'

export type ServerFilesystemState =
| 'unknown_state'
| 'attaching'
| 'available'
| 'detaching'

export type ServerIpIpFamily = 'inet' | 'inet6'

export type ServerIpProvisioningMode = 'manual' | 'dhcp' | 'slaac'
Expand Down Expand Up @@ -334,6 +340,11 @@ export interface SecurityGroupSummary {
name: string
}

export interface ServerFilesystem {
filesystemId: string
state: ServerFilesystemState
}

export interface ServerIp {
/**
* Unique ID of the IP address.
Expand Down Expand Up @@ -636,6 +647,10 @@ export interface Server {
* This value is reset when admin_password_encryption_ssh_key_id is set to an empty string.
*/
adminPasswordEncryptedValue?: string
/**
* List of attached filesystems.
*/
filesystems: ServerFilesystem[]
/**
* True if the Instance type has reached end of service.
*/
Expand Down
Loading