import _m0 from 'protobufjs/minimal'; export declare const protobufPackage = "yandex.cloud.vpc.v1"; export interface SecurityGroup { /** ID of the security group. */ id: string; /** ID of the folder that the security group belongs to. */ folderId: string; /** Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. */ createdAt?: Date; /** * Name of the security group. * The name must be unique within the folder. * Value must match the regular expression ``\|[a-zA-Z]([-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])?``. */ name: string; /** Description of the security group. 0-256 characters long. */ description: string; /** * Resource labels as `key:value` pairs. * No more than 64 per resource. * The maximum string length in characters for each value is 63. * Each value must match the regular expression `[-_./\\@0-9a-z]*`. * The string length in characters for each key must be 1-63. * Each key must match the regular expression `[a-z][-_./\\@0-9a-z]*`. */ labels: { [key: string]: string; }; /** ID of the network that the security group belongs to. */ networkId: string; /** Security group status. */ status: SecurityGroup_Status; /** List of the security group rules. */ rules: SecurityGroupRule[]; /** Flag that indicates that the security group is the default for the network. */ defaultForNetwork: boolean; } export declare enum SecurityGroup_Status { STATUS_UNSPECIFIED = 0, /** CREATING - Security group is being created. */ CREATING = 1, /** ACTIVE - Security is active and it's rules are applied to the network interfaces. */ ACTIVE = 2, /** UPDATING - Security group is updating. Updating is a long operation because we must update all instances in SG. */ UPDATING = 3, /** DELETING - Instance is being deleted. */ DELETING = 4, UNRECOGNIZED = -1 } export declare function securityGroup_StatusFromJSON(object: any): SecurityGroup_Status; export declare function securityGroup_StatusToJSON(object: SecurityGroup_Status): string; export interface SecurityGroup_LabelsEntry { key: string; value: string; } export interface SecurityGroupRule { /** ID of the rule. */ id: string; /** Description of the rule. 0-256 characters long. */ description: string; /** Resource labels as `` key:value `` pairs. Maximum of 64 per resource. */ labels: { [key: string]: string; }; /** The direction of network traffic allowed by this rule. */ direction: SecurityGroupRule_Direction; /** The range of ports that allow traffic to pass through. Null value means any. */ ports?: PortRange; /** * Protocol name. Null value means any protocol. * Values from [IANA](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). */ protocolName: string; /** Protocol number from [IANA protocol numbers](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). */ protocolNumber: number; /** CIDR blocks to allow to recieve or send traffic. */ cidrBlocks?: CidrBlocks | undefined; /** ID of the security group to add rule to. */ securityGroupId: string | undefined; /** Predefined target. See [security groups rules](/docs/vpc/concepts/security-groups#security-groups-rules) for more information. */ predefinedTarget: string | undefined; } export declare enum SecurityGroupRule_Direction { DIRECTION_UNSPECIFIED = 0, /** INGRESS - Allows ingress traffic. */ INGRESS = 1, /** EGRESS - Allows egress traffic. */ EGRESS = 2, UNRECOGNIZED = -1 } export declare function securityGroupRule_DirectionFromJSON(object: any): SecurityGroupRule_Direction; export declare function securityGroupRule_DirectionToJSON(object: SecurityGroupRule_Direction): string; export interface SecurityGroupRule_LabelsEntry { key: string; value: string; } export interface PortRange { /** The lowest port in the range. */ fromPort: number; /** The highest port in the range. */ toPort: number; } export interface CidrBlocks { /** IPv4 CIDR blocks to allow traffic to. */ v4CidrBlocks: string[]; /** IPv6 CIDR blocks to allow traffic to. */ v6CidrBlocks: string[]; } export declare const SecurityGroup: { encode(message: SecurityGroup, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SecurityGroup; fromJSON(object: any): SecurityGroup; toJSON(message: SecurityGroup): unknown; fromPartial, never>) | undefined; networkId?: string | undefined; status?: SecurityGroup_Status | undefined; rules?: ({ id?: string | undefined; description?: string | undefined; labels?: { [x: string]: string | undefined; } | undefined; direction?: SecurityGroupRule_Direction | undefined; ports?: { fromPort?: number | undefined; toPort?: number | undefined; } | undefined; protocolName?: string | undefined; protocolNumber?: number | undefined; cidrBlocks?: { v4CidrBlocks?: string[] | undefined; v6CidrBlocks?: string[] | undefined; } | undefined; securityGroupId?: string | undefined; predefinedTarget?: string | undefined; }[] & ({ id?: string | undefined; description?: string | undefined; labels?: { [x: string]: string | undefined; } | undefined; direction?: SecurityGroupRule_Direction | undefined; ports?: { fromPort?: number | undefined; toPort?: number | undefined; } | undefined; protocolName?: string | undefined; protocolNumber?: number | undefined; cidrBlocks?: { v4CidrBlocks?: string[] | undefined; v6CidrBlocks?: string[] | undefined; } | undefined; securityGroupId?: string | undefined; predefinedTarget?: string | undefined; } & { id?: string | undefined; description?: string | undefined; labels?: ({ [x: string]: string | undefined; } & { [x: string]: string | undefined; } & Record, never>) | undefined; direction?: SecurityGroupRule_Direction | undefined; ports?: ({ fromPort?: number | undefined; toPort?: number | undefined; } & { fromPort?: number | undefined; toPort?: number | undefined; } & Record, never>) | undefined; protocolName?: string | undefined; protocolNumber?: number | undefined; cidrBlocks?: ({ v4CidrBlocks?: string[] | undefined; v6CidrBlocks?: string[] | undefined; } & { v4CidrBlocks?: (string[] & string[] & Record, never>) | undefined; v6CidrBlocks?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; securityGroupId?: string | undefined; predefinedTarget?: string | undefined; } & Record, never>)[] & Record, never>) | undefined; defaultForNetwork?: boolean | undefined; } & Record, never>>(object: I): SecurityGroup; }; export declare const SecurityGroup_LabelsEntry: { encode(message: SecurityGroup_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SecurityGroup_LabelsEntry; fromJSON(object: any): SecurityGroup_LabelsEntry; toJSON(message: SecurityGroup_LabelsEntry): unknown; fromPartial, never>>(object: I): SecurityGroup_LabelsEntry; }; export declare const SecurityGroupRule: { encode(message: SecurityGroupRule, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SecurityGroupRule; fromJSON(object: any): SecurityGroupRule; toJSON(message: SecurityGroupRule): unknown; fromPartial, never>) | undefined; direction?: SecurityGroupRule_Direction | undefined; ports?: ({ fromPort?: number | undefined; toPort?: number | undefined; } & { fromPort?: number | undefined; toPort?: number | undefined; } & Record, never>) | undefined; protocolName?: string | undefined; protocolNumber?: number | undefined; cidrBlocks?: ({ v4CidrBlocks?: string[] | undefined; v6CidrBlocks?: string[] | undefined; } & { v4CidrBlocks?: (string[] & string[] & Record, never>) | undefined; v6CidrBlocks?: (string[] & string[] & Record, never>) | undefined; } & Record, never>) | undefined; securityGroupId?: string | undefined; predefinedTarget?: string | undefined; } & Record, never>>(object: I): SecurityGroupRule; }; export declare const SecurityGroupRule_LabelsEntry: { encode(message: SecurityGroupRule_LabelsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SecurityGroupRule_LabelsEntry; fromJSON(object: any): SecurityGroupRule_LabelsEntry; toJSON(message: SecurityGroupRule_LabelsEntry): unknown; fromPartial, never>>(object: I): SecurityGroupRule_LabelsEntry; }; export declare const PortRange: { encode(message: PortRange, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PortRange; fromJSON(object: any): PortRange; toJSON(message: PortRange): unknown; fromPartial, never>>(object: I): PortRange; }; export declare const CidrBlocks: { encode(message: CidrBlocks, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CidrBlocks; fromJSON(object: any): CidrBlocks; toJSON(message: CidrBlocks): unknown; fromPartial, never>) | undefined; v6CidrBlocks?: (string[] & string[] & Record, never>) | undefined; } & Record, never>>(object: I): CidrBlocks; }; 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 {};