import _m0 from 'protobufjs/minimal'; import { Resources, MDBPostgreSQL } from '../../../../../yandex/cloud/mdb/spqr/v1/config'; export declare const protobufPackage = "yandex.cloud.mdb.spqr.v1"; export interface Host { /** * Name of the SPQR host. The host name is assigned by MDB at creation time, and cannot be changed. * 1-63 characters long. * * The name is unique across all MDB hosts that exist on the platform, as it defines the FQDN of the host. */ name: string; /** The ID of the SPQR cluster that the host belongs to. */ clusterId: string; /** ID of the availability zone where the SPQR host resides. */ zoneId: string; /** Resources allocated to the SPQR host. */ resources?: Resources; /** Role of the host in the cluster. */ role: Host_Role; /** Status code of the aggregated health of the host. */ health: Host_Health; /** Services provided by the host. */ services: Service[]; /** ID of the subnet that the host belongs to. */ subnetId: string; /** Flag showing public IP assignment status to this host. */ assignPublicIp: boolean; /** Host type */ type: Host_Type; /** link to wall-e (porto only) */ walleLink: string; /** host state reason from cms (porto only) */ stateReason: string; /** System metrics */ system?: Host_SystemMetrics; /** Shard which this host belongs to. */ shardName: string; } export declare enum Host_Type { TYPE_UNSPECIFIED = 0, /** ROUTER - A SPQR Router host. */ ROUTER = 2, /** COORDINATOR - A SPQR Coordinator host. */ COORDINATOR = 3, /** INFRA - A SPQR Infra host (router+coordinator) */ INFRA = 4, /** POSTGRESQL - A PostgreSQL host. */ POSTGRESQL = 5, /** EXTERNAL_POSTGRESQL - An External PostgreSQL host. */ EXTERNAL_POSTGRESQL = 6, /** MDB_POSTGRESQL - A Managed PostgreSQL host */ MDB_POSTGRESQL = 7, UNRECOGNIZED = -1 } export declare function host_TypeFromJSON(object: any): Host_Type; export declare function host_TypeToJSON(object: Host_Type): string; export declare enum Host_Role { /** ROLE_UNKNOWN - Role of the host in the cluster is unknown. */ ROLE_UNKNOWN = 0, /** PRIMARY - Host is the primary SPQR server in the cluster. */ PRIMARY = 1, /** SECONDARY - Host is a secondary SPQR server in the cluster. */ SECONDARY = 2, /** MASTER - Host is the master PostgreSQL server in the cluster. */ MASTER = 3, /** REPLICA - Host is a replica (standby) PostgreSQL server in the cluster. */ REPLICA = 4, UNRECOGNIZED = -1 } export declare function host_RoleFromJSON(object: any): Host_Role; export declare function host_RoleToJSON(object: Host_Role): string; export declare enum Host_Health { /** HEALTH_UNKNOWN - Health of the host is unknown. */ HEALTH_UNKNOWN = 0, /** ALIVE - The host is performing all its functions normally. */ ALIVE = 1, /** DEAD - The host is inoperable, and cannot perform any of its essential functions. */ DEAD = 2, /** DEGRADED - The host is degraded, and can perform only some of its essential functions. */ DEGRADED = 3, UNRECOGNIZED = -1 } export declare function host_HealthFromJSON(object: any): Host_Health; export declare function host_HealthToJSON(object: Host_Health): string; export interface Host_CPUMetric { timestamp: number; used: number; } export interface Host_MemoryMetric { timestamp: number; used: number; total: number; } export interface Host_DiskMetric { timestamp: number; used: number; total: number; } export interface Host_SystemMetrics { cpu?: Host_CPUMetric; memory?: Host_MemoryMetric; disk?: Host_DiskMetric; } export interface Service { /** Type of the service provided by the host. */ type: Service_Type; /** Status code of server availability. */ health: Service_Health; } export declare enum Service_Type { TYPE_UNSPECIFIED = 0, /** ROUTER - The host is running a SPQR Router. */ ROUTER = 2, /** COORDINATOR - The host is running a SPQR Coordinator. */ COORDINATOR = 3, /** INFRA - The host is running a SPQR router and coordinator */ INFRA = 4, /** POSTGRESQL - The host is running a PostgreSQL. */ POSTGRESQL = 5, /** EXTERNAL_POSTGRESQL - The host is running a PostgreSQL. */ EXTERNAL_POSTGRESQL = 6, /** MDB_POSTGRESQL - The host is running a PostgreSQL */ MDB_POSTGRESQL = 7, UNRECOGNIZED = -1 } export declare function service_TypeFromJSON(object: any): Service_Type; export declare function service_TypeToJSON(object: Service_Type): string; export declare enum Service_Health { /** HEALTH_UNKNOWN - Health of the server is unknown. */ HEALTH_UNKNOWN = 0, /** ALIVE - The server is working normally. */ ALIVE = 1, /** DEAD - The server is dead or unresponsive. */ DEAD = 2, UNRECOGNIZED = -1 } export declare function service_HealthFromJSON(object: any): Service_Health; export declare function service_HealthToJSON(object: Service_Health): string; export interface HostSpec { /** * ID of the availability zone where the host resides. * To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request. */ zoneId: string; /** * ID of the subnet that the host should belong to. This subnet should be a part * of the network that the cluster belongs to. * The network ID is set in the [Cluster.network_id] field. */ subnetId: string; /** * Whether the host should get a public IP address on creation. * * After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign * a public IP to a host without one, recreate the host with [assign_public_ip] set as needed. * * Possible values: * * false - don't assign a public IP to the host. * * true - the host should have a public IP address. */ assignPublicIp: boolean; /** Type of the host to be deployed. */ type: Host_Type; /** * Name of the shard that the host belongs to. * If empty, host doesn't belong to any shard */ shardName: string; mdbPostgresql?: MDBPostgreSQL; } export declare const Host: { encode(message: Host, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Host; fromJSON(object: any): Host; toJSON(message: Host): unknown; fromPartial, never>) | undefined; role?: Host_Role | undefined; health?: Host_Health | undefined; services?: ({ type?: Service_Type | undefined; health?: Service_Health | undefined; }[] & ({ type?: Service_Type | undefined; health?: Service_Health | undefined; } & { type?: Service_Type | undefined; health?: Service_Health | undefined; } & Record, never>)[] & Record, never>) | undefined; subnetId?: string | undefined; assignPublicIp?: boolean | undefined; type?: Host_Type | undefined; walleLink?: string | undefined; stateReason?: string | undefined; system?: ({ cpu?: { timestamp?: number | undefined; used?: number | undefined; } | undefined; memory?: { timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } | undefined; disk?: { timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } | undefined; } & { cpu?: ({ timestamp?: number | undefined; used?: number | undefined; } & { timestamp?: number | undefined; used?: number | undefined; } & Record, never>) | undefined; memory?: ({ timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & { timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & Record, never>) | undefined; disk?: ({ timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & { timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; shardName?: string | undefined; } & Record, never>>(object: I): Host; }; export declare const Host_CPUMetric: { encode(message: Host_CPUMetric, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Host_CPUMetric; fromJSON(object: any): Host_CPUMetric; toJSON(message: Host_CPUMetric): unknown; fromPartial, never>>(object: I): Host_CPUMetric; }; export declare const Host_MemoryMetric: { encode(message: Host_MemoryMetric, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Host_MemoryMetric; fromJSON(object: any): Host_MemoryMetric; toJSON(message: Host_MemoryMetric): unknown; fromPartial, never>>(object: I): Host_MemoryMetric; }; export declare const Host_DiskMetric: { encode(message: Host_DiskMetric, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Host_DiskMetric; fromJSON(object: any): Host_DiskMetric; toJSON(message: Host_DiskMetric): unknown; fromPartial, never>>(object: I): Host_DiskMetric; }; export declare const Host_SystemMetrics: { encode(message: Host_SystemMetrics, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Host_SystemMetrics; fromJSON(object: any): Host_SystemMetrics; toJSON(message: Host_SystemMetrics): unknown; fromPartial, never>) | undefined; memory?: ({ timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & { timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & Record, never>) | undefined; disk?: ({ timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & { timestamp?: number | undefined; used?: number | undefined; total?: number | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): Host_SystemMetrics; }; export declare const Service: { encode(message: Service, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Service; fromJSON(object: any): Service; toJSON(message: Service): unknown; fromPartial, never>>(object: I): Service; }; export declare const HostSpec: { encode(message: HostSpec, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): HostSpec; fromJSON(object: any): HostSpec; toJSON(message: HostSpec): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): HostSpec; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & Record>, never>; export {};