diff --git a/.gitattributes b/.gitattributes index 1d6e677fe8d..29587f87c3b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,5 @@ docs/theme/js/theme.js linguist-vendored=false # https://github.com/github/linguist/blob/v7.23.0/lib/linguist/generated.rb#L349-L358 *_pb.js linguist-generated *_pb.d.ts linguist-generated +*_pb.ts linguist-generated +*_pb.grpc-*.ts linguist-generated diff --git a/.github/workflows/lint-ui-bypass.yaml b/.github/workflows/lint-ui-bypass.yaml index f01b8ea1099..a7aad50ef0f 100644 --- a/.github/workflows/lint-ui-bypass.yaml +++ b/.github/workflows/lint-ui-bypass.yaml @@ -16,10 +16,12 @@ on: paths-ignore: - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' merge_group: paths-ignore: - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' jobs: lint: diff --git a/.github/workflows/lint-ui.yaml b/.github/workflows/lint-ui.yaml index d9a5b356fa2..d269152c314 100644 --- a/.github/workflows/lint-ui.yaml +++ b/.github/workflows/lint-ui.yaml @@ -6,10 +6,12 @@ on: paths: - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' merge_group: paths: - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' jobs: lint: diff --git a/.github/workflows/unit-tests-ui-bypass.yaml b/.github/workflows/unit-tests-ui-bypass.yaml index 6116cf88f87..fa5f6932646 100644 --- a/.github/workflows/unit-tests-ui-bypass.yaml +++ b/.github/workflows/unit-tests-ui-bypass.yaml @@ -17,11 +17,13 @@ on: - '.github/workflows/unit-tests-ui.yaml' - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' merge_group: paths-ignore: - '.github/workflows/unit-tests-ui.yaml' - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' jobs: lint: diff --git a/.github/workflows/unit-tests-ui.yaml b/.github/workflows/unit-tests-ui.yaml index 44a56239dc2..aaf471ceb1e 100644 --- a/.github/workflows/unit-tests-ui.yaml +++ b/.github/workflows/unit-tests-ui.yaml @@ -7,11 +7,13 @@ on: - '.github/workflows/unit-tests-ui.yaml' - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' merge_group: paths: - '.github/workflows/unit-tests-ui.yaml' - 'web/**' - 'gen/proto/js/**' + - 'gen/proto/ts/**' jobs: test: diff --git a/buf-js.gen.yaml b/buf-js.gen.yaml index bfd50a1dd14..579ee11932f 100644 --- a/buf-js.gen.yaml +++ b/buf-js.gen.yaml @@ -18,4 +18,11 @@ plugins: - name: ts strategy: all out: gen/proto/js + path: + - npm + - exec + - --yes + - --package=grpc_tools_node_protoc_ts@5.0.1 + - -- + - protoc-gen-ts opt: "service=grpc-node" diff --git a/buf-ts.gen.yaml b/buf-ts.gen.yaml new file mode 100644 index 00000000000..b071c061c07 --- /dev/null +++ b/buf-ts.gen.yaml @@ -0,0 +1,13 @@ +version: v1 +plugins: + - name: typescript + out: gen/proto/ts + opt: long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck + path: + - npm + - exec + - --yes + - --package=@protobuf-ts/plugin@2.9.3 + - -- + - protoc-gen-ts + strategy: all diff --git a/build.assets/genproto.sh b/build.assets/genproto.sh index 643e228a1a1..47f12fec656 100755 --- a/build.assets/genproto.sh +++ b/build.assets/genproto.sh @@ -73,6 +73,7 @@ main() { --path=proto/prehog/ # Generate JS protos. + # TODO(ryan): remove once Connect has migrated to the TS protobufs. [[ $skip_js -eq 0 ]] && echoed buf generate --template=buf-js.gen.yaml \ --path=proto/prehog/ \ --path=proto/teleport/lib/teleterm/ \ @@ -80,6 +81,15 @@ main() { --path=api/proto/teleport/accesslist/ \ --path=api/proto/teleport/trait/ \ --path=api/proto/teleport/header/ + + # Generate TS protos. + [[ $skip_js -eq 0 ]] && echoed buf generate --template=buf-ts.gen.yaml \ + --path=proto/prehog/ \ + --path=proto/teleport/lib/teleterm/ \ + --path=api/proto/teleport/userpreferences/ \ + --path=api/proto/teleport/accesslist/ \ + --path=api/proto/teleport/trait/ \ + --path=api/proto/teleport/header/ } main "$@" diff --git a/gen/proto/ts/google/protobuf/descriptor_pb.ts b/gen/proto/ts/google/protobuf/descriptor_pb.ts new file mode 100644 index 00000000000..8fef6a8d9d8 --- /dev/null +++ b/gen/proto/ts/google/protobuf/descriptor_pb.ts @@ -0,0 +1,4511 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "google/protobuf/descriptor.proto" (package "google.protobuf", syntax proto2) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * The protocol compiler can output a FileDescriptorSet containing the .proto + * files it parses. + * + * @generated from protobuf message google.protobuf.FileDescriptorSet + */ +export interface FileDescriptorSet { + /** + * @generated from protobuf field: repeated google.protobuf.FileDescriptorProto file = 1; + */ + file: FileDescriptorProto[]; +} +/** + * Describes a complete .proto file. + * + * @generated from protobuf message google.protobuf.FileDescriptorProto + */ +export interface FileDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; // file name, relative to root of source tree + /** + * @generated from protobuf field: optional string package = 2; + */ + package?: string; // e.g. "foo", "foo.bar", etc. + /** + * Names of files imported by this file. + * + * @generated from protobuf field: repeated string dependency = 3; + */ + dependency: string[]; + /** + * Indexes of the public imported files in the dependency list above. + * + * @generated from protobuf field: repeated int32 public_dependency = 10; + */ + publicDependency: number[]; + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + * + * @generated from protobuf field: repeated int32 weak_dependency = 11; + */ + weakDependency: number[]; + /** + * All top-level definitions in this file. + * + * @generated from protobuf field: repeated google.protobuf.DescriptorProto message_type = 4; + */ + messageType: DescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 5; + */ + enumType: EnumDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.ServiceDescriptorProto service = 6; + */ + service: ServiceDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 7; + */ + extension: FieldDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.FileOptions options = 8; + */ + options?: FileOptions; + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + * + * @generated from protobuf field: optional google.protobuf.SourceCodeInfo source_code_info = 9; + */ + sourceCodeInfo?: SourceCodeInfo; + /** + * The syntax of the proto file. + * The supported values are "proto2", "proto3", and "editions". + * + * If `edition` is present, this value must be "editions". + * + * @generated from protobuf field: optional string syntax = 12; + */ + syntax?: string; + /** + * The edition of the proto file. + * + * @generated from protobuf field: optional google.protobuf.Edition edition = 14; + */ + edition?: Edition; +} +/** + * Describes a message type. + * + * @generated from protobuf message google.protobuf.DescriptorProto + */ +export interface DescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto field = 2; + */ + field: FieldDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 6; + */ + extension: FieldDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto nested_type = 3; + */ + nestedType: DescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 4; + */ + enumType: EnumDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; + */ + extensionRange: DescriptorProto_ExtensionRange[]; + /** + * @generated from protobuf field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; + */ + oneofDecl: OneofDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.MessageOptions options = 7; + */ + options?: MessageOptions; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; + */ + reservedRange: DescriptorProto_ReservedRange[]; + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + * + * @generated from protobuf field: repeated string reserved_name = 10; + */ + reservedName: string[]; +} +/** + * @generated from protobuf message google.protobuf.DescriptorProto.ExtensionRange + */ +export interface DescriptorProto_ExtensionRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; // Inclusive. + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; // Exclusive. + /** + * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions options = 3; + */ + options?: ExtensionRangeOptions; +} +/** + * Range of reserved tag numbers. Reserved tag numbers may not be used by + * fields or extension ranges in the same message. Reserved ranges may + * not overlap. + * + * @generated from protobuf message google.protobuf.DescriptorProto.ReservedRange + */ +export interface DescriptorProto_ReservedRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; // Inclusive. + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; // Exclusive. +} +/** + * @generated from protobuf message google.protobuf.ExtensionRangeOptions + */ +export interface ExtensionRangeOptions { + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; + /** + * For external users: DO NOT USE. We are in the process of open sourcing + * extension declaration and executing internal cleanups before it can be + * used externally. + * + * @generated from protobuf field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; + */ + declaration: ExtensionRangeOptions_Declaration[]; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + /** + * The verification state of the range. + * TODO: flip the default to DECLARATION once all empty ranges + * are marked as UNVERIFIED. + * + * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; + */ + verification?: ExtensionRangeOptions_VerificationState; +} +/** + * @generated from protobuf message google.protobuf.ExtensionRangeOptions.Declaration + */ +export interface ExtensionRangeOptions_Declaration { + /** + * The extension number declared within the extension range. + * + * @generated from protobuf field: optional int32 number = 1; + */ + number?: number; + /** + * The fully-qualified name of the extension field. There must be a leading + * dot in front of the full name. + * + * @generated from protobuf field: optional string full_name = 2; + */ + fullName?: string; + /** + * The fully-qualified type name of the extension field. Unlike + * Metadata.type, Declaration.type must have a leading dot for messages + * and enums. + * + * @generated from protobuf field: optional string type = 3; + */ + type?: string; + /** + * If true, indicates that the number is reserved in the extension range, + * and any extension field with the number will fail to compile. Set this + * when a declared extension field is deleted. + * + * @generated from protobuf field: optional bool reserved = 5; + */ + reserved?: boolean; + /** + * If true, indicates that the extension must be defined as repeated. + * Otherwise the extension must be defined as optional. + * + * @generated from protobuf field: optional bool repeated = 6; + */ + repeated?: boolean; +} +/** + * The verification state of the extension range. + * + * @generated from protobuf enum google.protobuf.ExtensionRangeOptions.VerificationState + */ +export enum ExtensionRangeOptions_VerificationState { + /** + * All the extensions of the range must be declared. + * + * @generated from protobuf enum value: DECLARATION = 0; + */ + DECLARATION = 0, + /** + * @generated from protobuf enum value: UNVERIFIED = 1; + */ + UNVERIFIED = 1 +} +/** + * Describes a field within a message. + * + * @generated from protobuf message google.protobuf.FieldDescriptorProto + */ +export interface FieldDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional int32 number = 3; + */ + number?: number; + /** + * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Label label = 4; + */ + label?: FieldDescriptorProto_Label; + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + * + * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Type type = 5; + */ + type?: FieldDescriptorProto_Type; + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + * + * @generated from protobuf field: optional string type_name = 6; + */ + typeName?: string; + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + * + * @generated from protobuf field: optional string extendee = 2; + */ + extendee?: string; + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + * + * @generated from protobuf field: optional string default_value = 7; + */ + defaultValue?: string; + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + * + * @generated from protobuf field: optional int32 oneof_index = 9; + */ + oneofIndex?: number; + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + * + * @generated from protobuf field: optional string json_name = 10; + */ + jsonName?: string; + /** + * @generated from protobuf field: optional google.protobuf.FieldOptions options = 8; + */ + options?: FieldOptions; + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + * + * @generated from protobuf field: optional bool proto3_optional = 17; + */ + proto3Optional?: boolean; +} +/** + * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Type + */ +export enum FieldDescriptorProto_Type { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * 0 is reserved for errors. + * Order is weird for historical reasons. + * + * @generated from protobuf enum value: TYPE_DOUBLE = 1; + */ + DOUBLE = 1, + /** + * @generated from protobuf enum value: TYPE_FLOAT = 2; + */ + FLOAT = 2, + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + * + * @generated from protobuf enum value: TYPE_INT64 = 3; + */ + INT64 = 3, + /** + * @generated from protobuf enum value: TYPE_UINT64 = 4; + */ + UINT64 = 4, + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + * + * @generated from protobuf enum value: TYPE_INT32 = 5; + */ + INT32 = 5, + /** + * @generated from protobuf enum value: TYPE_FIXED64 = 6; + */ + FIXED64 = 6, + /** + * @generated from protobuf enum value: TYPE_FIXED32 = 7; + */ + FIXED32 = 7, + /** + * @generated from protobuf enum value: TYPE_BOOL = 8; + */ + BOOL = 8, + /** + * @generated from protobuf enum value: TYPE_STRING = 9; + */ + STRING = 9, + /** + * Tag-delimited aggregate. + * Group type is deprecated and not supported after google.protobuf. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. In Editions, the group wire format + * can be enabled via the `message_encoding` feature. + * + * @generated from protobuf enum value: TYPE_GROUP = 10; + */ + GROUP = 10, + /** + * Length-delimited aggregate. + * + * @generated from protobuf enum value: TYPE_MESSAGE = 11; + */ + MESSAGE = 11, + /** + * New in version 2. + * + * @generated from protobuf enum value: TYPE_BYTES = 12; + */ + BYTES = 12, + /** + * @generated from protobuf enum value: TYPE_UINT32 = 13; + */ + UINT32 = 13, + /** + * @generated from protobuf enum value: TYPE_ENUM = 14; + */ + ENUM = 14, + /** + * @generated from protobuf enum value: TYPE_SFIXED32 = 15; + */ + SFIXED32 = 15, + /** + * @generated from protobuf enum value: TYPE_SFIXED64 = 16; + */ + SFIXED64 = 16, + /** + * Uses ZigZag encoding. + * + * @generated from protobuf enum value: TYPE_SINT32 = 17; + */ + SINT32 = 17, + /** + * Uses ZigZag encoding. + * + * @generated from protobuf enum value: TYPE_SINT64 = 18; + */ + SINT64 = 18 +} +/** + * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Label + */ +export enum FieldDescriptorProto_Label { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * 0 is reserved for errors + * + * @generated from protobuf enum value: LABEL_OPTIONAL = 1; + */ + OPTIONAL = 1, + /** + * @generated from protobuf enum value: LABEL_REPEATED = 3; + */ + REPEATED = 3, + /** + * The required label is only allowed in google.protobuf. In proto3 and Editions + * it's explicitly prohibited. In Editions, the `field_presence` feature + * can be used to get this behavior. + * + * @generated from protobuf enum value: LABEL_REQUIRED = 2; + */ + REQUIRED = 2 +} +/** + * Describes a oneof. + * + * @generated from protobuf message google.protobuf.OneofDescriptorProto + */ +export interface OneofDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional google.protobuf.OneofOptions options = 2; + */ + options?: OneofOptions; +} +/** + * Describes an enum type. + * + * @generated from protobuf message google.protobuf.EnumDescriptorProto + */ +export interface EnumDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.EnumValueDescriptorProto value = 2; + */ + value: EnumValueDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.EnumOptions options = 3; + */ + options?: EnumOptions; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + * + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; + */ + reservedRange: EnumDescriptorProto_EnumReservedRange[]; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + * + * @generated from protobuf field: repeated string reserved_name = 5; + */ + reservedName: string[]; +} +/** + * Range of reserved numeric values. Reserved values may not be used by + * entries in the same enum. Reserved ranges may not overlap. + * + * Note that this is distinct from DescriptorProto.ReservedRange in that it + * is inclusive such that it can appropriately represent the entire int32 + * domain. + * + * @generated from protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange + */ +export interface EnumDescriptorProto_EnumReservedRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; // Inclusive. + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; // Inclusive. +} +/** + * Describes a value within an enum. + * + * @generated from protobuf message google.protobuf.EnumValueDescriptorProto + */ +export interface EnumValueDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional int32 number = 2; + */ + number?: number; + /** + * @generated from protobuf field: optional google.protobuf.EnumValueOptions options = 3; + */ + options?: EnumValueOptions; +} +/** + * Describes a service. + * + * @generated from protobuf message google.protobuf.ServiceDescriptorProto + */ +export interface ServiceDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.MethodDescriptorProto method = 2; + */ + method: MethodDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.ServiceOptions options = 3; + */ + options?: ServiceOptions; +} +/** + * Describes a method of a service. + * + * @generated from protobuf message google.protobuf.MethodDescriptorProto + */ +export interface MethodDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + * + * @generated from protobuf field: optional string input_type = 2; + */ + inputType?: string; + /** + * @generated from protobuf field: optional string output_type = 3; + */ + outputType?: string; + /** + * @generated from protobuf field: optional google.protobuf.MethodOptions options = 4; + */ + options?: MethodOptions; + /** + * Identifies if client streams multiple client messages + * + * @generated from protobuf field: optional bool client_streaming = 5; + */ + clientStreaming?: boolean; + /** + * Identifies if server streams multiple server messages + * + * @generated from protobuf field: optional bool server_streaming = 6; + */ + serverStreaming?: boolean; +} +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + +/** + * @generated from protobuf message google.protobuf.FileOptions + */ +export interface FileOptions { + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + * + * @generated from protobuf field: optional string java_package = 1; + */ + javaPackage?: string; + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + * + * @generated from protobuf field: optional string java_outer_classname = 8; + */ + javaOuterClassname?: string; + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + * + * @generated from protobuf field: optional bool java_multiple_files = 10; + */ + javaMultipleFiles?: boolean; + /** + * This option does nothing. + * + * @deprecated + * @generated from protobuf field: optional bool java_generate_equals_and_hash = 20 [deprecated = true]; + */ + javaGenerateEqualsAndHash?: boolean; + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + * + * @generated from protobuf field: optional bool java_string_check_utf8 = 27; + */ + javaStringCheckUtf8?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; + */ + optimizeFor?: FileOptions_OptimizeMode; + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + * + * @generated from protobuf field: optional string go_package = 11; + */ + goPackage?: string; + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + * + * @generated from protobuf field: optional bool cc_generic_services = 16; + */ + ccGenericServices?: boolean; + /** + * @generated from protobuf field: optional bool java_generic_services = 17; + */ + javaGenericServices?: boolean; + /** + * @generated from protobuf field: optional bool py_generic_services = 18; + */ + pyGenericServices?: boolean; + /** + * @generated from protobuf field: optional bool php_generic_services = 42; + */ + phpGenericServices?: boolean; + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + * + * @generated from protobuf field: optional bool deprecated = 23; + */ + deprecated?: boolean; + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + * + * @generated from protobuf field: optional bool cc_enable_arenas = 31; + */ + ccEnableArenas?: boolean; + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + * + * @generated from protobuf field: optional string objc_class_prefix = 36; + */ + objcClassPrefix?: string; + /** + * Namespace for generated classes; defaults to the package. + * + * @generated from protobuf field: optional string csharp_namespace = 37; + */ + csharpNamespace?: string; + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + * + * @generated from protobuf field: optional string swift_prefix = 39; + */ + swiftPrefix?: string; + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + * + * @generated from protobuf field: optional string php_class_prefix = 40; + */ + phpClassPrefix?: string; + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + * + * @generated from protobuf field: optional string php_namespace = 41; + */ + phpNamespace?: string; + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + * + * @generated from protobuf field: optional string php_metadata_namespace = 44; + */ + phpMetadataNamespace?: string; + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + * + * @generated from protobuf field: optional string ruby_package = 45; + */ + rubyPackage?: string; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * Generated classes can be optimized for speed or code size. + * + * @generated from protobuf enum google.protobuf.FileOptions.OptimizeMode + */ +export enum FileOptions_OptimizeMode { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * Generate complete code for parsing, serialization, + * + * @generated from protobuf enum value: SPEED = 1; + */ + SPEED = 1, + /** + * etc. + * + * Use ReflectionOps to implement these methods. + * + * @generated from protobuf enum value: CODE_SIZE = 2; + */ + CODE_SIZE = 2, + /** + * Generate code using MessageLite and the lite runtime. + * + * @generated from protobuf enum value: LITE_RUNTIME = 3; + */ + LITE_RUNTIME = 3 +} +/** + * @generated from protobuf message google.protobuf.MessageOptions + */ +export interface MessageOptions { + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + * + * @generated from protobuf field: optional bool message_set_wire_format = 1; + */ + messageSetWireFormat?: boolean; + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + * + * @generated from protobuf field: optional bool no_standard_descriptor_accessor = 2; + */ + noStandardDescriptorAccessor?: boolean; + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + * + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * @generated from protobuf field: optional bool map_entry = 7; + */ + mapEntry?: boolean; + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * and strips underscored from the fields before comparison in proto3 only. + * The new behavior takes `json_name` into account and applies to proto2 as + * well. + * + * This should only be used as a temporary measure against broken builds due + * to the change in behavior for JSON field name conflicts. + * + * TODO This is legacy behavior we plan to remove once downstream + * teams have had time to migrate. + * + * @deprecated + * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + */ + deprecatedLegacyJsonFieldConflicts?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 12; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.FieldOptions + */ +export interface FieldOptions { + /** + * The ctype option instructs the C++ code generator to use a different + * representation of the field than it normally would. See the specific + * options below. This option is only implemented to support use of + * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + * type "bytes" in the open source release -- sorry, we'll try to include + * other types in a future version! + * + * @generated from protobuf field: optional google.protobuf.FieldOptions.CType ctype = 1; + */ + ctype?: FieldOptions_CType; + /** + * The packed option can be enabled for repeated primitive fields to enable + * a more efficient representation on the wire. Rather than repeatedly + * writing the tag and type for each element, the entire array is encoded as + * a single length-delimited blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. This option is prohibited in + * Editions, but the `repeated_field_encoding` feature can be used to control + * the behavior. + * + * @generated from protobuf field: optional bool packed = 2; + */ + packed?: boolean; + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + * + * @generated from protobuf field: optional google.protobuf.FieldOptions.JSType jstype = 6; + */ + jstype?: FieldOptions_JSType; + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. + * + * @generated from protobuf field: optional bool lazy = 5; + */ + lazy?: boolean; + /** + * unverified_lazy does no correctness checks on the byte stream. This should + * only be used where lazy with verification is prohibitive for performance + * reasons. + * + * @generated from protobuf field: optional bool unverified_lazy = 15; + */ + unverifiedLazy?: boolean; + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * For Google-internal migration only. Do not use. + * + * @generated from protobuf field: optional bool weak = 10; + */ + weak?: boolean; + /** + * Indicate that the field value should not be printed out when using debug + * formats, e.g. when the field contains sensitive credentials. + * + * @generated from protobuf field: optional bool debug_redact = 16; + */ + debugRedact?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.FieldOptions.OptionRetention retention = 17; + */ + retention?: FieldOptions_OptionRetention; + /** + * @generated from protobuf field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; + */ + targets: FieldOptions_OptionTargetType[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + */ + editionDefaults: FieldOptions_EditionDefault[]; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 21; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.FieldOptions.EditionDefault + */ +export interface FieldOptions_EditionDefault { + /** + * @generated from protobuf field: optional google.protobuf.Edition edition = 3; + */ + edition?: Edition; + /** + * @generated from protobuf field: optional string value = 2; + */ + value?: string; // Textproto value. +} +/** + * @generated from protobuf enum google.protobuf.FieldOptions.CType + */ +export enum FieldOptions_CType { + /** + * Default mode. + * + * @generated from protobuf enum value: STRING = 0; + */ + STRING = 0, + /** + * The option [ctype=CORD] may be applied to a non-repeated field of type + * "bytes". It indicates that in C++, the data should be stored in a Cord + * instead of a string. For very large strings, this may reduce memory + * fragmentation. It may also allow better performance when parsing from a + * Cord, or when parsing with aliasing enabled, as the parsed Cord may then + * alias the original buffer. + * + * @generated from protobuf enum value: CORD = 1; + */ + CORD = 1, + /** + * @generated from protobuf enum value: STRING_PIECE = 2; + */ + STRING_PIECE = 2 +} +/** + * @generated from protobuf enum google.protobuf.FieldOptions.JSType + */ +export enum FieldOptions_JSType { + /** + * Use the default type. + * + * @generated from protobuf enum value: JS_NORMAL = 0; + */ + JS_NORMAL = 0, + /** + * Use JavaScript strings. + * + * @generated from protobuf enum value: JS_STRING = 1; + */ + JS_STRING = 1, + /** + * Use JavaScript numbers. + * + * @generated from protobuf enum value: JS_NUMBER = 2; + */ + JS_NUMBER = 2 +} +/** + * If set to RETENTION_SOURCE, the option will be omitted from the binary. + * Note: as of January 2023, support for this is in progress and does not yet + * have an effect (b/264593489). + * + * @generated from protobuf enum google.protobuf.FieldOptions.OptionRetention + */ +export enum FieldOptions_OptionRetention { + /** + * @generated from protobuf enum value: RETENTION_UNKNOWN = 0; + */ + RETENTION_UNKNOWN = 0, + /** + * @generated from protobuf enum value: RETENTION_RUNTIME = 1; + */ + RETENTION_RUNTIME = 1, + /** + * @generated from protobuf enum value: RETENTION_SOURCE = 2; + */ + RETENTION_SOURCE = 2 +} +/** + * This indicates the types of entities that the field may apply to when used + * as an option. If it is unset, then the field may be freely used as an + * option on any kind of entity. Note: as of January 2023, support for this is + * in progress and does not yet have an effect (b/264593489). + * + * @generated from protobuf enum google.protobuf.FieldOptions.OptionTargetType + */ +export enum FieldOptions_OptionTargetType { + /** + * @generated from protobuf enum value: TARGET_TYPE_UNKNOWN = 0; + */ + TARGET_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: TARGET_TYPE_FILE = 1; + */ + TARGET_TYPE_FILE = 1, + /** + * @generated from protobuf enum value: TARGET_TYPE_EXTENSION_RANGE = 2; + */ + TARGET_TYPE_EXTENSION_RANGE = 2, + /** + * @generated from protobuf enum value: TARGET_TYPE_MESSAGE = 3; + */ + TARGET_TYPE_MESSAGE = 3, + /** + * @generated from protobuf enum value: TARGET_TYPE_FIELD = 4; + */ + TARGET_TYPE_FIELD = 4, + /** + * @generated from protobuf enum value: TARGET_TYPE_ONEOF = 5; + */ + TARGET_TYPE_ONEOF = 5, + /** + * @generated from protobuf enum value: TARGET_TYPE_ENUM = 6; + */ + TARGET_TYPE_ENUM = 6, + /** + * @generated from protobuf enum value: TARGET_TYPE_ENUM_ENTRY = 7; + */ + TARGET_TYPE_ENUM_ENTRY = 7, + /** + * @generated from protobuf enum value: TARGET_TYPE_SERVICE = 8; + */ + TARGET_TYPE_SERVICE = 8, + /** + * @generated from protobuf enum value: TARGET_TYPE_METHOD = 9; + */ + TARGET_TYPE_METHOD = 9 +} +/** + * @generated from protobuf message google.protobuf.OneofOptions + */ +export interface OneofOptions { + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 1; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.EnumOptions + */ +export interface EnumOptions { + /** + * Set this option to true to allow mapping different tag names to the same + * value. + * + * @generated from protobuf field: optional bool allow_alias = 2; + */ + allowAlias?: boolean; + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * and strips underscored from the fields before comparison in proto3 only. + * The new behavior takes `json_name` into account and applies to proto2 as + * well. + * TODO Remove this legacy behavior once downstream teams have + * had time to migrate. + * + * @deprecated + * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + */ + deprecatedLegacyJsonFieldConflicts?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 7; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.EnumValueOptions + */ +export interface EnumValueOptions { + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + * + * @generated from protobuf field: optional bool deprecated = 1; + */ + deprecated?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; + /** + * Indicate that fields annotated with this enum value should not be printed + * out when using debug formats, e.g. when the field contains sensitive + * credentials. + * + * @generated from protobuf field: optional bool debug_redact = 3; + */ + debugRedact?: boolean; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.ServiceOptions + */ +export interface ServiceOptions { + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 34; + */ + features?: FeatureSet; + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + * + * @generated from protobuf field: optional bool deprecated = 33; + */ + deprecated?: boolean; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.MethodOptions + */ +export interface MethodOptions { + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + * + * @generated from protobuf field: optional bool deprecated = 33; + */ + deprecated?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; + */ + idempotencyLevel?: MethodOptions_IdempotencyLevel; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 35; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + * + * @generated from protobuf enum google.protobuf.MethodOptions.IdempotencyLevel + */ +export enum MethodOptions_IdempotencyLevel { + /** + * @generated from protobuf enum value: IDEMPOTENCY_UNKNOWN = 0; + */ + IDEMPOTENCY_UNKNOWN = 0, + /** + * implies idempotent + * + * @generated from protobuf enum value: NO_SIDE_EFFECTS = 1; + */ + NO_SIDE_EFFECTS = 1, + /** + * idempotent, but may have side effects + * + * @generated from protobuf enum value: IDEMPOTENT = 2; + */ + IDEMPOTENT = 2 +} +/** + * A message representing a option the parser does not recognize. This only + * appears in options protos created by the compiler::Parser class. + * DescriptorPool resolves these when building Descriptor objects. Therefore, + * options protos in descriptor objects (e.g. returned by Descriptor::options(), + * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + * in them. + * + * @generated from protobuf message google.protobuf.UninterpretedOption + */ +export interface UninterpretedOption { + /** + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption.NamePart name = 2; + */ + name: UninterpretedOption_NamePart[]; + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + * + * @generated from protobuf field: optional string identifier_value = 3; + */ + identifierValue?: string; + /** + * @generated from protobuf field: optional uint64 positive_int_value = 4; + */ + positiveIntValue?: number; + /** + * @generated from protobuf field: optional int64 negative_int_value = 5; + */ + negativeIntValue?: number; + /** + * @generated from protobuf field: optional double double_value = 6; + */ + doubleValue?: number; + /** + * @generated from protobuf field: optional bytes string_value = 7; + */ + stringValue?: Uint8Array; + /** + * @generated from protobuf field: optional string aggregate_value = 8; + */ + aggregateValue?: string; +} +/** + * The name of the uninterpreted option. Each string represents a segment in + * a dot-separated name. is_extension is true iff a segment represents an + * extension (denoted with parentheses in options specs in .proto files). + * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + * "foo.(bar.baz).moo". + * + * @generated from protobuf message google.protobuf.UninterpretedOption.NamePart + */ +export interface UninterpretedOption_NamePart { + /** + * @generated from protobuf field: string name_part = 1; + */ + namePart: string; + /** + * @generated from protobuf field: bool is_extension = 2; + */ + isExtension: boolean; +} +// =================================================================== +// Features + +/** + * TODO Enums in C++ gencode (and potentially other languages) are + * not well scoped. This means that each of the feature enums below can clash + * with each other. The short names we've chosen maximize call-site + * readability, but leave us very open to this scenario. A future feature will + * be designed and implemented to handle this, hopefully before we ever hit a + * conflict here. + * + * @generated from protobuf message google.protobuf.FeatureSet + */ +export interface FeatureSet { + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; + */ + fieldPresence?: FeatureSet_FieldPresence; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.EnumType enum_type = 2; + */ + enumType?: FeatureSet_EnumType; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; + */ + repeatedFieldEncoding?: FeatureSet_RepeatedFieldEncoding; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; + */ + utf8Validation?: FeatureSet_Utf8Validation; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; + */ + messageEncoding?: FeatureSet_MessageEncoding; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.JsonFormat json_format = 6; + */ + jsonFormat?: FeatureSet_JsonFormat; +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.FieldPresence + */ +export enum FeatureSet_FieldPresence { + /** + * @generated from protobuf enum value: FIELD_PRESENCE_UNKNOWN = 0; + */ + FIELD_PRESENCE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: EXPLICIT = 1; + */ + EXPLICIT = 1, + /** + * @generated from protobuf enum value: IMPLICIT = 2; + */ + IMPLICIT = 2, + /** + * @generated from protobuf enum value: LEGACY_REQUIRED = 3; + */ + LEGACY_REQUIRED = 3 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.EnumType + */ +export enum FeatureSet_EnumType { + /** + * @generated from protobuf enum value: ENUM_TYPE_UNKNOWN = 0; + */ + ENUM_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: OPEN = 1; + */ + OPEN = 1, + /** + * @generated from protobuf enum value: CLOSED = 2; + */ + CLOSED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.RepeatedFieldEncoding + */ +export enum FeatureSet_RepeatedFieldEncoding { + /** + * @generated from protobuf enum value: REPEATED_FIELD_ENCODING_UNKNOWN = 0; + */ + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + /** + * @generated from protobuf enum value: PACKED = 1; + */ + PACKED = 1, + /** + * @generated from protobuf enum value: EXPANDED = 2; + */ + EXPANDED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.Utf8Validation + */ +export enum FeatureSet_Utf8Validation { + /** + * @generated from protobuf enum value: UTF8_VALIDATION_UNKNOWN = 0; + */ + UTF8_VALIDATION_UNKNOWN = 0, + /** + * @generated from protobuf enum value: NONE = 1; + */ + NONE = 1, + /** + * @generated from protobuf enum value: VERIFY = 2; + */ + VERIFY = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.MessageEncoding + */ +export enum FeatureSet_MessageEncoding { + /** + * @generated from protobuf enum value: MESSAGE_ENCODING_UNKNOWN = 0; + */ + MESSAGE_ENCODING_UNKNOWN = 0, + /** + * @generated from protobuf enum value: LENGTH_PREFIXED = 1; + */ + LENGTH_PREFIXED = 1, + /** + * @generated from protobuf enum value: DELIMITED = 2; + */ + DELIMITED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.JsonFormat + */ +export enum FeatureSet_JsonFormat { + /** + * @generated from protobuf enum value: JSON_FORMAT_UNKNOWN = 0; + */ + JSON_FORMAT_UNKNOWN = 0, + /** + * @generated from protobuf enum value: ALLOW = 1; + */ + ALLOW = 1, + /** + * @generated from protobuf enum value: LEGACY_BEST_EFFORT = 2; + */ + LEGACY_BEST_EFFORT = 2 +} +/** + * A compiled specification for the defaults of a set of features. These + * messages are generated from FeatureSet extensions and can be used to seed + * feature resolution. The resolution with this object becomes a simple search + * for the closest matching edition, followed by proto merges. + * + * @generated from protobuf message google.protobuf.FeatureSetDefaults + */ +export interface FeatureSetDefaults { + /** + * @generated from protobuf field: repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; + */ + defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; + /** + * The minimum supported edition (inclusive) when this was constructed. + * Editions before this will not have defaults. + * + * @generated from protobuf field: optional google.protobuf.Edition minimum_edition = 4; + */ + minimumEdition?: Edition; + /** + * The maximum known edition (inclusive) when this was constructed. Editions + * after this will not have reliable defaults. + * + * @generated from protobuf field: optional google.protobuf.Edition maximum_edition = 5; + */ + maximumEdition?: Edition; +} +/** + * A map from every known edition with a unique set of defaults to its + * defaults. Not all editions may be contained here. For a given edition, + * the defaults at the closest matching edition ordered at or before it should + * be used. This field must be in strict ascending order by edition. + * + * @generated from protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + */ +export interface FeatureSetDefaults_FeatureSetEditionDefault { + /** + * @generated from protobuf field: optional google.protobuf.Edition edition = 3; + */ + edition?: Edition; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; +} +// =================================================================== +// Optional source code info + +/** + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. + * + * @generated from protobuf message google.protobuf.SourceCodeInfo + */ +export interface SourceCodeInfo { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + * + * @generated from protobuf field: repeated google.protobuf.SourceCodeInfo.Location location = 1; + */ + location: SourceCodeInfo_Location[]; +} +/** + * @generated from protobuf message google.protobuf.SourceCodeInfo.Location + */ +export interface SourceCodeInfo_Location { + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition occurs. + * For example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + * + * @generated from protobuf field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + * + * @generated from protobuf field: repeated int32 span = 2 [packed = true]; + */ + span: number[]; + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to moo. + * // + * // Another line attached to moo. + * optional double moo = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to moo or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. *\/ + * /* Block comment attached to + * * grault. *\/ + * optional int32 grault = 6; + * + * // ignored detached comments. + * + * @generated from protobuf field: optional string leading_comments = 3; + */ + leadingComments?: string; + /** + * @generated from protobuf field: optional string trailing_comments = 4; + */ + trailingComments?: string; + /** + * @generated from protobuf field: repeated string leading_detached_comments = 6; + */ + leadingDetachedComments: string[]; +} +/** + * Describes the relationship between generated code and its original source + * file. A GeneratedCodeInfo message is associated with only one generated + * source file, but may contain references to different source .proto files. + * + * @generated from protobuf message google.protobuf.GeneratedCodeInfo + */ +export interface GeneratedCodeInfo { + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + * + * @generated from protobuf field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; + */ + annotation: GeneratedCodeInfo_Annotation[]; +} +/** + * @generated from protobuf message google.protobuf.GeneratedCodeInfo.Annotation + */ +export interface GeneratedCodeInfo_Annotation { + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + * + * @generated from protobuf field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + /** + * Identifies the filesystem path to the original source .proto. + * + * @generated from protobuf field: optional string source_file = 2; + */ + sourceFile?: string; + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + * + * @generated from protobuf field: optional int32 begin = 3; + */ + begin?: number; + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified object. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + * + * @generated from protobuf field: optional int32 end = 4; + */ + end?: number; + /** + * @generated from protobuf field: optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; + */ + semantic?: GeneratedCodeInfo_Annotation_Semantic; +} +/** + * Represents the identified object's effect on the element in the original + * .proto file. + * + * @generated from protobuf enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic + */ +export enum GeneratedCodeInfo_Annotation_Semantic { + /** + * There is no effect or the effect is indescribable. + * + * @generated from protobuf enum value: NONE = 0; + */ + NONE = 0, + /** + * The element is set or otherwise mutated. + * + * @generated from protobuf enum value: SET = 1; + */ + SET = 1, + /** + * An alias to the element is returned. + * + * @generated from protobuf enum value: ALIAS = 2; + */ + ALIAS = 2 +} +/** + * The full set of known editions. + * + * @generated from protobuf enum google.protobuf.Edition + */ +export enum Edition { + /** + * A placeholder for an unknown edition value. + * + * @generated from protobuf enum value: EDITION_UNKNOWN = 0; + */ + EDITION_UNKNOWN = 0, + /** + * Legacy syntax "editions". These pre-date editions, but behave much like + * distinct editions. These can't be used to specify the edition of proto + * files, but feature definitions must supply proto2/proto3 defaults for + * backwards compatibility. + * + * @generated from protobuf enum value: EDITION_PROTO2 = 998; + */ + EDITION_PROTO2 = 998, + /** + * @generated from protobuf enum value: EDITION_PROTO3 = 999; + */ + EDITION_PROTO3 = 999, + /** + * Editions that have been released. The specific values are arbitrary and + * should not be depended on, but they will always be time-ordered for easy + * comparison. + * + * @generated from protobuf enum value: EDITION_2023 = 1000; + */ + EDITION_2023 = 1000, + /** + * Placeholder editions for testing feature resolution. These should not be + * used or relyed on outside of tests. + * + * @generated from protobuf enum value: EDITION_1_TEST_ONLY = 1; + */ + EDITION_1_TEST_ONLY = 1, + /** + * @generated from protobuf enum value: EDITION_2_TEST_ONLY = 2; + */ + EDITION_2_TEST_ONLY = 2, + /** + * @generated from protobuf enum value: EDITION_99997_TEST_ONLY = 99997; + */ + EDITION_99997_TEST_ONLY = 99997, + /** + * @generated from protobuf enum value: EDITION_99998_TEST_ONLY = 99998; + */ + EDITION_99998_TEST_ONLY = 99998, + /** + * @generated from protobuf enum value: EDITION_99999_TEST_ONLY = 99999; + */ + EDITION_99999_TEST_ONLY = 99999 +} +// @generated message type with reflection information, may provide speed optimized methods +class FileDescriptorSet$Type extends MessageType { + constructor() { + super("google.protobuf.FileDescriptorSet", [ + { no: 1, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto } + ]); + } + create(value?: PartialMessage): FileDescriptorSet { + const message = globalThis.Object.create((this.messagePrototype!)); + message.file = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorSet): FileDescriptorSet { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.FileDescriptorProto file */ 1: + message.file.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FileDescriptorSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.FileDescriptorProto file = 1; */ + for (let i = 0; i < message.file.length; i++) + FileDescriptorProto.internalBinaryWrite(message.file[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FileDescriptorSet + */ +export const FileDescriptorSet = new FileDescriptorSet$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FileDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.FileDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "public_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 11, name: "weak_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 4, name: "message_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, + { no: 5, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, + { no: 6, name: "service", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ServiceDescriptorProto }, + { no: 7, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, + { no: 8, name: "options", kind: "message", T: () => FileOptions }, + { no: 9, name: "source_code_info", kind: "message", T: () => SourceCodeInfo }, + { no: 12, name: "syntax", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 14, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] } + ]); + } + create(value?: PartialMessage): FileDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.dependency = []; + message.publicDependency = []; + message.weakDependency = []; + message.messageType = []; + message.enumType = []; + message.service = []; + message.extension = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorProto): FileDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional string package */ 2: + message.package = reader.string(); + break; + case /* repeated string dependency */ 3: + message.dependency.push(reader.string()); + break; + case /* repeated int32 public_dependency */ 10: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.publicDependency.push(reader.int32()); + else + message.publicDependency.push(reader.int32()); + break; + case /* repeated int32 weak_dependency */ 11: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.weakDependency.push(reader.int32()); + else + message.weakDependency.push(reader.int32()); + break; + case /* repeated google.protobuf.DescriptorProto message_type */ 4: + message.messageType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 5: + message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.ServiceDescriptorProto service */ 6: + message.service.push(ServiceDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.FieldDescriptorProto extension */ 7: + message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.FileOptions options */ 8: + message.options = FileOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* optional google.protobuf.SourceCodeInfo source_code_info */ 9: + message.sourceCodeInfo = SourceCodeInfo.internalBinaryRead(reader, reader.uint32(), options, message.sourceCodeInfo); + break; + case /* optional string syntax */ 12: + message.syntax = reader.string(); + break; + case /* optional google.protobuf.Edition edition */ 14: + message.edition = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FileDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional string package = 2; */ + if (message.package !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.package); + /* repeated string dependency = 3; */ + for (let i = 0; i < message.dependency.length; i++) + writer.tag(3, WireType.LengthDelimited).string(message.dependency[i]); + /* repeated int32 public_dependency = 10; */ + for (let i = 0; i < message.publicDependency.length; i++) + writer.tag(10, WireType.Varint).int32(message.publicDependency[i]); + /* repeated int32 weak_dependency = 11; */ + for (let i = 0; i < message.weakDependency.length; i++) + writer.tag(11, WireType.Varint).int32(message.weakDependency[i]); + /* repeated google.protobuf.DescriptorProto message_type = 4; */ + for (let i = 0; i < message.messageType.length; i++) + DescriptorProto.internalBinaryWrite(message.messageType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.EnumDescriptorProto enum_type = 5; */ + for (let i = 0; i < message.enumType.length; i++) + EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.ServiceDescriptorProto service = 6; */ + for (let i = 0; i < message.service.length; i++) + ServiceDescriptorProto.internalBinaryWrite(message.service[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.FieldDescriptorProto extension = 7; */ + for (let i = 0; i < message.extension.length; i++) + FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.FileOptions options = 8; */ + if (message.options) + FileOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.SourceCodeInfo source_code_info = 9; */ + if (message.sourceCodeInfo) + SourceCodeInfo.internalBinaryWrite(message.sourceCodeInfo, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* optional string syntax = 12; */ + if (message.syntax !== undefined) + writer.tag(12, WireType.LengthDelimited).string(message.syntax); + /* optional google.protobuf.Edition edition = 14; */ + if (message.edition !== undefined) + writer.tag(14, WireType.Varint).int32(message.edition); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FileDescriptorProto + */ +export const FileDescriptorProto = new FileDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.DescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "field", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, + { no: 6, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, + { no: 3, name: "nested_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, + { no: 4, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, + { no: 5, name: "extension_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ExtensionRange }, + { no: 8, name: "oneof_decl", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OneofDescriptorProto }, + { no: 7, name: "options", kind: "message", T: () => MessageOptions }, + { no: 9, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ReservedRange }, + { no: 10, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.field = []; + message.extension = []; + message.nestedType = []; + message.enumType = []; + message.extensionRange = []; + message.oneofDecl = []; + message.reservedRange = []; + message.reservedName = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto): DescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* repeated google.protobuf.FieldDescriptorProto field */ 2: + message.field.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.FieldDescriptorProto extension */ 6: + message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.DescriptorProto nested_type */ 3: + message.nestedType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 4: + message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range */ 5: + message.extensionRange.push(DescriptorProto_ExtensionRange.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.OneofDescriptorProto oneof_decl */ 8: + message.oneofDecl.push(OneofDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.MessageOptions options */ 7: + message.options = MessageOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range */ 9: + message.reservedRange.push(DescriptorProto_ReservedRange.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated string reserved_name */ 10: + message.reservedName.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* repeated google.protobuf.FieldDescriptorProto field = 2; */ + for (let i = 0; i < message.field.length; i++) + FieldDescriptorProto.internalBinaryWrite(message.field[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.FieldDescriptorProto extension = 6; */ + for (let i = 0; i < message.extension.length; i++) + FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.DescriptorProto nested_type = 3; */ + for (let i = 0; i < message.nestedType.length; i++) + DescriptorProto.internalBinaryWrite(message.nestedType[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.EnumDescriptorProto enum_type = 4; */ + for (let i = 0; i < message.enumType.length; i++) + EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; */ + for (let i = 0; i < message.extensionRange.length; i++) + DescriptorProto_ExtensionRange.internalBinaryWrite(message.extensionRange[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; */ + for (let i = 0; i < message.oneofDecl.length; i++) + OneofDescriptorProto.internalBinaryWrite(message.oneofDecl[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.MessageOptions options = 7; */ + if (message.options) + MessageOptions.internalBinaryWrite(message.options, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; */ + for (let i = 0; i < message.reservedRange.length; i++) + DescriptorProto_ReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* repeated string reserved_name = 10; */ + for (let i = 0; i < message.reservedName.length; i++) + writer.tag(10, WireType.LengthDelimited).string(message.reservedName[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto + */ +export const DescriptorProto = new DescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DescriptorProto_ExtensionRange$Type extends MessageType { + constructor() { + super("google.protobuf.DescriptorProto.ExtensionRange", [ + { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "options", kind: "message", T: () => ExtensionRangeOptions } + ]); + } + create(value?: PartialMessage): DescriptorProto_ExtensionRange { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRange { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 start */ 1: + message.start = reader.int32(); + break; + case /* optional int32 end */ 2: + message.end = reader.int32(); + break; + case /* optional google.protobuf.ExtensionRangeOptions options */ 3: + message.options = ExtensionRangeOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DescriptorProto_ExtensionRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 start = 1; */ + if (message.start !== undefined) + writer.tag(1, WireType.Varint).int32(message.start); + /* optional int32 end = 2; */ + if (message.end !== undefined) + writer.tag(2, WireType.Varint).int32(message.end); + /* optional google.protobuf.ExtensionRangeOptions options = 3; */ + if (message.options) + ExtensionRangeOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ExtensionRange + */ +export const DescriptorProto_ExtensionRange = new DescriptorProto_ExtensionRange$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DescriptorProto_ReservedRange$Type extends MessageType { + constructor() { + super("google.protobuf.DescriptorProto.ReservedRange", [ + { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): DescriptorProto_ReservedRange { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ReservedRange): DescriptorProto_ReservedRange { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 start */ 1: + message.start = reader.int32(); + break; + case /* optional int32 end */ 2: + message.end = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DescriptorProto_ReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 start = 1; */ + if (message.start !== undefined) + writer.tag(1, WireType.Varint).int32(message.start); + /* optional int32 end = 2; */ + if (message.end !== undefined) + writer.tag(2, WireType.Varint).int32(message.end); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ReservedRange + */ +export const DescriptorProto_ReservedRange = new DescriptorProto_ReservedRange$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ExtensionRangeOptions$Type extends MessageType { + constructor() { + super("google.protobuf.ExtensionRangeOptions", [ + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }, + { no: 2, name: "declaration", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExtensionRangeOptions_Declaration }, + { no: 50, name: "features", kind: "message", T: () => FeatureSet }, + { no: 3, name: "verification", kind: "enum", opt: true, T: () => ["google.protobuf.ExtensionRangeOptions.VerificationState", ExtensionRangeOptions_VerificationState] } + ]); + } + create(value?: PartialMessage): ExtensionRangeOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + message.declaration = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions): ExtensionRangeOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration */ 2: + message.declaration.push(ExtensionRangeOptions_Declaration.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.FeatureSet features */ 50: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification */ 3: + message.verification = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ExtensionRangeOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; */ + for (let i = 0; i < message.declaration.length; i++) + ExtensionRangeOptions_Declaration.internalBinaryWrite(message.declaration[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.FeatureSet features = 50; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; */ + if (message.verification !== undefined) + writer.tag(3, WireType.Varint).int32(message.verification); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions + */ +export const ExtensionRangeOptions = new ExtensionRangeOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ExtensionRangeOptions_Declaration$Type extends MessageType { + constructor() { + super("google.protobuf.ExtensionRangeOptions.Declaration", [ + { no: 1, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "full_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "reserved", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "repeated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): ExtensionRangeOptions_Declaration { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions_Declaration): ExtensionRangeOptions_Declaration { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 number */ 1: + message.number = reader.int32(); + break; + case /* optional string full_name */ 2: + message.fullName = reader.string(); + break; + case /* optional string type */ 3: + message.type = reader.string(); + break; + case /* optional bool reserved */ 5: + message.reserved = reader.bool(); + break; + case /* optional bool repeated */ 6: + message.repeated = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ExtensionRangeOptions_Declaration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 number = 1; */ + if (message.number !== undefined) + writer.tag(1, WireType.Varint).int32(message.number); + /* optional string full_name = 2; */ + if (message.fullName !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.fullName); + /* optional string type = 3; */ + if (message.type !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.type); + /* optional bool reserved = 5; */ + if (message.reserved !== undefined) + writer.tag(5, WireType.Varint).bool(message.reserved); + /* optional bool repeated = 6; */ + if (message.repeated !== undefined) + writer.tag(6, WireType.Varint).bool(message.repeated); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions.Declaration + */ +export const ExtensionRangeOptions_Declaration = new ExtensionRangeOptions_Declaration$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FieldDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.FieldDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 4, name: "label", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Label", FieldDescriptorProto_Label, "LABEL_"] }, + { no: 5, name: "type", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Type", FieldDescriptorProto_Type, "TYPE_"] }, + { no: 6, name: "type_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "extendee", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "default_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 9, name: "oneof_index", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 10, name: "json_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "options", kind: "message", T: () => FieldOptions }, + { no: 17, name: "proto3_optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): FieldDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldDescriptorProto): FieldDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional int32 number */ 3: + message.number = reader.int32(); + break; + case /* optional google.protobuf.FieldDescriptorProto.Label label */ 4: + message.label = reader.int32(); + break; + case /* optional google.protobuf.FieldDescriptorProto.Type type */ 5: + message.type = reader.int32(); + break; + case /* optional string type_name */ 6: + message.typeName = reader.string(); + break; + case /* optional string extendee */ 2: + message.extendee = reader.string(); + break; + case /* optional string default_value */ 7: + message.defaultValue = reader.string(); + break; + case /* optional int32 oneof_index */ 9: + message.oneofIndex = reader.int32(); + break; + case /* optional string json_name */ 10: + message.jsonName = reader.string(); + break; + case /* optional google.protobuf.FieldOptions options */ 8: + message.options = FieldOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* optional bool proto3_optional */ 17: + message.proto3Optional = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FieldDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional int32 number = 3; */ + if (message.number !== undefined) + writer.tag(3, WireType.Varint).int32(message.number); + /* optional google.protobuf.FieldDescriptorProto.Label label = 4; */ + if (message.label !== undefined) + writer.tag(4, WireType.Varint).int32(message.label); + /* optional google.protobuf.FieldDescriptorProto.Type type = 5; */ + if (message.type !== undefined) + writer.tag(5, WireType.Varint).int32(message.type); + /* optional string type_name = 6; */ + if (message.typeName !== undefined) + writer.tag(6, WireType.LengthDelimited).string(message.typeName); + /* optional string extendee = 2; */ + if (message.extendee !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.extendee); + /* optional string default_value = 7; */ + if (message.defaultValue !== undefined) + writer.tag(7, WireType.LengthDelimited).string(message.defaultValue); + /* optional int32 oneof_index = 9; */ + if (message.oneofIndex !== undefined) + writer.tag(9, WireType.Varint).int32(message.oneofIndex); + /* optional string json_name = 10; */ + if (message.jsonName !== undefined) + writer.tag(10, WireType.LengthDelimited).string(message.jsonName); + /* optional google.protobuf.FieldOptions options = 8; */ + if (message.options) + FieldOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* optional bool proto3_optional = 17; */ + if (message.proto3Optional !== undefined) + writer.tag(17, WireType.Varint).bool(message.proto3Optional); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldDescriptorProto + */ +export const FieldDescriptorProto = new FieldDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class OneofDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.OneofDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "options", kind: "message", T: () => OneofOptions } + ]); + } + create(value?: PartialMessage): OneofDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofDescriptorProto): OneofDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional google.protobuf.OneofOptions options */ 2: + message.options = OneofOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: OneofDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional google.protobuf.OneofOptions options = 2; */ + if (message.options) + OneofOptions.internalBinaryWrite(message.options, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.OneofDescriptorProto + */ +export const OneofDescriptorProto = new OneofDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.EnumDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "value", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumValueDescriptorProto }, + { no: 3, name: "options", kind: "message", T: () => EnumOptions }, + { no: 4, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto_EnumReservedRange }, + { no: 5, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): EnumDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = []; + message.reservedRange = []; + message.reservedName = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto): EnumDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* repeated google.protobuf.EnumValueDescriptorProto value */ 2: + message.value.push(EnumValueDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.EnumOptions options */ 3: + message.options = EnumOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range */ 4: + message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated string reserved_name */ 5: + message.reservedName.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* repeated google.protobuf.EnumValueDescriptorProto value = 2; */ + for (let i = 0; i < message.value.length; i++) + EnumValueDescriptorProto.internalBinaryWrite(message.value[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.EnumOptions options = 3; */ + if (message.options) + EnumOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; */ + for (let i = 0; i < message.reservedRange.length; i++) + EnumDescriptorProto_EnumReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated string reserved_name = 5; */ + for (let i = 0; i < message.reservedName.length; i++) + writer.tag(5, WireType.LengthDelimited).string(message.reservedName[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto + */ +export const EnumDescriptorProto = new EnumDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumDescriptorProto_EnumReservedRange$Type extends MessageType { + constructor() { + super("google.protobuf.EnumDescriptorProto.EnumReservedRange", [ + { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): EnumDescriptorProto_EnumReservedRange { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRange { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 start */ 1: + message.start = reader.int32(); + break; + case /* optional int32 end */ 2: + message.end = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumDescriptorProto_EnumReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 start = 1; */ + if (message.start !== undefined) + writer.tag(1, WireType.Varint).int32(message.start); + /* optional int32 end = 2; */ + if (message.end !== undefined) + writer.tag(2, WireType.Varint).int32(message.end); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange + */ +export const EnumDescriptorProto_EnumReservedRange = new EnumDescriptorProto_EnumReservedRange$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumValueDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.EnumValueDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "options", kind: "message", T: () => EnumValueOptions } + ]); + } + create(value?: PartialMessage): EnumValueDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueDescriptorProto): EnumValueDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional int32 number */ 2: + message.number = reader.int32(); + break; + case /* optional google.protobuf.EnumValueOptions options */ 3: + message.options = EnumValueOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumValueDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional int32 number = 2; */ + if (message.number !== undefined) + writer.tag(2, WireType.Varint).int32(message.number); + /* optional google.protobuf.EnumValueOptions options = 3; */ + if (message.options) + EnumValueOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumValueDescriptorProto + */ +export const EnumValueDescriptorProto = new EnumValueDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ServiceDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.ServiceDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "method", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MethodDescriptorProto }, + { no: 3, name: "options", kind: "message", T: () => ServiceOptions } + ]); + } + create(value?: PartialMessage): ServiceDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.method = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceDescriptorProto): ServiceDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* repeated google.protobuf.MethodDescriptorProto method */ 2: + message.method.push(MethodDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.ServiceOptions options */ 3: + message.options = ServiceOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ServiceDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* repeated google.protobuf.MethodDescriptorProto method = 2; */ + for (let i = 0; i < message.method.length; i++) + MethodDescriptorProto.internalBinaryWrite(message.method[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.ServiceOptions options = 3; */ + if (message.options) + ServiceOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ServiceDescriptorProto + */ +export const ServiceDescriptorProto = new ServiceDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MethodDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.MethodDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "input_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "output_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "options", kind: "message", T: () => MethodOptions }, + { no: 5, name: "client_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "server_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): MethodDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodDescriptorProto): MethodDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional string input_type */ 2: + message.inputType = reader.string(); + break; + case /* optional string output_type */ 3: + message.outputType = reader.string(); + break; + case /* optional google.protobuf.MethodOptions options */ 4: + message.options = MethodOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* optional bool client_streaming */ 5: + message.clientStreaming = reader.bool(); + break; + case /* optional bool server_streaming */ 6: + message.serverStreaming = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MethodDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional string input_type = 2; */ + if (message.inputType !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.inputType); + /* optional string output_type = 3; */ + if (message.outputType !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.outputType); + /* optional google.protobuf.MethodOptions options = 4; */ + if (message.options) + MethodOptions.internalBinaryWrite(message.options, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* optional bool client_streaming = 5; */ + if (message.clientStreaming !== undefined) + writer.tag(5, WireType.Varint).bool(message.clientStreaming); + /* optional bool server_streaming = 6; */ + if (message.serverStreaming !== undefined) + writer.tag(6, WireType.Varint).bool(message.serverStreaming); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.MethodDescriptorProto + */ +export const MethodDescriptorProto = new MethodDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FileOptions$Type extends MessageType { + constructor() { + super("google.protobuf.FileOptions", [ + { no: 1, name: "java_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "java_outer_classname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "java_multiple_files", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 20, name: "java_generate_equals_and_hash", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 27, name: "java_string_check_utf8", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "optimize_for", kind: "enum", opt: true, T: () => ["google.protobuf.FileOptions.OptimizeMode", FileOptions_OptimizeMode] }, + { no: 11, name: "go_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 16, name: "cc_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 17, name: "java_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 18, name: "py_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 42, name: "php_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 23, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 31, name: "cc_enable_arenas", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 36, name: "objc_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 37, name: "csharp_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 39, name: "swift_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 40, name: "php_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 41, name: "php_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 44, name: "php_metadata_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 45, name: "ruby_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 50, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): FileOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileOptions): FileOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string java_package */ 1: + message.javaPackage = reader.string(); + break; + case /* optional string java_outer_classname */ 8: + message.javaOuterClassname = reader.string(); + break; + case /* optional bool java_multiple_files */ 10: + message.javaMultipleFiles = reader.bool(); + break; + case /* optional bool java_generate_equals_and_hash = 20 [deprecated = true];*/ 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case /* optional bool java_string_check_utf8 */ 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case /* optional google.protobuf.FileOptions.OptimizeMode optimize_for */ 9: + message.optimizeFor = reader.int32(); + break; + case /* optional string go_package */ 11: + message.goPackage = reader.string(); + break; + case /* optional bool cc_generic_services */ 16: + message.ccGenericServices = reader.bool(); + break; + case /* optional bool java_generic_services */ 17: + message.javaGenericServices = reader.bool(); + break; + case /* optional bool py_generic_services */ 18: + message.pyGenericServices = reader.bool(); + break; + case /* optional bool php_generic_services */ 42: + message.phpGenericServices = reader.bool(); + break; + case /* optional bool deprecated */ 23: + message.deprecated = reader.bool(); + break; + case /* optional bool cc_enable_arenas */ 31: + message.ccEnableArenas = reader.bool(); + break; + case /* optional string objc_class_prefix */ 36: + message.objcClassPrefix = reader.string(); + break; + case /* optional string csharp_namespace */ 37: + message.csharpNamespace = reader.string(); + break; + case /* optional string swift_prefix */ 39: + message.swiftPrefix = reader.string(); + break; + case /* optional string php_class_prefix */ 40: + message.phpClassPrefix = reader.string(); + break; + case /* optional string php_namespace */ 41: + message.phpNamespace = reader.string(); + break; + case /* optional string php_metadata_namespace */ 44: + message.phpMetadataNamespace = reader.string(); + break; + case /* optional string ruby_package */ 45: + message.rubyPackage = reader.string(); + break; + case /* optional google.protobuf.FeatureSet features */ 50: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FileOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string java_package = 1; */ + if (message.javaPackage !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.javaPackage); + /* optional string java_outer_classname = 8; */ + if (message.javaOuterClassname !== undefined) + writer.tag(8, WireType.LengthDelimited).string(message.javaOuterClassname); + /* optional bool java_multiple_files = 10; */ + if (message.javaMultipleFiles !== undefined) + writer.tag(10, WireType.Varint).bool(message.javaMultipleFiles); + /* optional bool java_generate_equals_and_hash = 20 [deprecated = true]; */ + if (message.javaGenerateEqualsAndHash !== undefined) + writer.tag(20, WireType.Varint).bool(message.javaGenerateEqualsAndHash); + /* optional bool java_string_check_utf8 = 27; */ + if (message.javaStringCheckUtf8 !== undefined) + writer.tag(27, WireType.Varint).bool(message.javaStringCheckUtf8); + /* optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; */ + if (message.optimizeFor !== undefined) + writer.tag(9, WireType.Varint).int32(message.optimizeFor); + /* optional string go_package = 11; */ + if (message.goPackage !== undefined) + writer.tag(11, WireType.LengthDelimited).string(message.goPackage); + /* optional bool cc_generic_services = 16; */ + if (message.ccGenericServices !== undefined) + writer.tag(16, WireType.Varint).bool(message.ccGenericServices); + /* optional bool java_generic_services = 17; */ + if (message.javaGenericServices !== undefined) + writer.tag(17, WireType.Varint).bool(message.javaGenericServices); + /* optional bool py_generic_services = 18; */ + if (message.pyGenericServices !== undefined) + writer.tag(18, WireType.Varint).bool(message.pyGenericServices); + /* optional bool php_generic_services = 42; */ + if (message.phpGenericServices !== undefined) + writer.tag(42, WireType.Varint).bool(message.phpGenericServices); + /* optional bool deprecated = 23; */ + if (message.deprecated !== undefined) + writer.tag(23, WireType.Varint).bool(message.deprecated); + /* optional bool cc_enable_arenas = 31; */ + if (message.ccEnableArenas !== undefined) + writer.tag(31, WireType.Varint).bool(message.ccEnableArenas); + /* optional string objc_class_prefix = 36; */ + if (message.objcClassPrefix !== undefined) + writer.tag(36, WireType.LengthDelimited).string(message.objcClassPrefix); + /* optional string csharp_namespace = 37; */ + if (message.csharpNamespace !== undefined) + writer.tag(37, WireType.LengthDelimited).string(message.csharpNamespace); + /* optional string swift_prefix = 39; */ + if (message.swiftPrefix !== undefined) + writer.tag(39, WireType.LengthDelimited).string(message.swiftPrefix); + /* optional string php_class_prefix = 40; */ + if (message.phpClassPrefix !== undefined) + writer.tag(40, WireType.LengthDelimited).string(message.phpClassPrefix); + /* optional string php_namespace = 41; */ + if (message.phpNamespace !== undefined) + writer.tag(41, WireType.LengthDelimited).string(message.phpNamespace); + /* optional string php_metadata_namespace = 44; */ + if (message.phpMetadataNamespace !== undefined) + writer.tag(44, WireType.LengthDelimited).string(message.phpMetadataNamespace); + /* optional string ruby_package = 45; */ + if (message.rubyPackage !== undefined) + writer.tag(45, WireType.LengthDelimited).string(message.rubyPackage); + /* optional google.protobuf.FeatureSet features = 50; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FileOptions + */ +export const FileOptions = new FileOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MessageOptions$Type extends MessageType { + constructor() { + super("google.protobuf.MessageOptions", [ + { no: 1, name: "message_set_wire_format", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "no_standard_descriptor_accessor", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "map_entry", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 11, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 12, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): MessageOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageOptions): MessageOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool message_set_wire_format */ 1: + message.messageSetWireFormat = reader.bool(); + break; + case /* optional bool no_standard_descriptor_accessor */ 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case /* optional bool deprecated */ 3: + message.deprecated = reader.bool(); + break; + case /* optional bool map_entry */ 7: + message.mapEntry = reader.bool(); + break; + case /* optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];*/ 11: + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + case /* optional google.protobuf.FeatureSet features */ 12: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MessageOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool message_set_wire_format = 1; */ + if (message.messageSetWireFormat !== undefined) + writer.tag(1, WireType.Varint).bool(message.messageSetWireFormat); + /* optional bool no_standard_descriptor_accessor = 2; */ + if (message.noStandardDescriptorAccessor !== undefined) + writer.tag(2, WireType.Varint).bool(message.noStandardDescriptorAccessor); + /* optional bool deprecated = 3; */ + if (message.deprecated !== undefined) + writer.tag(3, WireType.Varint).bool(message.deprecated); + /* optional bool map_entry = 7; */ + if (message.mapEntry !== undefined) + writer.tag(7, WireType.Varint).bool(message.mapEntry); + /* optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; */ + if (message.deprecatedLegacyJsonFieldConflicts !== undefined) + writer.tag(11, WireType.Varint).bool(message.deprecatedLegacyJsonFieldConflicts); + /* optional google.protobuf.FeatureSet features = 12; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.MessageOptions + */ +export const MessageOptions = new MessageOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FieldOptions$Type extends MessageType { + constructor() { + super("google.protobuf.FieldOptions", [ + { no: 1, name: "ctype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.CType", FieldOptions_CType] }, + { no: 2, name: "packed", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "jstype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.JSType", FieldOptions_JSType] }, + { no: 5, name: "lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 15, name: "unverified_lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 10, name: "weak", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 16, name: "debug_redact", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 17, name: "retention", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.OptionRetention", FieldOptions_OptionRetention] }, + { no: 19, name: "targets", kind: "enum", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ["google.protobuf.FieldOptions.OptionTargetType", FieldOptions_OptionTargetType] }, + { no: 20, name: "edition_defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldOptions_EditionDefault }, + { no: 21, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): FieldOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.targets = []; + message.editionDefaults = []; + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions): FieldOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FieldOptions.CType ctype */ 1: + message.ctype = reader.int32(); + break; + case /* optional bool packed */ 2: + message.packed = reader.bool(); + break; + case /* optional google.protobuf.FieldOptions.JSType jstype */ 6: + message.jstype = reader.int32(); + break; + case /* optional bool lazy */ 5: + message.lazy = reader.bool(); + break; + case /* optional bool unverified_lazy */ 15: + message.unverifiedLazy = reader.bool(); + break; + case /* optional bool deprecated */ 3: + message.deprecated = reader.bool(); + break; + case /* optional bool weak */ 10: + message.weak = reader.bool(); + break; + case /* optional bool debug_redact */ 16: + message.debugRedact = reader.bool(); + break; + case /* optional google.protobuf.FieldOptions.OptionRetention retention */ 17: + message.retention = reader.int32(); + break; + case /* repeated google.protobuf.FieldOptions.OptionTargetType targets */ 19: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.targets.push(reader.int32()); + else + message.targets.push(reader.int32()); + break; + case /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults */ 20: + message.editionDefaults.push(FieldOptions_EditionDefault.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.FeatureSet features */ 21: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FieldOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FieldOptions.CType ctype = 1; */ + if (message.ctype !== undefined) + writer.tag(1, WireType.Varint).int32(message.ctype); + /* optional bool packed = 2; */ + if (message.packed !== undefined) + writer.tag(2, WireType.Varint).bool(message.packed); + /* optional google.protobuf.FieldOptions.JSType jstype = 6; */ + if (message.jstype !== undefined) + writer.tag(6, WireType.Varint).int32(message.jstype); + /* optional bool lazy = 5; */ + if (message.lazy !== undefined) + writer.tag(5, WireType.Varint).bool(message.lazy); + /* optional bool unverified_lazy = 15; */ + if (message.unverifiedLazy !== undefined) + writer.tag(15, WireType.Varint).bool(message.unverifiedLazy); + /* optional bool deprecated = 3; */ + if (message.deprecated !== undefined) + writer.tag(3, WireType.Varint).bool(message.deprecated); + /* optional bool weak = 10; */ + if (message.weak !== undefined) + writer.tag(10, WireType.Varint).bool(message.weak); + /* optional bool debug_redact = 16; */ + if (message.debugRedact !== undefined) + writer.tag(16, WireType.Varint).bool(message.debugRedact); + /* optional google.protobuf.FieldOptions.OptionRetention retention = 17; */ + if (message.retention !== undefined) + writer.tag(17, WireType.Varint).int32(message.retention); + /* repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; */ + for (let i = 0; i < message.targets.length; i++) + writer.tag(19, WireType.Varint).int32(message.targets[i]); + /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; */ + for (let i = 0; i < message.editionDefaults.length; i++) + FieldOptions_EditionDefault.internalBinaryWrite(message.editionDefaults[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.FeatureSet features = 21; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldOptions + */ +export const FieldOptions = new FieldOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FieldOptions_EditionDefault$Type extends MessageType { + constructor() { + super("google.protobuf.FieldOptions.EditionDefault", [ + { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, + { no: 2, name: "value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): FieldOptions_EditionDefault { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions_EditionDefault): FieldOptions_EditionDefault { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.Edition edition */ 3: + message.edition = reader.int32(); + break; + case /* optional string value */ 2: + message.value = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FieldOptions_EditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.Edition edition = 3; */ + if (message.edition !== undefined) + writer.tag(3, WireType.Varint).int32(message.edition); + /* optional string value = 2; */ + if (message.value !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldOptions.EditionDefault + */ +export const FieldOptions_EditionDefault = new FieldOptions_EditionDefault$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class OneofOptions$Type extends MessageType { + constructor() { + super("google.protobuf.OneofOptions", [ + { no: 1, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): OneofOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofOptions): OneofOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FeatureSet features */ 1: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: OneofOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FeatureSet features = 1; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.OneofOptions + */ +export const OneofOptions = new OneofOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumOptions$Type extends MessageType { + constructor() { + super("google.protobuf.EnumOptions", [ + { no: 2, name: "allow_alias", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): EnumOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumOptions): EnumOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool allow_alias */ 2: + message.allowAlias = reader.bool(); + break; + case /* optional bool deprecated */ 3: + message.deprecated = reader.bool(); + break; + case /* optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];*/ 6: + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + case /* optional google.protobuf.FeatureSet features */ 7: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool allow_alias = 2; */ + if (message.allowAlias !== undefined) + writer.tag(2, WireType.Varint).bool(message.allowAlias); + /* optional bool deprecated = 3; */ + if (message.deprecated !== undefined) + writer.tag(3, WireType.Varint).bool(message.deprecated); + /* optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; */ + if (message.deprecatedLegacyJsonFieldConflicts !== undefined) + writer.tag(6, WireType.Varint).bool(message.deprecatedLegacyJsonFieldConflicts); + /* optional google.protobuf.FeatureSet features = 7; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumOptions + */ +export const EnumOptions = new EnumOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumValueOptions$Type extends MessageType { + constructor() { + super("google.protobuf.EnumValueOptions", [ + { no: 1, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "features", kind: "message", T: () => FeatureSet }, + { no: 3, name: "debug_redact", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): EnumValueOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueOptions): EnumValueOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool deprecated */ 1: + message.deprecated = reader.bool(); + break; + case /* optional google.protobuf.FeatureSet features */ 2: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* optional bool debug_redact */ 3: + message.debugRedact = reader.bool(); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumValueOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool deprecated = 1; */ + if (message.deprecated !== undefined) + writer.tag(1, WireType.Varint).bool(message.deprecated); + /* optional google.protobuf.FeatureSet features = 2; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional bool debug_redact = 3; */ + if (message.debugRedact !== undefined) + writer.tag(3, WireType.Varint).bool(message.debugRedact); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumValueOptions + */ +export const EnumValueOptions = new EnumValueOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ServiceOptions$Type extends MessageType { + constructor() { + super("google.protobuf.ServiceOptions", [ + { no: 34, name: "features", kind: "message", T: () => FeatureSet }, + { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): ServiceOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceOptions): ServiceOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FeatureSet features */ 34: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* optional bool deprecated */ 33: + message.deprecated = reader.bool(); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ServiceOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FeatureSet features = 34; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(34, WireType.LengthDelimited).fork(), options).join(); + /* optional bool deprecated = 33; */ + if (message.deprecated !== undefined) + writer.tag(33, WireType.Varint).bool(message.deprecated); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ServiceOptions + */ +export const ServiceOptions = new ServiceOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MethodOptions$Type extends MessageType { + constructor() { + super("google.protobuf.MethodOptions", [ + { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 34, name: "idempotency_level", kind: "enum", opt: true, T: () => ["google.protobuf.MethodOptions.IdempotencyLevel", MethodOptions_IdempotencyLevel] }, + { no: 35, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): MethodOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodOptions): MethodOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool deprecated */ 33: + message.deprecated = reader.bool(); + break; + case /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level */ 34: + message.idempotencyLevel = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet features */ 35: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MethodOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool deprecated = 33; */ + if (message.deprecated !== undefined) + writer.tag(33, WireType.Varint).bool(message.deprecated); + /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; */ + if (message.idempotencyLevel !== undefined) + writer.tag(34, WireType.Varint).int32(message.idempotencyLevel); + /* optional google.protobuf.FeatureSet features = 35; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(35, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.MethodOptions + */ +export const MethodOptions = new MethodOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UninterpretedOption$Type extends MessageType { + constructor() { + super("google.protobuf.UninterpretedOption", [ + { no: 2, name: "name", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption_NamePart }, + { no: 3, name: "identifier_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "positive_int_value", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 5, name: "negative_int_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 6, name: "double_value", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, + { no: 7, name: "string_value", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, + { no: 8, name: "aggregate_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UninterpretedOption { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption): UninterpretedOption { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.UninterpretedOption.NamePart name */ 2: + message.name.push(UninterpretedOption_NamePart.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional string identifier_value */ 3: + message.identifierValue = reader.string(); + break; + case /* optional uint64 positive_int_value */ 4: + message.positiveIntValue = reader.uint64().toNumber(); + break; + case /* optional int64 negative_int_value */ 5: + message.negativeIntValue = reader.int64().toNumber(); + break; + case /* optional double double_value */ 6: + message.doubleValue = reader.double(); + break; + case /* optional bytes string_value */ 7: + message.stringValue = reader.bytes(); + break; + case /* optional string aggregate_value */ 8: + message.aggregateValue = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UninterpretedOption, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.UninterpretedOption.NamePart name = 2; */ + for (let i = 0; i < message.name.length; i++) + UninterpretedOption_NamePart.internalBinaryWrite(message.name[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional string identifier_value = 3; */ + if (message.identifierValue !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.identifierValue); + /* optional uint64 positive_int_value = 4; */ + if (message.positiveIntValue !== undefined) + writer.tag(4, WireType.Varint).uint64(message.positiveIntValue); + /* optional int64 negative_int_value = 5; */ + if (message.negativeIntValue !== undefined) + writer.tag(5, WireType.Varint).int64(message.negativeIntValue); + /* optional double double_value = 6; */ + if (message.doubleValue !== undefined) + writer.tag(6, WireType.Bit64).double(message.doubleValue); + /* optional bytes string_value = 7; */ + if (message.stringValue !== undefined) + writer.tag(7, WireType.LengthDelimited).bytes(message.stringValue); + /* optional string aggregate_value = 8; */ + if (message.aggregateValue !== undefined) + writer.tag(8, WireType.LengthDelimited).string(message.aggregateValue); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UninterpretedOption + */ +export const UninterpretedOption = new UninterpretedOption$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UninterpretedOption_NamePart$Type extends MessageType { + constructor() { + super("google.protobuf.UninterpretedOption.NamePart", [ + { no: 1, name: "name_part", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "is_extension", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): UninterpretedOption_NamePart { + const message = globalThis.Object.create((this.messagePrototype!)); + message.namePart = ""; + message.isExtension = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption_NamePart): UninterpretedOption_NamePart { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name_part */ 1: + message.namePart = reader.string(); + break; + case /* bool is_extension */ 2: + message.isExtension = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UninterpretedOption_NamePart, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name_part = 1; */ + if (message.namePart !== "") + writer.tag(1, WireType.LengthDelimited).string(message.namePart); + /* bool is_extension = 2; */ + if (message.isExtension !== false) + writer.tag(2, WireType.Varint).bool(message.isExtension); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UninterpretedOption.NamePart + */ +export const UninterpretedOption_NamePart = new UninterpretedOption_NamePart$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FeatureSet$Type extends MessageType { + constructor() { + super("google.protobuf.FeatureSet", [ + { no: 1, name: "field_presence", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.FieldPresence", FeatureSet_FieldPresence] }, + { no: 2, name: "enum_type", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.EnumType", FeatureSet_EnumType] }, + { no: 3, name: "repeated_field_encoding", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.RepeatedFieldEncoding", FeatureSet_RepeatedFieldEncoding] }, + { no: 4, name: "utf8_validation", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.Utf8Validation", FeatureSet_Utf8Validation] }, + { no: 5, name: "message_encoding", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.MessageEncoding", FeatureSet_MessageEncoding] }, + { no: 6, name: "json_format", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.JsonFormat", FeatureSet_JsonFormat] } + ]); + } + create(value?: PartialMessage): FeatureSet { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSet): FeatureSet { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FeatureSet.FieldPresence field_presence */ 1: + message.fieldPresence = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.EnumType enum_type */ 2: + message.enumType = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding */ 3: + message.repeatedFieldEncoding = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.Utf8Validation utf8_validation */ 4: + message.utf8Validation = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.MessageEncoding message_encoding */ 5: + message.messageEncoding = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.JsonFormat json_format */ 6: + message.jsonFormat = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FeatureSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; */ + if (message.fieldPresence !== undefined) + writer.tag(1, WireType.Varint).int32(message.fieldPresence); + /* optional google.protobuf.FeatureSet.EnumType enum_type = 2; */ + if (message.enumType !== undefined) + writer.tag(2, WireType.Varint).int32(message.enumType); + /* optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; */ + if (message.repeatedFieldEncoding !== undefined) + writer.tag(3, WireType.Varint).int32(message.repeatedFieldEncoding); + /* optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; */ + if (message.utf8Validation !== undefined) + writer.tag(4, WireType.Varint).int32(message.utf8Validation); + /* optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; */ + if (message.messageEncoding !== undefined) + writer.tag(5, WireType.Varint).int32(message.messageEncoding); + /* optional google.protobuf.FeatureSet.JsonFormat json_format = 6; */ + if (message.jsonFormat !== undefined) + writer.tag(6, WireType.Varint).int32(message.jsonFormat); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSet + */ +export const FeatureSet = new FeatureSet$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FeatureSetDefaults$Type extends MessageType { + constructor() { + super("google.protobuf.FeatureSetDefaults", [ + { no: 1, name: "defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FeatureSetDefaults_FeatureSetEditionDefault }, + { no: 4, name: "minimum_edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, + { no: 5, name: "maximum_edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] } + ]); + } + create(value?: PartialMessage): FeatureSetDefaults { + const message = globalThis.Object.create((this.messagePrototype!)); + message.defaults = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults): FeatureSetDefaults { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults */ 1: + message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.Edition minimum_edition */ 4: + message.minimumEdition = reader.int32(); + break; + case /* optional google.protobuf.Edition maximum_edition */ 5: + message.maximumEdition = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FeatureSetDefaults, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; */ + for (let i = 0; i < message.defaults.length; i++) + FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryWrite(message.defaults[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.Edition minimum_edition = 4; */ + if (message.minimumEdition !== undefined) + writer.tag(4, WireType.Varint).int32(message.minimumEdition); + /* optional google.protobuf.Edition maximum_edition = 5; */ + if (message.maximumEdition !== undefined) + writer.tag(5, WireType.Varint).int32(message.maximumEdition); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults + */ +export const FeatureSetDefaults = new FeatureSetDefaults$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FeatureSetDefaults_FeatureSetEditionDefault$Type extends MessageType { + constructor() { + super("google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault", [ + { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, + { no: 2, name: "features", kind: "message", T: () => FeatureSet } + ]); + } + create(value?: PartialMessage): FeatureSetDefaults_FeatureSetEditionDefault { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults_FeatureSetEditionDefault): FeatureSetDefaults_FeatureSetEditionDefault { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.Edition edition */ 3: + message.edition = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet features */ 2: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.Edition edition = 3; */ + if (message.edition !== undefined) + writer.tag(3, WireType.Varint).int32(message.edition); + /* optional google.protobuf.FeatureSet features = 2; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + */ +export const FeatureSetDefaults_FeatureSetEditionDefault = new FeatureSetDefaults_FeatureSetEditionDefault$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SourceCodeInfo$Type extends MessageType { + constructor() { + super("google.protobuf.SourceCodeInfo", [ + { no: 1, name: "location", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SourceCodeInfo_Location } + ]); + } + create(value?: PartialMessage): SourceCodeInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.location = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo): SourceCodeInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.SourceCodeInfo.Location location */ 1: + message.location.push(SourceCodeInfo_Location.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SourceCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.SourceCodeInfo.Location location = 1; */ + for (let i = 0; i < message.location.length; i++) + SourceCodeInfo_Location.internalBinaryWrite(message.location[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo + */ +export const SourceCodeInfo = new SourceCodeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SourceCodeInfo_Location$Type extends MessageType { + constructor() { + super("google.protobuf.SourceCodeInfo.Location", [ + { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "span", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "leading_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "trailing_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "leading_detached_comments", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): SourceCodeInfo_Location { + const message = globalThis.Object.create((this.messagePrototype!)); + message.path = []; + message.span = []; + message.leadingDetachedComments = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo_Location): SourceCodeInfo_Location { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated int32 path = 1 [packed = true];*/ 1: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.path.push(reader.int32()); + else + message.path.push(reader.int32()); + break; + case /* repeated int32 span = 2 [packed = true];*/ 2: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.span.push(reader.int32()); + else + message.span.push(reader.int32()); + break; + case /* optional string leading_comments */ 3: + message.leadingComments = reader.string(); + break; + case /* optional string trailing_comments */ 4: + message.trailingComments = reader.string(); + break; + case /* repeated string leading_detached_comments */ 6: + message.leadingDetachedComments.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SourceCodeInfo_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated int32 path = 1 [packed = true]; */ + if (message.path.length) { + writer.tag(1, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.path.length; i++) + writer.int32(message.path[i]); + writer.join(); + } + /* repeated int32 span = 2 [packed = true]; */ + if (message.span.length) { + writer.tag(2, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.span.length; i++) + writer.int32(message.span[i]); + writer.join(); + } + /* optional string leading_comments = 3; */ + if (message.leadingComments !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.leadingComments); + /* optional string trailing_comments = 4; */ + if (message.trailingComments !== undefined) + writer.tag(4, WireType.LengthDelimited).string(message.trailingComments); + /* repeated string leading_detached_comments = 6; */ + for (let i = 0; i < message.leadingDetachedComments.length; i++) + writer.tag(6, WireType.LengthDelimited).string(message.leadingDetachedComments[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo.Location + */ +export const SourceCodeInfo_Location = new SourceCodeInfo_Location$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GeneratedCodeInfo$Type extends MessageType { + constructor() { + super("google.protobuf.GeneratedCodeInfo", [ + { no: 1, name: "annotation", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => GeneratedCodeInfo_Annotation } + ]); + } + create(value?: PartialMessage): GeneratedCodeInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.annotation = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo): GeneratedCodeInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation */ 1: + message.annotation.push(GeneratedCodeInfo_Annotation.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GeneratedCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; */ + for (let i = 0; i < message.annotation.length; i++) + GeneratedCodeInfo_Annotation.internalBinaryWrite(message.annotation[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo + */ +export const GeneratedCodeInfo = new GeneratedCodeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GeneratedCodeInfo_Annotation$Type extends MessageType { + constructor() { + super("google.protobuf.GeneratedCodeInfo.Annotation", [ + { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "source_file", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "begin", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 4, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 5, name: "semantic", kind: "enum", opt: true, T: () => ["google.protobuf.GeneratedCodeInfo.Annotation.Semantic", GeneratedCodeInfo_Annotation_Semantic] } + ]); + } + create(value?: PartialMessage): GeneratedCodeInfo_Annotation { + const message = globalThis.Object.create((this.messagePrototype!)); + message.path = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_Annotation { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated int32 path = 1 [packed = true];*/ 1: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.path.push(reader.int32()); + else + message.path.push(reader.int32()); + break; + case /* optional string source_file */ 2: + message.sourceFile = reader.string(); + break; + case /* optional int32 begin */ 3: + message.begin = reader.int32(); + break; + case /* optional int32 end */ 4: + message.end = reader.int32(); + break; + case /* optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic */ 5: + message.semantic = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GeneratedCodeInfo_Annotation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated int32 path = 1 [packed = true]; */ + if (message.path.length) { + writer.tag(1, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.path.length; i++) + writer.int32(message.path[i]); + writer.join(); + } + /* optional string source_file = 2; */ + if (message.sourceFile !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.sourceFile); + /* optional int32 begin = 3; */ + if (message.begin !== undefined) + writer.tag(3, WireType.Varint).int32(message.begin); + /* optional int32 end = 4; */ + if (message.end !== undefined) + writer.tag(4, WireType.Varint).int32(message.end); + /* optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; */ + if (message.semantic !== undefined) + writer.tag(5, WireType.Varint).int32(message.semantic); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo.Annotation + */ +export const GeneratedCodeInfo_Annotation = new GeneratedCodeInfo_Annotation$Type(); diff --git a/gen/proto/ts/google/protobuf/duration_pb.ts b/gen/proto/ts/google/protobuf/duration_pb.ts new file mode 100644 index 00000000000..5f07ed652a2 --- /dev/null +++ b/gen/proto/ts/google/protobuf/duration_pb.ts @@ -0,0 +1,232 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "google/protobuf/duration.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { typeofJsonValue } from "@protobuf-ts/runtime"; +import type { JsonValue } from "@protobuf-ts/runtime"; +import type { JsonReadOptions } from "@protobuf-ts/runtime"; +import type { JsonWriteOptions } from "@protobuf-ts/runtime"; +import { PbLong } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * A Duration represents a signed, fixed-length span of time represented + * as a count of seconds and fractions of seconds at nanosecond + * resolution. It is independent of any calendar and concepts like "day" + * or "month". It is related to Timestamp in that the difference between + * two Timestamp values is a Duration and it can be added or subtracted + * from a Timestamp. Range is approximately +-10,000 years. + * + * # Examples + * + * Example 1: Compute Duration from two Timestamps in pseudo code. + * + * Timestamp start = ...; + * Timestamp end = ...; + * Duration duration = ...; + * + * duration.seconds = end.seconds - start.seconds; + * duration.nanos = end.nanos - start.nanos; + * + * if (duration.seconds < 0 && duration.nanos > 0) { + * duration.seconds += 1; + * duration.nanos -= 1000000000; + * } else if (duration.seconds > 0 && duration.nanos < 0) { + * duration.seconds -= 1; + * duration.nanos += 1000000000; + * } + * + * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + * + * Timestamp start = ...; + * Duration duration = ...; + * Timestamp end = ...; + * + * end.seconds = start.seconds + duration.seconds; + * end.nanos = start.nanos + duration.nanos; + * + * if (end.nanos < 0) { + * end.seconds -= 1; + * end.nanos += 1000000000; + * } else if (end.nanos >= 1000000000) { + * end.seconds += 1; + * end.nanos -= 1000000000; + * } + * + * Example 3: Compute Duration from datetime.timedelta in Python. + * + * td = datetime.timedelta(days=3, minutes=10) + * duration = Duration() + * duration.FromTimedelta(td) + * + * # JSON Mapping + * + * In JSON format, the Duration type is encoded as a string rather than an + * object, where the string ends in the suffix "s" (indicating seconds) and + * is preceded by the number of seconds, with nanoseconds expressed as + * fractional seconds. For example, 3 seconds with 0 nanoseconds should be + * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + * microsecond should be expressed in JSON format as "3.000001s". + * + * + * @generated from protobuf message google.protobuf.Duration + */ +export interface Duration { + /** + * Signed seconds of the span of time. Must be from -315,576,000,000 + * to +315,576,000,000 inclusive. Note: these bounds are computed from: + * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + * + * @generated from protobuf field: int64 seconds = 1; + */ + seconds: number; + /** + * Signed fractions of a second at nanosecond resolution of the span + * of time. Durations less than one second are represented with a 0 + * `seconds` field and a positive or negative `nanos` field. For durations + * of one second or more, a non-zero value for the `nanos` field must be + * of the same sign as the `seconds` field. Must be from -999,999,999 + * to +999,999,999 inclusive. + * + * @generated from protobuf field: int32 nanos = 2; + */ + nanos: number; +} +// @generated message type with reflection information, may provide speed optimized methods +class Duration$Type extends MessageType { + constructor() { + super("google.protobuf.Duration", [ + { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + /** + * Encode `Duration` to JSON string like "3.000001s". + */ + internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue { + let s = PbLong.from(message.seconds).toNumber(); + if (s > 315576000000 || s < -315576000000) + throw new Error("Duration value out of range."); + let text = message.seconds.toString(); + if (s === 0 && message.nanos < 0) + text = "-" + text; + if (message.nanos !== 0) { + let nanosStr = Math.abs(message.nanos).toString(); + nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr; + if (nanosStr.substring(3) === "000000") + nanosStr = nanosStr.substring(0, 3); + else if (nanosStr.substring(6) === "000") + nanosStr = nanosStr.substring(0, 6); + text += "." + nanosStr; + } + return text + "s"; + } + /** + * Decode `Duration` from JSON string like "3.000001s" + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration { + if (typeof json !== "string") + throw new Error("Unable to parse Duration from JSON " + typeofJsonValue(json) + ". Expected string."); + let match = json.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/); + if (match === null) + throw new Error("Unable to parse Duration from JSON string. Invalid format."); + if (!target) + target = this.create(); + let [, sign, secs, nanos] = match; + let longSeconds = PbLong.from(sign + secs); + if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000) + throw new Error("Unable to parse Duration from JSON string. Value out of range."); + target.seconds = longSeconds.toNumber(); + if (typeof nanos == "string") { + let nanosStr = sign + nanos + "0".repeat(9 - nanos.length); + target.nanos = parseInt(nanosStr); + } + return target; + } + create(value?: PartialMessage): Duration { + const message = globalThis.Object.create((this.messagePrototype!)); + message.seconds = 0; + message.nanos = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 seconds */ 1: + message.seconds = reader.int64().toNumber(); + break; + case /* int32 nanos */ 2: + message.nanos = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int64 seconds = 1; */ + if (message.seconds !== 0) + writer.tag(1, WireType.Varint).int64(message.seconds); + /* int32 nanos = 2; */ + if (message.nanos !== 0) + writer.tag(2, WireType.Varint).int32(message.nanos); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Duration + */ +export const Duration = new Duration$Type(); diff --git a/gen/proto/ts/google/protobuf/empty_pb.ts b/gen/proto/ts/google/protobuf/empty_pb.ts new file mode 100644 index 00000000000..19cf9f8511d --- /dev/null +++ b/gen/proto/ts/google/protobuf/empty_pb.ts @@ -0,0 +1,83 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "google/protobuf/empty.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: + * + * service Foo { + * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + * } + * + * + * @generated from protobuf message google.protobuf.Empty + */ +export interface Empty { +} +// @generated message type with reflection information, may provide speed optimized methods +class Empty$Type extends MessageType { + constructor() { + super("google.protobuf.Empty", []); + } + create(value?: PartialMessage): Empty { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty { + return target ?? this.create(); + } + internalBinaryWrite(message: Empty, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Empty + */ +export const Empty = new Empty$Type(); diff --git a/gen/proto/ts/google/protobuf/timestamp_pb.ts b/gen/proto/ts/google/protobuf/timestamp_pb.ts new file mode 100644 index 00000000000..58d6243515c --- /dev/null +++ b/gen/proto/ts/google/protobuf/timestamp_pb.ts @@ -0,0 +1,289 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { typeofJsonValue } from "@protobuf-ts/runtime"; +import type { JsonValue } from "@protobuf-ts/runtime"; +import type { JsonReadOptions } from "@protobuf-ts/runtime"; +import type { JsonWriteOptions } from "@protobuf-ts/runtime"; +import { PbLong } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + * + * # Examples + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * Example 5: Compute Timestamp from Java `Instant.now()`. + * + * Instant now = Instant.now(); + * + * Timestamp timestamp = + * Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + * .setNanos(now.getNano()).build(); + * + * Example 6: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * # JSON Mapping + * + * In JSON format, the Timestamp type is encoded as a string in the + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + * where {year} is always expressed using four digits while {month}, {day}, + * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + * is required. A proto3 JSON serializer should always use UTC (as indicated by + * "Z") when printing the Timestamp type and a proto3 JSON parser should be + * able to accept both UTC and other timezones (as indicated by an offset). + * + * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + * 01:30 UTC on January 15, 2017. + * + * In JavaScript, one can convert a Date object to this format using the + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * method. In Python, a standard `datetime.datetime` object can be converted + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`]( + * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + * ) to obtain a formatter capable of generating timestamps in this format. + * + * + * @generated from protobuf message google.protobuf.Timestamp + */ +export interface Timestamp { + /** + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + * + * @generated from protobuf field: int64 seconds = 1; + */ + seconds: number; + /** + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + * + * @generated from protobuf field: int32 nanos = 2; + */ + nanos: number; +} +// @generated message type with reflection information, may provide speed optimized methods +class Timestamp$Type extends MessageType { + constructor() { + super("google.protobuf.Timestamp", [ + { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + /** + * Creates a new `Timestamp` for the current time. + */ + now(): Timestamp { + const msg = this.create(); + const ms = Date.now(); + msg.seconds = PbLong.from(Math.floor(ms / 1000)).toNumber(); + msg.nanos = (ms % 1000) * 1000000; + return msg; + } + /** + * Converts a `Timestamp` to a JavaScript Date. + */ + toDate(message: Timestamp): Date { + return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000)); + } + /** + * Converts a JavaScript Date to a `Timestamp`. + */ + fromDate(date: Date): Timestamp { + const msg = this.create(); + const ms = date.getTime(); + msg.seconds = PbLong.from(Math.floor(ms / 1000)).toNumber(); + msg.nanos = (ms % 1000) * 1000000; + return msg; + } + /** + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. + */ + internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue { + let ms = PbLong.from(message.seconds).toNumber() * 1000; + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (message.nanos < 0) + throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative."); + let z = "Z"; + if (message.nanos > 0) { + let nanosStr = (message.nanos + 1000000000).toString().substring(1); + if (nanosStr.substring(3) === "000000") + z = "." + nanosStr.substring(0, 3) + "Z"; + else if (nanosStr.substring(6) === "000") + z = "." + nanosStr.substring(0, 6) + "Z"; + else + z = "." + nanosStr + "Z"; + } + return new Date(ms).toISOString().replace(".000Z", z); + } + /** + * In JSON format, the `Timestamp` type is encoded as a string + * in the RFC 3339 format. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp { + if (typeof json !== "string") + throw new Error("Unable to parse Timestamp from JSON " + typeofJsonValue(json) + "."); + let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); + if (!matches) + throw new Error("Unable to parse Timestamp from JSON. Invalid format."); + let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z")); + if (Number.isNaN(ms)) + throw new Error("Unable to parse Timestamp from JSON. Invalid value."); + if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) + throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."); + if (!target) + target = this.create(); + target.seconds = PbLong.from(ms / 1000).toNumber(); + target.nanos = 0; + if (matches[7]) + target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000); + return target; + } + create(value?: PartialMessage): Timestamp { + const message = globalThis.Object.create((this.messagePrototype!)); + message.seconds = 0; + message.nanos = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 seconds */ 1: + message.seconds = reader.int64().toNumber(); + break; + case /* int32 nanos */ 2: + message.nanos = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int64 seconds = 1; */ + if (message.seconds !== 0) + writer.tag(1, WireType.Varint).int64(message.seconds); + /* int32 nanos = 2; */ + if (message.nanos !== 0) + writer.tag(2, WireType.Varint).int32(message.nanos); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Timestamp + */ +export const Timestamp = new Timestamp$Type(); diff --git a/gen/proto/ts/prehog/v1/teleport_pb.grpc-client.ts b/gen/proto/ts/prehog/v1/teleport_pb.grpc-client.ts new file mode 100644 index 00000000000..ac0e793af3a --- /dev/null +++ b/gen/proto/ts/prehog/v1/teleport_pb.grpc-client.ts @@ -0,0 +1,78 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1/teleport.proto" (package "prehog.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { TeleportReportingService } from "./teleport_pb"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { SubmitUsageReportsResponse } from "./teleport_pb"; +import type { SubmitUsageReportsRequest } from "./teleport_pb"; +import * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1.TeleportReportingService + */ +export interface ITeleportReportingServiceClient { + /** + * encodes and forwards usage reports to the PostHog event database; each + * event is annotated with some properties that depend on the identity of the + * caller: + * - tp.account_id (UUID in string form, can be empty if missing from the + * license) + * - tp.license_name (should always be a UUID) + * - tp.license_authority (name of the authority that signed the license file + * used for authentication) + * - tp.is_cloud (boolean) + * + * @generated from protobuf rpc: SubmitUsageReports(prehog.v1.SubmitUsageReportsRequest) returns (prehog.v1.SubmitUsageReportsResponse); + */ + submitUsageReports(input: SubmitUsageReportsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall; + submitUsageReports(input: SubmitUsageReportsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall; + submitUsageReports(input: SubmitUsageReportsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall; + submitUsageReports(input: SubmitUsageReportsRequest, callback: (err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void): grpc.ClientUnaryCall; +} +/** + * @generated from protobuf service prehog.v1.TeleportReportingService + */ +export class TeleportReportingServiceClient extends grpc.Client implements ITeleportReportingServiceClient { + private readonly _binaryOptions: Partial; + constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * encodes and forwards usage reports to the PostHog event database; each + * event is annotated with some properties that depend on the identity of the + * caller: + * - tp.account_id (UUID in string form, can be empty if missing from the + * license) + * - tp.license_name (should always be a UUID) + * - tp.license_authority (name of the authority that signed the license file + * used for authentication) + * - tp.is_cloud (boolean) + * + * @generated from protobuf rpc: SubmitUsageReports(prehog.v1.SubmitUsageReportsRequest) returns (prehog.v1.SubmitUsageReportsResponse); + */ + submitUsageReports(input: SubmitUsageReportsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitUsageReportsResponse) => void)): grpc.ClientUnaryCall { + const method = TeleportReportingService.methods[0]; + return this.makeUnaryRequest(`/${TeleportReportingService.typeName}/${method.name}`, (value: SubmitUsageReportsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitUsageReportsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } +} diff --git a/gen/proto/ts/prehog/v1/teleport_pb.grpc-server.ts b/gen/proto/ts/prehog/v1/teleport_pb.grpc-server.ts new file mode 100644 index 00000000000..dd82f58fbe9 --- /dev/null +++ b/gen/proto/ts/prehog/v1/teleport_pb.grpc-server.ts @@ -0,0 +1,68 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1/teleport.proto" (package "prehog.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { SubmitUsageReportsResponse } from "./teleport_pb"; +import { SubmitUsageReportsRequest } from "./teleport_pb"; +import type * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1.TeleportReportingService + */ +export interface ITeleportReportingService extends grpc.UntypedServiceImplementation { + /** + * encodes and forwards usage reports to the PostHog event database; each + * event is annotated with some properties that depend on the identity of the + * caller: + * - tp.account_id (UUID in string form, can be empty if missing from the + * license) + * - tp.license_name (should always be a UUID) + * - tp.license_authority (name of the authority that signed the license file + * used for authentication) + * - tp.is_cloud (boolean) + * + * @generated from protobuf rpc: SubmitUsageReports(prehog.v1.SubmitUsageReportsRequest) returns (prehog.v1.SubmitUsageReportsResponse); + */ + submitUsageReports: grpc.handleUnaryCall; +} +/** + * @grpc/grpc-js definition for the protobuf service prehog.v1.TeleportReportingService. + * + * Usage: Implement the interface ITeleportReportingService and add to a grpc server. + * + * ```typescript + * const server = new grpc.Server(); + * const service: ITeleportReportingService = ... + * server.addService(teleportReportingServiceDefinition, service); + * ``` + */ +export const teleportReportingServiceDefinition: grpc.ServiceDefinition = { + submitUsageReports: { + path: "/prehog.v1.TeleportReportingService/SubmitUsageReports", + originalName: "SubmitUsageReports", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => SubmitUsageReportsResponse.fromBinary(bytes), + requestDeserialize: bytes => SubmitUsageReportsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(SubmitUsageReportsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(SubmitUsageReportsRequest.toBinary(value)) + } +}; diff --git a/gen/proto/ts/prehog/v1/teleport_pb.ts b/gen/proto/ts/prehog/v1/teleport_pb.ts new file mode 100644 index 00000000000..ec1ee89bf62 --- /dev/null +++ b/gen/proto/ts/prehog/v1/teleport_pb.ts @@ -0,0 +1,845 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1/teleport.proto" (package "prehog.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Timestamp } from "../../google/protobuf/timestamp_pb"; +/** + * counters for user activity coming from a specific auth server from a specific + * cluster, for a time window of up to 15 minutes + * + * PostHog event: tp.user.activity + * + * @generated from protobuf message prehog.v1.UserActivityReport + */ +export interface UserActivityReport { + /** + * randomly generated UUID for this specific report, 16 bytes (in string order) + * + * PostHog property: tp.report_uuid (in 8-4-4-4-12 string form) + * + * @generated from protobuf field: bytes report_uuid = 1; + */ + reportUuid: Uint8Array; + /** + * cluster name, anonymized, 32 bytes (HMAC-SHA-256) + * + * PostHog property: tp.cluster_name (in base64) + * + * @generated from protobuf field: bytes cluster_name = 2; + */ + clusterName: Uint8Array; + /** + * hostid of the auth that collected this report, anonymized, 32 bytes (HMAC-SHA-256) + * + * PostHog property: tp.reporter_hostid (in base64) + * + * @generated from protobuf field: bytes reporter_hostid = 3; + */ + reporterHostid: Uint8Array; + /** + * beginning of the time window for this data; ending is not specified but is + * intended to be at most 15 minutes + * + * PostHog timestamp (not a property, the ingest time is tp.report_time instead) + * + * @generated from protobuf field: google.protobuf.Timestamp start_time = 4; + */ + startTime?: Timestamp; + /** + * one set of counters for each user + * + * PostHog property: tp.records (encoded as a map keyed by username, not as a list) + * + * @generated from protobuf field: repeated prehog.v1.UserActivityRecord records = 5; + */ + records: UserActivityRecord[]; +} +/** + * a set of activity counters for a single user; some old versions report + * "ssh_port_sessions", counting both SSH port forwards and kubectl port-forward + * connections in a single counter + * + * fields other than user_name are encoded as the same field name in PostHog + * + * @generated from protobuf message prehog.v1.UserActivityRecord + */ +export interface UserActivityRecord { + /** + * anonymized, 32 bytes (HMAC-SHA-256) + * + * key of the tp.records map in tp.user.activity (in base64) + * + * @generated from protobuf field: bytes user_name = 1; + */ + userName: Uint8Array; + /** + * Indicates the type of user, e.g. bot or human, if known. + * + * @generated from protobuf field: prehog.v1.UserKind user_kind = 14; + */ + userKind: UserKind; + /** + * counter of user.login events + * + * @generated from protobuf field: uint64 logins = 2; + */ + logins: number; + /** + * counter of session.start events (non-Kube) + * + * @generated from protobuf field: uint64 ssh_sessions = 3; + */ + sshSessions: number; + /** + * counter of app.session.start events (non-TCP) + * + * @generated from protobuf field: uint64 app_sessions = 4; + */ + appSessions: number; + /** + * counter of session.start events (only Kube) + * + * @generated from protobuf field: uint64 kube_sessions = 5; + */ + kubeSessions: number; + /** + * counter of db.session.start events + * + * @generated from protobuf field: uint64 db_sessions = 6; + */ + dbSessions: number; + /** + * counter of windows.desktop.session.start events + * + * @generated from protobuf field: uint64 desktop_sessions = 7; + */ + desktopSessions: number; + /** + * counter of app.session.start events (only TCP) + * + * @generated from protobuf field: uint64 app_tcp_sessions = 8; + */ + appTcpSessions: number; + /** + * counter of port events (both SSH and Kube) + * + * @deprecated + * @generated from protobuf field: uint64 ssh_port_sessions = 9 [deprecated = true]; + */ + sshPortSessions: number; + /** + * counter of kube.request events + * + * @generated from protobuf field: uint64 kube_requests = 10; + */ + kubeRequests: number; + /** + * counter of sftp events + * + * @generated from protobuf field: uint64 sftp_events = 11; + */ + sftpEvents: number; + /** + * counter of port events (only SSH) + * + * @generated from protobuf field: uint64 ssh_port_v2_sessions = 12; + */ + sshPortV2Sessions: number; + /** + * counter of port events (only Kube) + * + * @generated from protobuf field: uint64 kube_port_sessions = 13; + */ + kubePortSessions: number; +} +/** + * @generated from protobuf message prehog.v1.ResourcePresenceReport + */ +export interface ResourcePresenceReport { + /** + * randomly generated UUID for this specific report, 16 bytes (in string order) + * + * @generated from protobuf field: bytes report_uuid = 1; + */ + reportUuid: Uint8Array; + /** + * anonymized, 32 bytes (HMAC-SHA-256) + * + * @generated from protobuf field: bytes cluster_name = 2; + */ + clusterName: Uint8Array; + /** + * anonymized, 32 bytes (HMAC-SHA-256) + * + * @generated from protobuf field: bytes reporter_hostid = 3; + */ + reporterHostid: Uint8Array; + /** + * beginning of the time window for this data; ending is not specified but is + * intended to be at most one hour + * + * @generated from protobuf field: google.protobuf.Timestamp start_time = 4; + */ + startTime?: Timestamp; + /** + * @generated from protobuf field: repeated prehog.v1.ResourceKindPresenceReport resource_kind_reports = 5; + */ + resourceKindReports: ResourceKindPresenceReport[]; +} +/** + * Counts all resources of one kind that were active during the time window + * to track the number of active resources in a cluster over time. + * + * @generated from protobuf message prehog.v1.ResourceKindPresenceReport + */ +export interface ResourceKindPresenceReport { + /** + * the kind of resource + * + * @generated from protobuf field: prehog.v1.ResourceKind resource_kind = 1; + */ + resourceKind: ResourceKind; + /** + * first 8 bytes of anonymized resource name + * + * @generated from protobuf field: repeated fixed64 resource_ids = 2; + */ + resourceIds: number[]; +} +/** + * @generated from protobuf message prehog.v1.SubmitUsageReportsRequest + */ +export interface SubmitUsageReportsRequest { + /** + * at most 10 reports of all kinds in a single RPC, each shouldn't exceed 128KiB or so + * + * each report is encoded as a separate tp.user.activity PostHog event + * + * @generated from protobuf field: repeated prehog.v1.UserActivityReport user_activity = 1; + */ + userActivity: UserActivityReport[]; + /** + * encoded as a separate tp.resource.counts PostHog event + * + * @generated from protobuf field: repeated prehog.v1.ResourcePresenceReport resource_presence = 2; + */ + resourcePresence: ResourcePresenceReport[]; +} +/** + * @generated from protobuf message prehog.v1.SubmitUsageReportsResponse + */ +export interface SubmitUsageReportsResponse { + /** + * randomly generated UUID for this specific batch, 16 bytes (in string order) + * + * PostHog property: tp.batch_uuid (in each report of the batch) + * + * @generated from protobuf field: bytes batch_uuid = 1; + */ + batchUuid: Uint8Array; +} +/** + * The kind of user a given username refers to. Usernames should always refer to + * a valid cluster user (even if temporary, e.g. SSO), but may be Machine ID + * bot users. + * + * @generated from protobuf enum prehog.v1.UserKind + */ +export enum UserKind { + /** + * Indicates a legacy cluster emitting events without a defined user kind. + * Note that users (from PostHog's perspective) can be identified via future + * events if the cluster is upgraded to specify this field. + * + * PostHog property value: "" + * + * @generated from protobuf enum value: USER_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * Indicates the user associated with this event is human, either created + * locally or via SSO. + * + * PostHog property value: "human" + * + * @generated from protobuf enum value: USER_KIND_HUMAN = 1; + */ + HUMAN = 1, + /** + * Indicates the user associated with this event is a Machine ID bot user. + * + * PostHog property value: "bot" + * + * @generated from protobuf enum value: USER_KIND_BOT = 2; + */ + BOT = 2 +} +/** + * the kind of a "resource" (e.g. a node, a database, a desktop, etc.) + * Keep in sync with prehog/v1alpha/teleport.proto + * + * @generated from protobuf enum prehog.v1.ResourceKind + */ +export enum ResourceKind { + /** + * @generated from protobuf enum value: RESOURCE_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * PostHog property value: "node" + * + * @generated from protobuf enum value: RESOURCE_KIND_NODE = 1; + */ + NODE = 1, + /** + * PostHog property value: "app_server" + * + * @generated from protobuf enum value: RESOURCE_KIND_APP_SERVER = 2; + */ + APP_SERVER = 2, + /** + * PostHog property value: "kube_server" + * + * @generated from protobuf enum value: RESOURCE_KIND_KUBE_SERVER = 3; + */ + KUBE_SERVER = 3, + /** + * PostHog property value: "db_server" + * + * @generated from protobuf enum value: RESOURCE_KIND_DB_SERVER = 4; + */ + DB_SERVER = 4, + /** + * PostHog property value: "windows_desktop" + * + * @generated from protobuf enum value: RESOURCE_KIND_WINDOWS_DESKTOP = 5; + */ + WINDOWS_DESKTOP = 5, + /** + * ServerV3 ("node") heartbeat with a subkind of "openssh" (as opposed to + * empty or "teleport"); not used in keepalives + * + * PostHog property value: "node.openssh" + * + * @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH = 6; + */ + NODE_OPENSSH = 6, + /** + * ServerV3 ("node") heartbeat with a subkind of "openssh-ec2-ice". + * Nodes that map EC2 instances and are accessed using EC2 Instance Connect Endpoint. + * Not used in keepalives. + * This is the SubKind SubKindOpenSSHEICENode in teleport repo. + * + * PostHog property value: "node.openssh_ec2_ice" + * + * @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH_EICE = 7; + */ + NODE_OPENSSH_EICE = 7 +} +// @generated message type with reflection information, may provide speed optimized methods +class UserActivityReport$Type extends MessageType { + constructor() { + super("prehog.v1.UserActivityReport", [ + { no: 1, name: "report_uuid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "cluster_name", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "reporter_hostid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "start_time", kind: "message", T: () => Timestamp }, + { no: 5, name: "records", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UserActivityRecord } + ]); + } + create(value?: PartialMessage): UserActivityReport { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reportUuid = new Uint8Array(0); + message.clusterName = new Uint8Array(0); + message.reporterHostid = new Uint8Array(0); + message.records = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserActivityReport): UserActivityReport { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes report_uuid */ 1: + message.reportUuid = reader.bytes(); + break; + case /* bytes cluster_name */ 2: + message.clusterName = reader.bytes(); + break; + case /* bytes reporter_hostid */ 3: + message.reporterHostid = reader.bytes(); + break; + case /* google.protobuf.Timestamp start_time */ 4: + message.startTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startTime); + break; + case /* repeated prehog.v1.UserActivityRecord records */ 5: + message.records.push(UserActivityRecord.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UserActivityReport, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes report_uuid = 1; */ + if (message.reportUuid.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.reportUuid); + /* bytes cluster_name = 2; */ + if (message.clusterName.length) + writer.tag(2, WireType.LengthDelimited).bytes(message.clusterName); + /* bytes reporter_hostid = 3; */ + if (message.reporterHostid.length) + writer.tag(3, WireType.LengthDelimited).bytes(message.reporterHostid); + /* google.protobuf.Timestamp start_time = 4; */ + if (message.startTime) + Timestamp.internalBinaryWrite(message.startTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated prehog.v1.UserActivityRecord records = 5; */ + for (let i = 0; i < message.records.length; i++) + UserActivityRecord.internalBinaryWrite(message.records[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1.UserActivityReport + */ +export const UserActivityReport = new UserActivityReport$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UserActivityRecord$Type extends MessageType { + constructor() { + super("prehog.v1.UserActivityRecord", [ + { no: 1, name: "user_name", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 14, name: "user_kind", kind: "enum", T: () => ["prehog.v1.UserKind", UserKind, "USER_KIND_"] }, + { no: 2, name: "logins", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 3, name: "ssh_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "app_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 5, name: "kube_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 6, name: "db_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 7, name: "desktop_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 8, name: "app_tcp_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 9, name: "ssh_port_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 10, name: "kube_requests", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 11, name: "sftp_events", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 12, name: "ssh_port_v2_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 13, name: "kube_port_sessions", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): UserActivityRecord { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = new Uint8Array(0); + message.userKind = 0; + message.logins = 0; + message.sshSessions = 0; + message.appSessions = 0; + message.kubeSessions = 0; + message.dbSessions = 0; + message.desktopSessions = 0; + message.appTcpSessions = 0; + message.sshPortSessions = 0; + message.kubeRequests = 0; + message.sftpEvents = 0; + message.sshPortV2Sessions = 0; + message.kubePortSessions = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserActivityRecord): UserActivityRecord { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes user_name */ 1: + message.userName = reader.bytes(); + break; + case /* prehog.v1.UserKind user_kind */ 14: + message.userKind = reader.int32(); + break; + case /* uint64 logins */ 2: + message.logins = reader.uint64().toNumber(); + break; + case /* uint64 ssh_sessions */ 3: + message.sshSessions = reader.uint64().toNumber(); + break; + case /* uint64 app_sessions */ 4: + message.appSessions = reader.uint64().toNumber(); + break; + case /* uint64 kube_sessions */ 5: + message.kubeSessions = reader.uint64().toNumber(); + break; + case /* uint64 db_sessions */ 6: + message.dbSessions = reader.uint64().toNumber(); + break; + case /* uint64 desktop_sessions */ 7: + message.desktopSessions = reader.uint64().toNumber(); + break; + case /* uint64 app_tcp_sessions */ 8: + message.appTcpSessions = reader.uint64().toNumber(); + break; + case /* uint64 ssh_port_sessions = 9 [deprecated = true];*/ 9: + message.sshPortSessions = reader.uint64().toNumber(); + break; + case /* uint64 kube_requests */ 10: + message.kubeRequests = reader.uint64().toNumber(); + break; + case /* uint64 sftp_events */ 11: + message.sftpEvents = reader.uint64().toNumber(); + break; + case /* uint64 ssh_port_v2_sessions */ 12: + message.sshPortV2Sessions = reader.uint64().toNumber(); + break; + case /* uint64 kube_port_sessions */ 13: + message.kubePortSessions = reader.uint64().toNumber(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UserActivityRecord, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes user_name = 1; */ + if (message.userName.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.userName); + /* prehog.v1.UserKind user_kind = 14; */ + if (message.userKind !== 0) + writer.tag(14, WireType.Varint).int32(message.userKind); + /* uint64 logins = 2; */ + if (message.logins !== 0) + writer.tag(2, WireType.Varint).uint64(message.logins); + /* uint64 ssh_sessions = 3; */ + if (message.sshSessions !== 0) + writer.tag(3, WireType.Varint).uint64(message.sshSessions); + /* uint64 app_sessions = 4; */ + if (message.appSessions !== 0) + writer.tag(4, WireType.Varint).uint64(message.appSessions); + /* uint64 kube_sessions = 5; */ + if (message.kubeSessions !== 0) + writer.tag(5, WireType.Varint).uint64(message.kubeSessions); + /* uint64 db_sessions = 6; */ + if (message.dbSessions !== 0) + writer.tag(6, WireType.Varint).uint64(message.dbSessions); + /* uint64 desktop_sessions = 7; */ + if (message.desktopSessions !== 0) + writer.tag(7, WireType.Varint).uint64(message.desktopSessions); + /* uint64 app_tcp_sessions = 8; */ + if (message.appTcpSessions !== 0) + writer.tag(8, WireType.Varint).uint64(message.appTcpSessions); + /* uint64 ssh_port_sessions = 9 [deprecated = true]; */ + if (message.sshPortSessions !== 0) + writer.tag(9, WireType.Varint).uint64(message.sshPortSessions); + /* uint64 kube_requests = 10; */ + if (message.kubeRequests !== 0) + writer.tag(10, WireType.Varint).uint64(message.kubeRequests); + /* uint64 sftp_events = 11; */ + if (message.sftpEvents !== 0) + writer.tag(11, WireType.Varint).uint64(message.sftpEvents); + /* uint64 ssh_port_v2_sessions = 12; */ + if (message.sshPortV2Sessions !== 0) + writer.tag(12, WireType.Varint).uint64(message.sshPortV2Sessions); + /* uint64 kube_port_sessions = 13; */ + if (message.kubePortSessions !== 0) + writer.tag(13, WireType.Varint).uint64(message.kubePortSessions); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1.UserActivityRecord + */ +export const UserActivityRecord = new UserActivityRecord$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResourcePresenceReport$Type extends MessageType { + constructor() { + super("prehog.v1.ResourcePresenceReport", [ + { no: 1, name: "report_uuid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "cluster_name", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "reporter_hostid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "start_time", kind: "message", T: () => Timestamp }, + { no: 5, name: "resource_kind_reports", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResourceKindPresenceReport } + ]); + } + create(value?: PartialMessage): ResourcePresenceReport { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reportUuid = new Uint8Array(0); + message.clusterName = new Uint8Array(0); + message.reporterHostid = new Uint8Array(0); + message.resourceKindReports = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourcePresenceReport): ResourcePresenceReport { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes report_uuid */ 1: + message.reportUuid = reader.bytes(); + break; + case /* bytes cluster_name */ 2: + message.clusterName = reader.bytes(); + break; + case /* bytes reporter_hostid */ 3: + message.reporterHostid = reader.bytes(); + break; + case /* google.protobuf.Timestamp start_time */ 4: + message.startTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startTime); + break; + case /* repeated prehog.v1.ResourceKindPresenceReport resource_kind_reports */ 5: + message.resourceKindReports.push(ResourceKindPresenceReport.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourcePresenceReport, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes report_uuid = 1; */ + if (message.reportUuid.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.reportUuid); + /* bytes cluster_name = 2; */ + if (message.clusterName.length) + writer.tag(2, WireType.LengthDelimited).bytes(message.clusterName); + /* bytes reporter_hostid = 3; */ + if (message.reporterHostid.length) + writer.tag(3, WireType.LengthDelimited).bytes(message.reporterHostid); + /* google.protobuf.Timestamp start_time = 4; */ + if (message.startTime) + Timestamp.internalBinaryWrite(message.startTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated prehog.v1.ResourceKindPresenceReport resource_kind_reports = 5; */ + for (let i = 0; i < message.resourceKindReports.length; i++) + ResourceKindPresenceReport.internalBinaryWrite(message.resourceKindReports[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1.ResourcePresenceReport + */ +export const ResourcePresenceReport = new ResourcePresenceReport$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResourceKindPresenceReport$Type extends MessageType { + constructor() { + super("prehog.v1.ResourceKindPresenceReport", [ + { no: 1, name: "resource_kind", kind: "enum", T: () => ["prehog.v1.ResourceKind", ResourceKind, "RESOURCE_KIND_"] }, + { no: 2, name: "resource_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 6 /*ScalarType.FIXED64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): ResourceKindPresenceReport { + const message = globalThis.Object.create((this.messagePrototype!)); + message.resourceKind = 0; + message.resourceIds = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceKindPresenceReport): ResourceKindPresenceReport { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1.ResourceKind resource_kind */ 1: + message.resourceKind = reader.int32(); + break; + case /* repeated fixed64 resource_ids */ 2: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.resourceIds.push(reader.fixed64().toNumber()); + else + message.resourceIds.push(reader.fixed64().toNumber()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourceKindPresenceReport, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1.ResourceKind resource_kind = 1; */ + if (message.resourceKind !== 0) + writer.tag(1, WireType.Varint).int32(message.resourceKind); + /* repeated fixed64 resource_ids = 2; */ + if (message.resourceIds.length) { + writer.tag(2, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.resourceIds.length; i++) + writer.fixed64(message.resourceIds[i]); + writer.join(); + } + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1.ResourceKindPresenceReport + */ +export const ResourceKindPresenceReport = new ResourceKindPresenceReport$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitUsageReportsRequest$Type extends MessageType { + constructor() { + super("prehog.v1.SubmitUsageReportsRequest", [ + { no: 1, name: "user_activity", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UserActivityReport }, + { no: 2, name: "resource_presence", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResourcePresenceReport } + ]); + } + create(value?: PartialMessage): SubmitUsageReportsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userActivity = []; + message.resourcePresence = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitUsageReportsRequest): SubmitUsageReportsRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated prehog.v1.UserActivityReport user_activity */ 1: + message.userActivity.push(UserActivityReport.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated prehog.v1.ResourcePresenceReport resource_presence */ 2: + message.resourcePresence.push(ResourcePresenceReport.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SubmitUsageReportsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated prehog.v1.UserActivityReport user_activity = 1; */ + for (let i = 0; i < message.userActivity.length; i++) + UserActivityReport.internalBinaryWrite(message.userActivity[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* repeated prehog.v1.ResourcePresenceReport resource_presence = 2; */ + for (let i = 0; i < message.resourcePresence.length; i++) + ResourcePresenceReport.internalBinaryWrite(message.resourcePresence[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1.SubmitUsageReportsRequest + */ +export const SubmitUsageReportsRequest = new SubmitUsageReportsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitUsageReportsResponse$Type extends MessageType { + constructor() { + super("prehog.v1.SubmitUsageReportsResponse", [ + { no: 1, name: "batch_uuid", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } + create(value?: PartialMessage): SubmitUsageReportsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.batchUuid = new Uint8Array(0); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitUsageReportsResponse): SubmitUsageReportsResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes batch_uuid */ 1: + message.batchUuid = reader.bytes(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SubmitUsageReportsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes batch_uuid = 1; */ + if (message.batchUuid.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.batchUuid); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1.SubmitUsageReportsResponse + */ +export const SubmitUsageReportsResponse = new SubmitUsageReportsResponse$Type(); +/** + * @generated ServiceType for protobuf service prehog.v1.TeleportReportingService + */ +export const TeleportReportingService = new ServiceType("prehog.v1.TeleportReportingService", [ + { name: "SubmitUsageReports", options: {}, I: SubmitUsageReportsRequest, O: SubmitUsageReportsResponse } +]); diff --git a/gen/proto/ts/prehog/v1alpha/connect_pb.grpc-client.ts b/gen/proto/ts/prehog/v1alpha/connect_pb.grpc-client.ts new file mode 100644 index 00000000000..8c23af5b4c0 --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/connect_pb.grpc-client.ts @@ -0,0 +1,58 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/connect.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { ConnectReportingService } from "./connect_pb"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { SubmitConnectEventResponse } from "./connect_pb"; +import type { SubmitConnectEventRequest } from "./connect_pb"; +import * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1alpha.ConnectReportingService + */ +export interface IConnectReportingServiceClient { + /** + * @generated from protobuf rpc: SubmitConnectEvent(prehog.v1alpha.SubmitConnectEventRequest) returns (prehog.v1alpha.SubmitConnectEventResponse); + */ + submitConnectEvent(input: SubmitConnectEventRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; + submitConnectEvent(input: SubmitConnectEventRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; + submitConnectEvent(input: SubmitConnectEventRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; + submitConnectEvent(input: SubmitConnectEventRequest, callback: (err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; +} +/** + * @generated from protobuf service prehog.v1alpha.ConnectReportingService + */ +export class ConnectReportingServiceClient extends grpc.Client implements IConnectReportingServiceClient { + private readonly _binaryOptions: Partial; + constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * @generated from protobuf rpc: SubmitConnectEvent(prehog.v1alpha.SubmitConnectEventRequest) returns (prehog.v1alpha.SubmitConnectEventResponse); + */ + submitConnectEvent(input: SubmitConnectEventRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitConnectEventResponse) => void)): grpc.ClientUnaryCall { + const method = ConnectReportingService.methods[0]; + return this.makeUnaryRequest(`/${ConnectReportingService.typeName}/${method.name}`, (value: SubmitConnectEventRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitConnectEventResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } +} diff --git a/gen/proto/ts/prehog/v1alpha/connect_pb.grpc-server.ts b/gen/proto/ts/prehog/v1alpha/connect_pb.grpc-server.ts new file mode 100644 index 00000000000..acb24bc61f5 --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/connect_pb.grpc-server.ts @@ -0,0 +1,58 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/connect.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { SubmitConnectEventResponse } from "./connect_pb"; +import { SubmitConnectEventRequest } from "./connect_pb"; +import type * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1alpha.ConnectReportingService + */ +export interface IConnectReportingService extends grpc.UntypedServiceImplementation { + /** + * @generated from protobuf rpc: SubmitConnectEvent(prehog.v1alpha.SubmitConnectEventRequest) returns (prehog.v1alpha.SubmitConnectEventResponse); + */ + submitConnectEvent: grpc.handleUnaryCall; +} +/** + * @grpc/grpc-js definition for the protobuf service prehog.v1alpha.ConnectReportingService. + * + * Usage: Implement the interface IConnectReportingService and add to a grpc server. + * + * ```typescript + * const server = new grpc.Server(); + * const service: IConnectReportingService = ... + * server.addService(connectReportingServiceDefinition, service); + * ``` + */ +export const connectReportingServiceDefinition: grpc.ServiceDefinition = { + submitConnectEvent: { + path: "/prehog.v1alpha.ConnectReportingService/SubmitConnectEvent", + originalName: "SubmitConnectEvent", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => SubmitConnectEventResponse.fromBinary(bytes), + requestDeserialize: bytes => SubmitConnectEventRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(SubmitConnectEventResponse.toBinary(value)), + requestSerialize: value => Buffer.from(SubmitConnectEventRequest.toBinary(value)) + } +}; diff --git a/gen/proto/ts/prehog/v1alpha/connect_pb.ts b/gen/proto/ts/prehog/v1alpha/connect_pb.ts new file mode 100644 index 00000000000..b4c5028c736 --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/connect_pb.ts @@ -0,0 +1,1068 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/connect.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Timestamp } from "../../google/protobuf/timestamp_pb"; +/** + * @generated from protobuf message prehog.v1alpha.ConnectClusterLoginEvent + */ +export interface ConnectClusterLoginEvent { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * local/github/saml/oidc/passwordless + * + * @generated from protobuf field: string connector_type = 3; + */ + connectorType: string; + /** + * @generated from protobuf field: string arch = 4; + */ + arch: string; + /** + * @generated from protobuf field: string os = 5; + */ + os: string; + /** + * @generated from protobuf field: string os_version = 6; + */ + osVersion: string; + /** + * @generated from protobuf field: string app_version = 7; + */ + appVersion: string; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectProtocolUseEvent + */ +export interface ConnectProtocolUseEvent { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * one of ssh/db/kube + * + * @generated from protobuf field: string protocol = 3; + */ + protocol: string; + /** + * one of resource_table/search_bar/connection_list/reopened_session (optional) + * + * @generated from protobuf field: string origin = 4; + */ + origin: string; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectAccessRequestCreateEvent + */ +export interface ConnectAccessRequestCreateEvent { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * one of role/resource + * + * @generated from protobuf field: string kind = 3; + */ + kind: string; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectAccessRequestReviewEvent + */ +export interface ConnectAccessRequestReviewEvent { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent + */ +export interface ConnectAccessRequestAssumeRoleEvent { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectFileTransferRunEvent + */ +export interface ConnectFileTransferRunEvent { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * @generated from protobuf field: bool is_upload = 3; + */ + isUpload: boolean; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectUserJobRoleUpdateEvent + */ +export interface ConnectUserJobRoleUpdateEvent { + /** + * Software Engineer, DevOps Engineer etc. + * + * @generated from protobuf field: string job_role = 1; + */ + jobRole: string; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectConnectMyComputerSetup + */ +export interface ConnectConnectMyComputerSetup { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * @generated from protobuf field: bool success = 3; + */ + success: boolean; + /** + * empty when success is true + * + * @generated from protobuf field: string failed_step = 4; + */ + failedStep: string; +} +/** + * @generated from protobuf message prehog.v1alpha.ConnectConnectMyComputerAgentStart + */ +export interface ConnectConnectMyComputerAgentStart { + /** + * anonymized + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitConnectEventRequest + */ +export interface SubmitConnectEventRequest { + /** + * UUID + * + * @generated from protobuf field: string distinct_id = 1; + */ + distinctId: string; + /** + * optional, will default to the ingest time if unset + * + * @generated from protobuf field: google.protobuf.Timestamp timestamp = 2; + */ + timestamp?: Timestamp; + /** + * @generated from protobuf oneof: event + */ + event: { + oneofKind: "clusterLogin"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectClusterLoginEvent cluster_login = 3; + */ + clusterLogin: ConnectClusterLoginEvent; + } | { + oneofKind: "protocolUse"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectProtocolUseEvent protocol_use = 4; + */ + protocolUse: ConnectProtocolUseEvent; + } | { + oneofKind: "accessRequestCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectAccessRequestCreateEvent access_request_create = 5; + */ + accessRequestCreate: ConnectAccessRequestCreateEvent; + } | { + oneofKind: "accessRequestReview"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectAccessRequestReviewEvent access_request_review = 6; + */ + accessRequestReview: ConnectAccessRequestReviewEvent; + } | { + oneofKind: "accessRequestAssumeRole"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent access_request_assume_role = 7; + */ + accessRequestAssumeRole: ConnectAccessRequestAssumeRoleEvent; + } | { + oneofKind: "fileTransferRun"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectFileTransferRunEvent file_transfer_run = 8; + */ + fileTransferRun: ConnectFileTransferRunEvent; + } | { + oneofKind: "userJobRoleUpdate"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectUserJobRoleUpdateEvent user_job_role_update = 9; + */ + userJobRoleUpdate: ConnectUserJobRoleUpdateEvent; + } | { + oneofKind: "connectMyComputerSetup"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectConnectMyComputerSetup connect_my_computer_setup = 10; + */ + connectMyComputerSetup: ConnectConnectMyComputerSetup; + } | { + oneofKind: "connectMyComputerAgentStart"; + /** + * @generated from protobuf field: prehog.v1alpha.ConnectConnectMyComputerAgentStart connect_my_computer_agent_start = 11; + */ + connectMyComputerAgentStart: ConnectConnectMyComputerAgentStart; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitConnectEventResponse + */ +export interface SubmitConnectEventResponse { +} +// @generated message type with reflection information, may provide speed optimized methods +class ConnectClusterLoginEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectClusterLoginEvent", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "connector_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "arch", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "os", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "os_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "app_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectClusterLoginEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + message.connectorType = ""; + message.arch = ""; + message.os = ""; + message.osVersion = ""; + message.appVersion = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectClusterLoginEvent): ConnectClusterLoginEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* string connector_type */ 3: + message.connectorType = reader.string(); + break; + case /* string arch */ 4: + message.arch = reader.string(); + break; + case /* string os */ 5: + message.os = reader.string(); + break; + case /* string os_version */ 6: + message.osVersion = reader.string(); + break; + case /* string app_version */ 7: + message.appVersion = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectClusterLoginEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* string connector_type = 3; */ + if (message.connectorType !== "") + writer.tag(3, WireType.LengthDelimited).string(message.connectorType); + /* string arch = 4; */ + if (message.arch !== "") + writer.tag(4, WireType.LengthDelimited).string(message.arch); + /* string os = 5; */ + if (message.os !== "") + writer.tag(5, WireType.LengthDelimited).string(message.os); + /* string os_version = 6; */ + if (message.osVersion !== "") + writer.tag(6, WireType.LengthDelimited).string(message.osVersion); + /* string app_version = 7; */ + if (message.appVersion !== "") + writer.tag(7, WireType.LengthDelimited).string(message.appVersion); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectClusterLoginEvent + */ +export const ConnectClusterLoginEvent = new ConnectClusterLoginEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectProtocolUseEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectProtocolUseEvent", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "protocol", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "origin", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectProtocolUseEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + message.protocol = ""; + message.origin = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectProtocolUseEvent): ConnectProtocolUseEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* string protocol */ 3: + message.protocol = reader.string(); + break; + case /* string origin */ 4: + message.origin = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectProtocolUseEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* string protocol = 3; */ + if (message.protocol !== "") + writer.tag(3, WireType.LengthDelimited).string(message.protocol); + /* string origin = 4; */ + if (message.origin !== "") + writer.tag(4, WireType.LengthDelimited).string(message.origin); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectProtocolUseEvent + */ +export const ConnectProtocolUseEvent = new ConnectProtocolUseEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectAccessRequestCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectAccessRequestCreateEvent", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectAccessRequestCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + message.kind = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectAccessRequestCreateEvent): ConnectAccessRequestCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* string kind */ 3: + message.kind = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectAccessRequestCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* string kind = 3; */ + if (message.kind !== "") + writer.tag(3, WireType.LengthDelimited).string(message.kind); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectAccessRequestCreateEvent + */ +export const ConnectAccessRequestCreateEvent = new ConnectAccessRequestCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectAccessRequestReviewEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectAccessRequestReviewEvent", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectAccessRequestReviewEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectAccessRequestReviewEvent): ConnectAccessRequestReviewEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectAccessRequestReviewEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectAccessRequestReviewEvent + */ +export const ConnectAccessRequestReviewEvent = new ConnectAccessRequestReviewEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectAccessRequestAssumeRoleEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectAccessRequestAssumeRoleEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectAccessRequestAssumeRoleEvent): ConnectAccessRequestAssumeRoleEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectAccessRequestAssumeRoleEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent + */ +export const ConnectAccessRequestAssumeRoleEvent = new ConnectAccessRequestAssumeRoleEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectFileTransferRunEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectFileTransferRunEvent", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "is_upload", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): ConnectFileTransferRunEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + message.isUpload = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectFileTransferRunEvent): ConnectFileTransferRunEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* bool is_upload */ 3: + message.isUpload = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectFileTransferRunEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* bool is_upload = 3; */ + if (message.isUpload !== false) + writer.tag(3, WireType.Varint).bool(message.isUpload); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectFileTransferRunEvent + */ +export const ConnectFileTransferRunEvent = new ConnectFileTransferRunEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectUserJobRoleUpdateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectUserJobRoleUpdateEvent", [ + { no: 1, name: "job_role", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectUserJobRoleUpdateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.jobRole = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectUserJobRoleUpdateEvent): ConnectUserJobRoleUpdateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string job_role */ 1: + message.jobRole = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectUserJobRoleUpdateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string job_role = 1; */ + if (message.jobRole !== "") + writer.tag(1, WireType.LengthDelimited).string(message.jobRole); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectUserJobRoleUpdateEvent + */ +export const ConnectUserJobRoleUpdateEvent = new ConnectUserJobRoleUpdateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectConnectMyComputerSetup$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectConnectMyComputerSetup", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "failed_step", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectConnectMyComputerSetup { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + message.success = false; + message.failedStep = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectConnectMyComputerSetup): ConnectConnectMyComputerSetup { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* bool success */ 3: + message.success = reader.bool(); + break; + case /* string failed_step */ 4: + message.failedStep = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectConnectMyComputerSetup, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* bool success = 3; */ + if (message.success !== false) + writer.tag(3, WireType.Varint).bool(message.success); + /* string failed_step = 4; */ + if (message.failedStep !== "") + writer.tag(4, WireType.LengthDelimited).string(message.failedStep); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectConnectMyComputerSetup + */ +export const ConnectConnectMyComputerSetup = new ConnectConnectMyComputerSetup$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ConnectConnectMyComputerAgentStart$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ConnectConnectMyComputerAgentStart", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ConnectConnectMyComputerAgentStart { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectConnectMyComputerAgentStart): ConnectConnectMyComputerAgentStart { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ConnectConnectMyComputerAgentStart, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ConnectConnectMyComputerAgentStart + */ +export const ConnectConnectMyComputerAgentStart = new ConnectConnectMyComputerAgentStart$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitConnectEventRequest$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitConnectEventRequest", [ + { no: 1, name: "distinct_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "timestamp", kind: "message", T: () => Timestamp }, + { no: 3, name: "cluster_login", kind: "message", oneof: "event", T: () => ConnectClusterLoginEvent }, + { no: 4, name: "protocol_use", kind: "message", oneof: "event", T: () => ConnectProtocolUseEvent }, + { no: 5, name: "access_request_create", kind: "message", oneof: "event", T: () => ConnectAccessRequestCreateEvent }, + { no: 6, name: "access_request_review", kind: "message", oneof: "event", T: () => ConnectAccessRequestReviewEvent }, + { no: 7, name: "access_request_assume_role", kind: "message", oneof: "event", T: () => ConnectAccessRequestAssumeRoleEvent }, + { no: 8, name: "file_transfer_run", kind: "message", oneof: "event", T: () => ConnectFileTransferRunEvent }, + { no: 9, name: "user_job_role_update", kind: "message", oneof: "event", T: () => ConnectUserJobRoleUpdateEvent }, + { no: 10, name: "connect_my_computer_setup", kind: "message", oneof: "event", T: () => ConnectConnectMyComputerSetup }, + { no: 11, name: "connect_my_computer_agent_start", kind: "message", oneof: "event", T: () => ConnectConnectMyComputerAgentStart } + ]); + } + create(value?: PartialMessage): SubmitConnectEventRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.distinctId = ""; + message.event = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitConnectEventRequest): SubmitConnectEventRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string distinct_id */ 1: + message.distinctId = reader.string(); + break; + case /* google.protobuf.Timestamp timestamp */ 2: + message.timestamp = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timestamp); + break; + case /* prehog.v1alpha.ConnectClusterLoginEvent cluster_login */ 3: + message.event = { + oneofKind: "clusterLogin", + clusterLogin: ConnectClusterLoginEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).clusterLogin) + }; + break; + case /* prehog.v1alpha.ConnectProtocolUseEvent protocol_use */ 4: + message.event = { + oneofKind: "protocolUse", + protocolUse: ConnectProtocolUseEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).protocolUse) + }; + break; + case /* prehog.v1alpha.ConnectAccessRequestCreateEvent access_request_create */ 5: + message.event = { + oneofKind: "accessRequestCreate", + accessRequestCreate: ConnectAccessRequestCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessRequestCreate) + }; + break; + case /* prehog.v1alpha.ConnectAccessRequestReviewEvent access_request_review */ 6: + message.event = { + oneofKind: "accessRequestReview", + accessRequestReview: ConnectAccessRequestReviewEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessRequestReview) + }; + break; + case /* prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent access_request_assume_role */ 7: + message.event = { + oneofKind: "accessRequestAssumeRole", + accessRequestAssumeRole: ConnectAccessRequestAssumeRoleEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessRequestAssumeRole) + }; + break; + case /* prehog.v1alpha.ConnectFileTransferRunEvent file_transfer_run */ 8: + message.event = { + oneofKind: "fileTransferRun", + fileTransferRun: ConnectFileTransferRunEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).fileTransferRun) + }; + break; + case /* prehog.v1alpha.ConnectUserJobRoleUpdateEvent user_job_role_update */ 9: + message.event = { + oneofKind: "userJobRoleUpdate", + userJobRoleUpdate: ConnectUserJobRoleUpdateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).userJobRoleUpdate) + }; + break; + case /* prehog.v1alpha.ConnectConnectMyComputerSetup connect_my_computer_setup */ 10: + message.event = { + oneofKind: "connectMyComputerSetup", + connectMyComputerSetup: ConnectConnectMyComputerSetup.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).connectMyComputerSetup) + }; + break; + case /* prehog.v1alpha.ConnectConnectMyComputerAgentStart connect_my_computer_agent_start */ 11: + message.event = { + oneofKind: "connectMyComputerAgentStart", + connectMyComputerAgentStart: ConnectConnectMyComputerAgentStart.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).connectMyComputerAgentStart) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SubmitConnectEventRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string distinct_id = 1; */ + if (message.distinctId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.distinctId); + /* google.protobuf.Timestamp timestamp = 2; */ + if (message.timestamp) + Timestamp.internalBinaryWrite(message.timestamp, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectClusterLoginEvent cluster_login = 3; */ + if (message.event.oneofKind === "clusterLogin") + ConnectClusterLoginEvent.internalBinaryWrite(message.event.clusterLogin, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectProtocolUseEvent protocol_use = 4; */ + if (message.event.oneofKind === "protocolUse") + ConnectProtocolUseEvent.internalBinaryWrite(message.event.protocolUse, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectAccessRequestCreateEvent access_request_create = 5; */ + if (message.event.oneofKind === "accessRequestCreate") + ConnectAccessRequestCreateEvent.internalBinaryWrite(message.event.accessRequestCreate, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectAccessRequestReviewEvent access_request_review = 6; */ + if (message.event.oneofKind === "accessRequestReview") + ConnectAccessRequestReviewEvent.internalBinaryWrite(message.event.accessRequestReview, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent access_request_assume_role = 7; */ + if (message.event.oneofKind === "accessRequestAssumeRole") + ConnectAccessRequestAssumeRoleEvent.internalBinaryWrite(message.event.accessRequestAssumeRole, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectFileTransferRunEvent file_transfer_run = 8; */ + if (message.event.oneofKind === "fileTransferRun") + ConnectFileTransferRunEvent.internalBinaryWrite(message.event.fileTransferRun, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectUserJobRoleUpdateEvent user_job_role_update = 9; */ + if (message.event.oneofKind === "userJobRoleUpdate") + ConnectUserJobRoleUpdateEvent.internalBinaryWrite(message.event.userJobRoleUpdate, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectConnectMyComputerSetup connect_my_computer_setup = 10; */ + if (message.event.oneofKind === "connectMyComputerSetup") + ConnectConnectMyComputerSetup.internalBinaryWrite(message.event.connectMyComputerSetup, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ConnectConnectMyComputerAgentStart connect_my_computer_agent_start = 11; */ + if (message.event.oneofKind === "connectMyComputerAgentStart") + ConnectConnectMyComputerAgentStart.internalBinaryWrite(message.event.connectMyComputerAgentStart, writer.tag(11, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitConnectEventRequest + */ +export const SubmitConnectEventRequest = new SubmitConnectEventRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitConnectEventResponse$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitConnectEventResponse", []); + } + create(value?: PartialMessage): SubmitConnectEventResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitConnectEventResponse): SubmitConnectEventResponse { + return target ?? this.create(); + } + internalBinaryWrite(message: SubmitConnectEventResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitConnectEventResponse + */ +export const SubmitConnectEventResponse = new SubmitConnectEventResponse$Type(); +/** + * @generated ServiceType for protobuf service prehog.v1alpha.ConnectReportingService + */ +export const ConnectReportingService = new ServiceType("prehog.v1alpha.ConnectReportingService", [ + { name: "SubmitConnectEvent", options: {}, I: SubmitConnectEventRequest, O: SubmitConnectEventResponse } +]); diff --git a/gen/proto/ts/prehog/v1alpha/tbot_pb.grpc-client.ts b/gen/proto/ts/prehog/v1alpha/tbot_pb.grpc-client.ts new file mode 100644 index 00000000000..e45aa73120e --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/tbot_pb.grpc-client.ts @@ -0,0 +1,58 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/tbot.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { TbotReportingService } from "./tbot_pb"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { SubmitTbotEventResponse } from "./tbot_pb"; +import type { SubmitTbotEventRequest } from "./tbot_pb"; +import * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1alpha.TbotReportingService + */ +export interface ITbotReportingServiceClient { + /** + * @generated from protobuf rpc: SubmitTbotEvent(prehog.v1alpha.SubmitTbotEventRequest) returns (prehog.v1alpha.SubmitTbotEventResponse); + */ + submitTbotEvent(input: SubmitTbotEventRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall; + submitTbotEvent(input: SubmitTbotEventRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall; + submitTbotEvent(input: SubmitTbotEventRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall; + submitTbotEvent(input: SubmitTbotEventRequest, callback: (err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void): grpc.ClientUnaryCall; +} +/** + * @generated from protobuf service prehog.v1alpha.TbotReportingService + */ +export class TbotReportingServiceClient extends grpc.Client implements ITbotReportingServiceClient { + private readonly _binaryOptions: Partial; + constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * @generated from protobuf rpc: SubmitTbotEvent(prehog.v1alpha.SubmitTbotEventRequest) returns (prehog.v1alpha.SubmitTbotEventResponse); + */ + submitTbotEvent(input: SubmitTbotEventRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitTbotEventResponse) => void)): grpc.ClientUnaryCall { + const method = TbotReportingService.methods[0]; + return this.makeUnaryRequest(`/${TbotReportingService.typeName}/${method.name}`, (value: SubmitTbotEventRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitTbotEventResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } +} diff --git a/gen/proto/ts/prehog/v1alpha/tbot_pb.grpc-server.ts b/gen/proto/ts/prehog/v1alpha/tbot_pb.grpc-server.ts new file mode 100644 index 00000000000..baa4f634e85 --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/tbot_pb.grpc-server.ts @@ -0,0 +1,58 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/tbot.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { SubmitTbotEventResponse } from "./tbot_pb"; +import { SubmitTbotEventRequest } from "./tbot_pb"; +import type * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1alpha.TbotReportingService + */ +export interface ITbotReportingService extends grpc.UntypedServiceImplementation { + /** + * @generated from protobuf rpc: SubmitTbotEvent(prehog.v1alpha.SubmitTbotEventRequest) returns (prehog.v1alpha.SubmitTbotEventResponse); + */ + submitTbotEvent: grpc.handleUnaryCall; +} +/** + * @grpc/grpc-js definition for the protobuf service prehog.v1alpha.TbotReportingService. + * + * Usage: Implement the interface ITbotReportingService and add to a grpc server. + * + * ```typescript + * const server = new grpc.Server(); + * const service: ITbotReportingService = ... + * server.addService(tbotReportingServiceDefinition, service); + * ``` + */ +export const tbotReportingServiceDefinition: grpc.ServiceDefinition = { + submitTbotEvent: { + path: "/prehog.v1alpha.TbotReportingService/SubmitTbotEvent", + originalName: "SubmitTbotEvent", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => SubmitTbotEventResponse.fromBinary(bytes), + requestDeserialize: bytes => SubmitTbotEventRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(SubmitTbotEventResponse.toBinary(value)), + requestSerialize: value => Buffer.from(SubmitTbotEventRequest.toBinary(value)) + } +}; diff --git a/gen/proto/ts/prehog/v1alpha/tbot_pb.ts b/gen/proto/ts/prehog/v1alpha/tbot_pb.ts new file mode 100644 index 00000000000..294a8bfe3ea --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/tbot_pb.ts @@ -0,0 +1,341 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/tbot.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Timestamp } from "../../google/protobuf/timestamp_pb"; +/** + * TbotStartEvent is triggered whenever tbot starts, regardless of whether tbot + * was able to successfully connect to or authenticate with a Teleport cluster. + * + * @generated from protobuf message prehog.v1alpha.TbotStartEvent + */ +export interface TbotStartEvent { + /** + * @generated from protobuf field: prehog.v1alpha.TbotStartEvent.RunMode run_mode = 1; + */ + runMode: TbotStartEvent_RunMode; + /** + * @generated from protobuf field: string version = 2; + */ + version: string; + /** + * @generated from protobuf field: string join_type = 3; + */ + joinType: string; + /** + * @generated from protobuf field: string helper = 4; + */ + helper: string; + /** + * @generated from protobuf field: string helper_version = 5; + */ + helperVersion: string; + /** + * @generated from protobuf field: int32 destinations_other = 6; + */ + destinationsOther: number; + /** + * @generated from protobuf field: int32 destinations_database = 7; + */ + destinationsDatabase: number; + /** + * @generated from protobuf field: int32 destinations_kubernetes = 8; + */ + destinationsKubernetes: number; + /** + * @generated from protobuf field: int32 destinations_application = 9; + */ + destinationsApplication: number; +} +/** + * RunMode specifies whether or not tbot has been configured to run once + * and output certificates, or continually renew certificates in the + * background. + * + * @generated from protobuf enum prehog.v1alpha.TbotStartEvent.RunMode + */ +export enum TbotStartEvent_RunMode { + /** + * @generated from protobuf enum value: RUN_MODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: RUN_MODE_ONE_SHOT = 1; + */ + ONE_SHOT = 1, + /** + * @generated from protobuf enum value: RUN_MODE_DAEMON = 2; + */ + DAEMON = 2 +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitTbotEventRequest + */ +export interface SubmitTbotEventRequest { + /** + * uuid identifying that tbot session. This is future-proofing for if we + * decide to add multiple events in future, and need to tie them together. + * + * @generated from protobuf field: string distinct_id = 1; + */ + distinctId: string; + /** + * optional, will default to the ingest time if unset + * + * @generated from protobuf field: google.protobuf.Timestamp timestamp = 2; + */ + timestamp?: Timestamp; + /** + * @generated from protobuf oneof: event + */ + event: { + oneofKind: "start"; + /** + * @generated from protobuf field: prehog.v1alpha.TbotStartEvent start = 3; + */ + start: TbotStartEvent; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitTbotEventResponse + */ +export interface SubmitTbotEventResponse { +} +// @generated message type with reflection information, may provide speed optimized methods +class TbotStartEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.TbotStartEvent", [ + { no: 1, name: "run_mode", kind: "enum", T: () => ["prehog.v1alpha.TbotStartEvent.RunMode", TbotStartEvent_RunMode, "RUN_MODE_"] }, + { no: 2, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "join_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "helper", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "helper_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "destinations_other", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 7, name: "destinations_database", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 8, name: "destinations_kubernetes", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 9, name: "destinations_application", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): TbotStartEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.runMode = 0; + message.version = ""; + message.joinType = ""; + message.helper = ""; + message.helperVersion = ""; + message.destinationsOther = 0; + message.destinationsDatabase = 0; + message.destinationsKubernetes = 0; + message.destinationsApplication = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TbotStartEvent): TbotStartEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.TbotStartEvent.RunMode run_mode */ 1: + message.runMode = reader.int32(); + break; + case /* string version */ 2: + message.version = reader.string(); + break; + case /* string join_type */ 3: + message.joinType = reader.string(); + break; + case /* string helper */ 4: + message.helper = reader.string(); + break; + case /* string helper_version */ 5: + message.helperVersion = reader.string(); + break; + case /* int32 destinations_other */ 6: + message.destinationsOther = reader.int32(); + break; + case /* int32 destinations_database */ 7: + message.destinationsDatabase = reader.int32(); + break; + case /* int32 destinations_kubernetes */ 8: + message.destinationsKubernetes = reader.int32(); + break; + case /* int32 destinations_application */ 9: + message.destinationsApplication = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: TbotStartEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.TbotStartEvent.RunMode run_mode = 1; */ + if (message.runMode !== 0) + writer.tag(1, WireType.Varint).int32(message.runMode); + /* string version = 2; */ + if (message.version !== "") + writer.tag(2, WireType.LengthDelimited).string(message.version); + /* string join_type = 3; */ + if (message.joinType !== "") + writer.tag(3, WireType.LengthDelimited).string(message.joinType); + /* string helper = 4; */ + if (message.helper !== "") + writer.tag(4, WireType.LengthDelimited).string(message.helper); + /* string helper_version = 5; */ + if (message.helperVersion !== "") + writer.tag(5, WireType.LengthDelimited).string(message.helperVersion); + /* int32 destinations_other = 6; */ + if (message.destinationsOther !== 0) + writer.tag(6, WireType.Varint).int32(message.destinationsOther); + /* int32 destinations_database = 7; */ + if (message.destinationsDatabase !== 0) + writer.tag(7, WireType.Varint).int32(message.destinationsDatabase); + /* int32 destinations_kubernetes = 8; */ + if (message.destinationsKubernetes !== 0) + writer.tag(8, WireType.Varint).int32(message.destinationsKubernetes); + /* int32 destinations_application = 9; */ + if (message.destinationsApplication !== 0) + writer.tag(9, WireType.Varint).int32(message.destinationsApplication); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.TbotStartEvent + */ +export const TbotStartEvent = new TbotStartEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitTbotEventRequest$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitTbotEventRequest", [ + { no: 1, name: "distinct_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "timestamp", kind: "message", T: () => Timestamp }, + { no: 3, name: "start", kind: "message", oneof: "event", T: () => TbotStartEvent } + ]); + } + create(value?: PartialMessage): SubmitTbotEventRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.distinctId = ""; + message.event = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitTbotEventRequest): SubmitTbotEventRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string distinct_id */ 1: + message.distinctId = reader.string(); + break; + case /* google.protobuf.Timestamp timestamp */ 2: + message.timestamp = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timestamp); + break; + case /* prehog.v1alpha.TbotStartEvent start */ 3: + message.event = { + oneofKind: "start", + start: TbotStartEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).start) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SubmitTbotEventRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string distinct_id = 1; */ + if (message.distinctId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.distinctId); + /* google.protobuf.Timestamp timestamp = 2; */ + if (message.timestamp) + Timestamp.internalBinaryWrite(message.timestamp, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.TbotStartEvent start = 3; */ + if (message.event.oneofKind === "start") + TbotStartEvent.internalBinaryWrite(message.event.start, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitTbotEventRequest + */ +export const SubmitTbotEventRequest = new SubmitTbotEventRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitTbotEventResponse$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitTbotEventResponse", []); + } + create(value?: PartialMessage): SubmitTbotEventResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitTbotEventResponse): SubmitTbotEventResponse { + return target ?? this.create(); + } + internalBinaryWrite(message: SubmitTbotEventResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitTbotEventResponse + */ +export const SubmitTbotEventResponse = new SubmitTbotEventResponse$Type(); +/** + * @generated ServiceType for protobuf service prehog.v1alpha.TbotReportingService + */ +export const TbotReportingService = new ServiceType("prehog.v1alpha.TbotReportingService", [ + { name: "SubmitTbotEvent", options: {}, I: SubmitTbotEventRequest, O: SubmitTbotEventResponse } +]); diff --git a/gen/proto/ts/prehog/v1alpha/teleport_pb.grpc-client.ts b/gen/proto/ts/prehog/v1alpha/teleport_pb.grpc-client.ts new file mode 100644 index 00000000000..8d84a4839ab --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/teleport_pb.grpc-client.ts @@ -0,0 +1,116 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/teleport.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { TeleportReportingService } from "./teleport_pb"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { HelloTeleportResponse } from "./teleport_pb"; +import type { HelloTeleportRequest } from "./teleport_pb"; +import type { SubmitEventsResponse } from "./teleport_pb"; +import type { SubmitEventsRequest } from "./teleport_pb"; +import type { SubmitEventResponse } from "./teleport_pb"; +import type { SubmitEventRequest } from "./teleport_pb"; +import * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1alpha.TeleportReportingService + */ +export interface ITeleportReportingServiceClient { + /** + * equivalent to SubmitEvents with a single event, should be unused by now + * + * @deprecated + * @generated from protobuf rpc: SubmitEvent(prehog.v1alpha.SubmitEventRequest) returns (prehog.v1alpha.SubmitEventResponse); + */ + submitEvent(input: SubmitEventRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall; + submitEvent(input: SubmitEventRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall; + submitEvent(input: SubmitEventRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall; + submitEvent(input: SubmitEventRequest, callback: (err: grpc.ServiceError | null, value?: SubmitEventResponse) => void): grpc.ClientUnaryCall; + /** + * encodes and forwards usage events to the PostHog event database; each + * event is annotated with some properties that depend on the identity of the + * caller: + * - tp.account_id (UUID in string form, can be empty if missing from the + * license) + * - tp.license_name (should always be a UUID) + * - tp.license_authority (name of the authority that signed the license file + * used for authentication) + * - tp.is_cloud (boolean) + * + * @generated from protobuf rpc: SubmitEvents(prehog.v1alpha.SubmitEventsRequest) returns (prehog.v1alpha.SubmitEventsResponse); + */ + submitEvents(input: SubmitEventsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall; + submitEvents(input: SubmitEventsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall; + submitEvents(input: SubmitEventsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall; + submitEvents(input: SubmitEventsRequest, callback: (err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void): grpc.ClientUnaryCall; + /** + * @generated from protobuf rpc: HelloTeleport(prehog.v1alpha.HelloTeleportRequest) returns (prehog.v1alpha.HelloTeleportResponse); + */ + helloTeleport(input: HelloTeleportRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall; + helloTeleport(input: HelloTeleportRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall; + helloTeleport(input: HelloTeleportRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall; + helloTeleport(input: HelloTeleportRequest, callback: (err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void): grpc.ClientUnaryCall; +} +/** + * @generated from protobuf service prehog.v1alpha.TeleportReportingService + */ +export class TeleportReportingServiceClient extends grpc.Client implements ITeleportReportingServiceClient { + private readonly _binaryOptions: Partial; + constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * equivalent to SubmitEvents with a single event, should be unused by now + * + * @deprecated + * @generated from protobuf rpc: SubmitEvent(prehog.v1alpha.SubmitEventRequest) returns (prehog.v1alpha.SubmitEventResponse); + */ + submitEvent(input: SubmitEventRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitEventResponse) => void)): grpc.ClientUnaryCall { + const method = TeleportReportingService.methods[0]; + return this.makeUnaryRequest(`/${TeleportReportingService.typeName}/${method.name}`, (value: SubmitEventRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitEventResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * encodes and forwards usage events to the PostHog event database; each + * event is annotated with some properties that depend on the identity of the + * caller: + * - tp.account_id (UUID in string form, can be empty if missing from the + * license) + * - tp.license_name (should always be a UUID) + * - tp.license_authority (name of the authority that signed the license file + * used for authentication) + * - tp.is_cloud (boolean) + * + * @generated from protobuf rpc: SubmitEvents(prehog.v1alpha.SubmitEventsRequest) returns (prehog.v1alpha.SubmitEventsResponse); + */ + submitEvents(input: SubmitEventsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: SubmitEventsResponse) => void)): grpc.ClientUnaryCall { + const method = TeleportReportingService.methods[1]; + return this.makeUnaryRequest(`/${TeleportReportingService.typeName}/${method.name}`, (value: SubmitEventsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): SubmitEventsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * @generated from protobuf rpc: HelloTeleport(prehog.v1alpha.HelloTeleportRequest) returns (prehog.v1alpha.HelloTeleportResponse); + */ + helloTeleport(input: HelloTeleportRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: HelloTeleportResponse) => void)): grpc.ClientUnaryCall { + const method = TeleportReportingService.methods[2]; + return this.makeUnaryRequest(`/${TeleportReportingService.typeName}/${method.name}`, (value: HelloTeleportRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): HelloTeleportResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } +} diff --git a/gen/proto/ts/prehog/v1alpha/teleport_pb.grpc-server.ts b/gen/proto/ts/prehog/v1alpha/teleport_pb.grpc-server.ts new file mode 100644 index 00000000000..754fc9bbb9a --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/teleport_pb.grpc-server.ts @@ -0,0 +1,103 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/teleport.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { HelloTeleportResponse } from "./teleport_pb"; +import { HelloTeleportRequest } from "./teleport_pb"; +import { SubmitEventsResponse } from "./teleport_pb"; +import { SubmitEventsRequest } from "./teleport_pb"; +import { SubmitEventResponse } from "./teleport_pb"; +import { SubmitEventRequest } from "./teleport_pb"; +import type * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service prehog.v1alpha.TeleportReportingService + */ +export interface ITeleportReportingService extends grpc.UntypedServiceImplementation { + /** + * equivalent to SubmitEvents with a single event, should be unused by now + * + * @deprecated + * @generated from protobuf rpc: SubmitEvent(prehog.v1alpha.SubmitEventRequest) returns (prehog.v1alpha.SubmitEventResponse); + */ + submitEvent: grpc.handleUnaryCall; + /** + * encodes and forwards usage events to the PostHog event database; each + * event is annotated with some properties that depend on the identity of the + * caller: + * - tp.account_id (UUID in string form, can be empty if missing from the + * license) + * - tp.license_name (should always be a UUID) + * - tp.license_authority (name of the authority that signed the license file + * used for authentication) + * - tp.is_cloud (boolean) + * + * @generated from protobuf rpc: SubmitEvents(prehog.v1alpha.SubmitEventsRequest) returns (prehog.v1alpha.SubmitEventsResponse); + */ + submitEvents: grpc.handleUnaryCall; + /** + * @generated from protobuf rpc: HelloTeleport(prehog.v1alpha.HelloTeleportRequest) returns (prehog.v1alpha.HelloTeleportResponse); + */ + helloTeleport: grpc.handleUnaryCall; +} +/** + * @grpc/grpc-js definition for the protobuf service prehog.v1alpha.TeleportReportingService. + * + * Usage: Implement the interface ITeleportReportingService and add to a grpc server. + * + * ```typescript + * const server = new grpc.Server(); + * const service: ITeleportReportingService = ... + * server.addService(teleportReportingServiceDefinition, service); + * ``` + */ +export const teleportReportingServiceDefinition: grpc.ServiceDefinition = { + submitEvent: { + path: "/prehog.v1alpha.TeleportReportingService/SubmitEvent", + originalName: "SubmitEvent", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => SubmitEventResponse.fromBinary(bytes), + requestDeserialize: bytes => SubmitEventRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(SubmitEventResponse.toBinary(value)), + requestSerialize: value => Buffer.from(SubmitEventRequest.toBinary(value)) + }, + submitEvents: { + path: "/prehog.v1alpha.TeleportReportingService/SubmitEvents", + originalName: "SubmitEvents", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => SubmitEventsResponse.fromBinary(bytes), + requestDeserialize: bytes => SubmitEventsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(SubmitEventsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(SubmitEventsRequest.toBinary(value)) + }, + helloTeleport: { + path: "/prehog.v1alpha.TeleportReportingService/HelloTeleport", + originalName: "HelloTeleport", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => HelloTeleportResponse.fromBinary(bytes), + requestDeserialize: bytes => HelloTeleportRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(HelloTeleportResponse.toBinary(value)), + requestSerialize: value => Buffer.from(HelloTeleportRequest.toBinary(value)) + } +}; diff --git a/gen/proto/ts/prehog/v1alpha/teleport_pb.ts b/gen/proto/ts/prehog/v1alpha/teleport_pb.ts new file mode 100644 index 00000000000..8af6442338e --- /dev/null +++ b/gen/proto/ts/prehog/v1alpha/teleport_pb.ts @@ -0,0 +1,9056 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "prehog/v1alpha/teleport.proto" (package "prehog.v1alpha", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Timestamp } from "../../google/protobuf/timestamp_pb"; +import { Duration } from "../../google/protobuf/duration_pb"; +/** + * a successful user login + * + * PostHog event: tp.user.login + * + * @generated from protobuf message prehog.v1alpha.UserLoginEvent + */ +export interface UserLoginEvent { + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64; + * should always be a real user as bots and service accounts with long-term + * credentials don't ever login + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * type of the auth connector used in the login, should be + * "local"/"github"/"saml"/"oidc" + * + * PostHog property: tp.connector_type + * + * @generated from protobuf field: string connector_type = 2; + */ + connectorType: string; + /** + * anonymized device ID, empty or 32 bytes (HMAC-SHA-256) encoded in base64; + * for logins where device trust is enabled + * + * PostHog property: tp.device_id + * + * @generated from protobuf field: string device_id = 3; + */ + deviceId: string; + /** + * the required private key policy for this login. + * + * @generated from protobuf field: string required_private_key_policy = 4; + */ + requiredPrivateKeyPolicy: string; +} +/** + * MFAAuthenticationEvent is emitted when a user performs MFA authentication. + * + * @generated from protobuf message prehog.v1alpha.MFAAuthenticationEvent + */ +export interface MFAAuthenticationEvent { + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64; + * should always be a real user as bots and service accounts with long-term + * credentials don't ever login + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * anonymized device ID, empty or 32 bytes (HMAC-SHA-256) encoded in base64; + * for logins where device trust is enabled + * + * PostHog property: tp.device_id + * + * @generated from protobuf field: string device_id = 2; + */ + deviceId: string; + /** + * device type is the type of MFA device used + * + * @generated from protobuf field: string device_type = 3; + */ + deviceType: string; + /** + * the authorization scope the MFA authentication + * + * @generated from protobuf field: string mfa_challenge_scope = 4; + */ + mfaChallengeScope: string; +} +/** + * @generated from protobuf message prehog.v1alpha.SSOCreateEvent + */ +export interface SSOCreateEvent { + /** + * github/saml/oidc + * + * @generated from protobuf field: string connector_type = 1; + */ + connectorType: string; +} +/** + * ResourceCreateEvent is emitted when a resource is created. + * + * @generated from protobuf message prehog.v1alpha.ResourceCreateEvent + */ +export interface ResourceCreateEvent { + /** + * resource_type is the type of resource ("node", "node.openssh", "db", "k8s", "app"). + * + * @generated from protobuf field: string resource_type = 1; + */ + resourceType: string; + /** + * resource_origin is the origin of the resource ("cloud", "kubernetes"). + * + * @generated from protobuf field: string resource_origin = 2; + */ + resourceOrigin: string; + /** + * cloud_provider is the cloud provider the resource came from ("AWS", "Azure", "GCP") + * if resource_origin == "cloud". + * + * @generated from protobuf field: string cloud_provider = 3; + */ + cloudProvider: string; + /** + * database contains additional database information if resource_type == "db". + * + * @generated from protobuf field: prehog.v1alpha.DiscoveredDatabaseMetadata database = 4; + */ + database?: DiscoveredDatabaseMetadata; +} +/** + * DiscoveredDatabaseMetadata contains additional database information. + * + * @generated from protobuf message prehog.v1alpha.DiscoveredDatabaseMetadata + */ +export interface DiscoveredDatabaseMetadata { + /** + * database type. + * + * @generated from protobuf field: string db_type = 1; + */ + dbType: string; + /** + * database protocol. + * + * @generated from protobuf field: string db_protocol = 2; + */ + dbProtocol: string; +} +/** + * a heartbeat for a resource served by a Teleport instance outside of the + * control plane (i.e. not auth, not proxy) + * + * PostHog event: tp.resource.hb + * + * @generated from protobuf message prehog.v1alpha.ResourceHeartbeatEvent + */ +export interface ResourceHeartbeatEvent { + /** + * anonymized name of the resource, 32 bytes (HMAC-SHA-256); the name is the + * host ID for nodes but the actual user-facing name for other resources, so + * an app or a database served by multiple agents won't be counted multiple + * times + * + * PreHog property: tp.resource_name (in base64) + * + * @generated from protobuf field: bytes resource_name = 1; + */ + resourceName: Uint8Array; + /** + * kind of the resource (node, app, db) + * + * PostHog property: tp.resource_type (as a string, see ResourceKind) + * + * @generated from protobuf field: prehog.v1alpha.ResourceKind resource_kind = 2; + */ + resourceKind: ResourceKind; + /** + * true if the heartbeat has no expiration + * + * PostHog property: tp.is_static + * + * @generated from protobuf field: bool static = 3; + */ + static: boolean; +} +/** + * an event representing one of several audit events: session.start, port, + * app.session.start, db.session.start, windows.desktop.session.start; i.e. a + * SSH shell or port-forward, kubectl exec or kubectl port-forward, DB, App or + * Desktop connection + * + * an earlier encoding (as "tp.session.start") mixed SSH sessions and kubectl + * execs under a session type of "ssh" + * + * PostHog event: tp.session.start + * + * @generated from protobuf message prehog.v1alpha.SessionStartEvent + */ +export interface SessionStartEvent { + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * type of the session, should be "ssh"/"k8s"/"db"/"app"/"desktop" (matching + * the values for api/types.SessionKind) or "app_tcp", "ssh_port_v2" or + * "k8s_port" for TCP Application Access connections, SSH port forwards and + * kubectl port-forward respectively; a type of "ssh_port" represents either a + * SSH port forwarding connection or a kubectl port-forward (not used in new + * events) + * + * PostHog property: tp.session_type + * + * @generated from protobuf field: string session_type = 2; + */ + sessionType: string; + /** + * if session_type == "db" the database struct contains additional information + * about database session. + * + * PostHog property: tp.database + * + * @generated from protobuf field: prehog.v1alpha.SessionStartDatabaseMetadata database = 3; + */ + database?: SessionStartDatabaseMetadata; + /** + * if session_type == "desktop" the desktop struct contains additional + * information about the desktop session + * + * @generated from protobuf field: prehog.v1alpha.SessionStartDesktopMetadata desktop = 4; + */ + desktop?: SessionStartDesktopMetadata; + /** + * Indicates this event was generated by a Machine ID bot user. + * + * @generated from protobuf field: prehog.v1alpha.UserKind user_kind = 5; + */ + userKind: UserKind; +} +/** + * SessionStartDatabaseMetadata contains additional information about database session. + * + * @generated from protobuf message prehog.v1alpha.SessionStartDatabaseMetadata + */ +export interface SessionStartDatabaseMetadata { + /** + * database type. + * + * @generated from protobuf field: string db_type = 1; + */ + dbType: string; + /** + * database protocol. + * + * @generated from protobuf field: string db_protocol = 2; + */ + dbProtocol: string; + /** + * database origin source. + * + * @generated from protobuf field: string db_origin = 3; + */ + dbOrigin: string; +} +/** + * SessionStartDesktop Metadata contains additional information about + * a desktop session. + * + * @generated from protobuf message prehog.v1alpha.SessionStartDesktopMetadata + */ +export interface SessionStartDesktopMetadata { + /** + * desktop type ("ad" or "non-ad") + * + * @generated from protobuf field: string desktop_type = 1; + */ + desktopType: string; + /** + * Indicates how the desktop was enrolled in Teleport + * ("config-file" for statically defined hosts, or "dynamic" for + * hosts discovered via LDAP). + * + * @generated from protobuf field: string origin = 2; + */ + origin: string; + /** + * If desktop type is "ad" this field contains the anonymized Active + * Directory domain that the desktop belongs to. + * + * @generated from protobuf field: string windows_domain = 3; + */ + windowsDomain: string; + /** + * If true, and desktop type is "non-ad" automatic user creation is + * enabled for the session. (This does not mean that the user will + * be created, as Teleport does not know whether the user already exists.) + * + * @generated from protobuf field: bool allow_user_creation = 4; + */ + allowUserCreation: boolean; +} +/** + * the issuance of a user certificate from the user CA + * + * PostHog event: tp.certificate.issued + * + * @generated from protobuf message prehog.v1alpha.UserCertificateIssuedEvent + */ +export interface UserCertificateIssuedEvent { + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64; it + * can be the username of a bot user rather than of a regular user + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * the TTL of the issued certificate, typically 8 or 12 hours + * + * PostHog property: tp.ttl_minutes (in minutes, rounded up) + * + * @generated from protobuf field: google.protobuf.Duration ttl = 2; + */ + ttl?: Duration; + /** + * If true, the certificate was requested by a bot (i.e. Machine ID) user. + * PostHog property: tp.is_bot + * + * @generated from protobuf field: bool is_bot = 3; + */ + isBot: boolean; + /** + * If true, the certificate usage is restricted to database access. + * PostHog property: tp.usage_database + * + * @generated from protobuf field: bool usage_database = 4; + */ + usageDatabase: boolean; + /** + * If true, the certificate usage is restricted to app access. + * PostHog property: tp.usage_app + * + * @generated from protobuf field: bool usage_app = 5; + */ + usageApp: boolean; + /** + * If true, the certificate usage is restricted to Kubernetes access. + * PostHog property: tp.usage_kubernetes + * + * @generated from protobuf field: bool usage_kubernetes = 6; + */ + usageKubernetes: boolean; + /** + * If true, the certificate usage is restricted to desktop access. + * PostHog property: tp.usage_desktop + * + * @generated from protobuf field: bool usage_desktop = 7; + */ + usageDesktop: boolean; + /** + * the private key policy associated with these user certificates. + * + * @generated from protobuf field: string private_key_policy = 8; + */ + privateKeyPolicy: string; +} +/** + * UIBannerClickEvent is a usage event sent by the UI when the upgrade + * banner is clicked. + * + * @generated from protobuf message prehog.v1alpha.UIBannerClickEvent + */ +export interface UIBannerClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * cluster alert name + * + * @generated from protobuf field: string alert = 2; + */ + alert: string; +} +/** + * UIOnboardCompleteGoToDashboardClickEvent is a UI event sent when initial + * registration is complete. + * + * @generated from protobuf message prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent + */ +export interface UIOnboardCompleteGoToDashboardClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UIOnboardAddFirstResourceClickEvent is a UI event sent when a user clicks the + * "add first resource" button. + * + * @generated from protobuf message prehog.v1alpha.UIOnboardAddFirstResourceClickEvent + */ +export interface UIOnboardAddFirstResourceClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UIOnboardAddFirstResourceLaterClickEvent is a UI event sent when a user + * clicks the "add first resource later" button. + * + * @generated from protobuf message prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent + */ +export interface UIOnboardAddFirstResourceLaterClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UIOnboardSetCredentialSubmitEvent is a UI event sent during registration when + * users configure their credentials. + * + * @generated from protobuf message prehog.v1alpha.UIOnboardSetCredentialSubmitEvent + */ +export interface UIOnboardSetCredentialSubmitEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UIOnboardRegisterChallengeSubmitEvent is a UI event sent during registration + * when the MFA challenge is completed. + * + * @generated from protobuf message prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent + */ +export interface UIOnboardRegisterChallengeSubmitEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: string mfa_type = 2; + */ + mfaType: string; + /** + * @generated from protobuf field: string login_flow = 3; + */ + loginFlow: string; +} +/** + * UIOnboardQuestionnaireSubmitEvent is a UI event sent during registration when + * user submits their onboarding questionnaire. + * + * @generated from protobuf message prehog.v1alpha.UIOnboardQuestionnaireSubmitEvent + */ +export interface UIOnboardQuestionnaireSubmitEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UIRecoveryCodesContinueClickEvent is a UI event sent during + * registration when the user configures cluster recovery codes. + * + * @generated from protobuf message prehog.v1alpha.UIRecoveryCodesContinueClickEvent + */ +export interface UIRecoveryCodesContinueClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UIRecoveryCodesCopyClickEvent is a UI event sent during + * registration when the user copies recovery codes. + * + * @generated from protobuf message prehog.v1alpha.UIRecoveryCodesCopyClickEvent + */ +export interface UIRecoveryCodesCopyClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UIRecoveryCodesPrintClickEvent is a UI event sent during + * registration when the user prints recovery codes. + * + * @generated from protobuf message prehog.v1alpha.UIRecoveryCodesPrintClickEvent + */ +export interface UIRecoveryCodesPrintClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * DiscoverMetadata contains common metadata for Discover related events. + * + * @generated from protobuf message prehog.v1alpha.DiscoverMetadata + */ +export interface DiscoverMetadata { + /** + * Uniquely identifies Discover wizard "session". Will allow to correlate + * events within the same Discover wizard run. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * anonymized + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * SSO indicates whether the user is from an SSO provider. + * + * @generated from protobuf field: bool sso = 3; + */ + sso: boolean; +} +/** + * DiscoverResourceMetadata contains common metadata identifying resource type being added. + * + * @generated from protobuf message prehog.v1alpha.DiscoverResourceMetadata + */ +export interface DiscoverResourceMetadata { + /** + * Resource type that is being added. + * + * @generated from protobuf field: prehog.v1alpha.DiscoverResource resource = 1; + */ + resource: DiscoverResource; +} +/** + * DiscoverStepStatus contains fields that track a particular step outcome, + * for example connection test failed or succeeded, or user aborted the step. + * + * @generated from protobuf message prehog.v1alpha.DiscoverStepStatus + */ +export interface DiscoverStepStatus { + /** + * Indicates the step outcome. + * + * @generated from protobuf field: prehog.v1alpha.DiscoverStatus status = 1; + */ + status: DiscoverStatus; + /** + * Contains error details in case of Error Status. + * We have to be careful to not include any identifyable infomation like server addresses here. + * + * @generated from protobuf field: string error = 2; + */ + error: string; +} +/** + * UIDiscoverStartedEvent is emitted when the wizard opens. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverStartedEvent + */ +export interface UIDiscoverStartedEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 2; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverResourceSelectionEvent is emitted when user selected resource type to add + * and proceeded to the next step. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverResourceSelectionEvent + */ +export interface UIDiscoverResourceSelectionEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverIntegrationAWSOIDCConnectEvent is emitted when a user is finished with the step + * that asks user to setup aws integration or select from a list of existing + * aws integrations. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverIntegrationAWSOIDCConnectEvent + */ +export interface UIDiscoverIntegrationAWSOIDCConnectEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverDatabaseRDSEnrollEvent is emitted when a user is finished with + * the step that asks user to select from a list of RDS databases. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDatabaseRDSEnrollEvent + */ +export interface UIDiscoverDatabaseRDSEnrollEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; + /** + * @generated from protobuf field: int64 selected_resources_count = 4; + */ + selectedResourcesCount: number; +} +/** + * UIDiscoverDeployServiceEvent is emitted after the user installs a Teleport Agent. + * For SSH this is the Teleport 'install-node' script. + * + * For Kubernetes this is the teleport-agent helm chart installation. + * + * For Database Access this step is the installation of the teleport 'install-db' script. + * It can be skipped if the cluster already has a Database Service capable of proxying the database. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDeployServiceEvent + */ +export interface UIDiscoverDeployServiceEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployMethod deploy_method = 4; + */ + deployMethod: UIDiscoverDeployServiceEvent_DeployMethod; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployType deploy_type = 5; + */ + deployType: UIDiscoverDeployServiceEvent_DeployType; +} +/** + * DeployMethod describes the method used to deploy a service. + * + * @generated from protobuf enum prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployMethod + */ +export enum UIDiscoverDeployServiceEvent_DeployMethod { + /** + * DEPLOY_METHOD_UNSPECIFIED means there was an existing service + * so deploying step got skipped. + * + * @generated from protobuf enum value: DEPLOY_METHOD_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * DEPLOY_METHOD_AUTO means Teleport deployed a service for the user. + * + * @generated from protobuf enum value: DEPLOY_METHOD_AUTO = 1; + */ + AUTO = 1, + /** + * DEPLOY_METHOD_MANUAL means a user deployed a service by themselves. + * + * @generated from protobuf enum value: DEPLOY_METHOD_MANUAL = 2; + */ + MANUAL = 2 +} +/** + * DeployType describes the type of deployment. + * + * @generated from protobuf enum prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployType + */ +export enum UIDiscoverDeployServiceEvent_DeployType { + /** + * DEPLOY_METHOD_UNSPECIFIED means there was an existing service + * so deploying step got skipped. + * + * @generated from protobuf enum value: DEPLOY_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * DEPLOY_TYPE_INSTALL_SCRIPT means service was deployed using an + * install script. + * + * @generated from protobuf enum value: DEPLOY_TYPE_INSTALL_SCRIPT = 1; + */ + INSTALL_SCRIPT = 1, + /** + * DEPLOY_TYPE_AMAZON_ECS means service was deployed using amazon's + * elastic container service. + * + * @generated from protobuf enum value: DEPLOY_TYPE_AMAZON_ECS = 2; + */ + AMAZON_ECS = 2 +} +/** + * UIDiscoverDatabaseRegisterEvent is emitted when a user is finished with the step that registers a database resource. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDatabaseRegisterEvent + */ +export interface UIDiscoverDatabaseRegisterEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverDatabaseConfigureMTLSEvent is emitted when a user is finished with the step that configures mutual TLS for a self-hosted database. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDatabaseConfigureMTLSEvent + */ +export interface UIDiscoverDatabaseConfigureMTLSEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverDesktopActiveDirectoryToolsInstallEvent is emitted when the user is finished with the step that asks user to run the install Active Directory tools script for the Desktop flow. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDesktopActiveDirectoryToolsInstallEvent + */ +export interface UIDiscoverDesktopActiveDirectoryToolsInstallEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverDesktopActiveDirectoryConfigureEvent is emitted when the user is finished with the step that asks user to run the Configure Active Directory script for the Desktop flow. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDesktopActiveDirectoryConfigureEvent + */ +export interface UIDiscoverDesktopActiveDirectoryConfigureEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverAutoDiscoveredResourcesEvent is emitted when the user is finished with the step that auto discovers resources (waiting until resources show up). + * resources_count field must reflect the latest amount of discovered resources (get the number after user is finished with this step). + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverAutoDiscoveredResourcesEvent + */ +export interface UIDiscoverAutoDiscoveredResourcesEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; + /** + * @generated from protobuf field: int64 resources_count = 4; + */ + resourcesCount: number; +} +/** + * UIDiscoverEC2InstanceSelectionEvent is emitted when the user is finished with the step that asks the user to select an EC2 Instance to enroll. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverEC2InstanceSelectionEvent + */ +export interface UIDiscoverEC2InstanceSelectionEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverDeployEICEEvent is emitted when the user deploys an EC2 Instance Connect Endpoint. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDeployEICEEvent + */ +export interface UIDiscoverDeployEICEEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverCreateNodeEvent is emitted when the node is created in Teleport. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverCreateNodeEvent + */ +export interface UIDiscoverCreateNodeEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverDatabaseConfigureIAMPolicyEvent is emitted when a user is finished with the step that configures IAM policy for an RDS database. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverDatabaseConfigureIAMPolicyEvent + */ +export interface UIDiscoverDatabaseConfigureIAMPolicyEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverPrincipalsConfigureEvent is emitted when a user is finished with the step that allows user to update their principals (setting up access). + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverPrincipalsConfigureEvent + */ +export interface UIDiscoverPrincipalsConfigureEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverTestConnectionEvent emitted on the "Test Connection" screen + * when the user clicked tested connection to their resource. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverTestConnectionEvent + */ +export interface UIDiscoverTestConnectionEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * UIDiscoverCompletedEvent is emitted when user completes the Discover wizard. + * + * @generated from protobuf message prehog.v1alpha.UIDiscoverCompletedEvent + */ +export interface UIDiscoverCompletedEvent { + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverMetadata metadata = 1; + */ + metadata?: DiscoverMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverResourceMetadata resource = 2; + */ + resource?: DiscoverResourceMetadata; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoverStepStatus status = 3; + */ + status?: DiscoverStepStatus; +} +/** + * RoleCreateEvent is emitted when user creates a custom role. + * + * @generated from protobuf message prehog.v1alpha.RoleCreateEvent + */ +export interface RoleCreateEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * anonymized + * + * @generated from protobuf field: string role_name = 2; + */ + roleName: string; +} +/** + * BotCreateEvent is emitted when user creates a bot. + * + * @generated from protobuf message prehog.v1alpha.BotCreateEvent + */ +export interface BotCreateEvent { + /** + * user_name is the anonymized name of the user who created the bot + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * anonymized + * + * @generated from protobuf field: string bot_user_name = 2; + */ + botUserName: string; + /** + * role_name is the anonymized name of the bot role that was created. + * + * @generated from protobuf field: string role_name = 3; + */ + roleName: string; + /** + * role_count is the number of roles that the bot role can impersonate on + * creation. + * + * @generated from protobuf field: int64 role_count = 4; + */ + roleCount: number; + /** + * join_method is the join method of the token associated with the bot on + * creation. + * + * @generated from protobuf field: string join_method = 5; + */ + joinMethod: string; + /** + * bot_name is the anonymised name of the bot. + * + * @generated from protobuf field: string bot_name = 6; + */ + botName: string; +} +/** + * BotJoinEvent is emitted when a bot joins a Teleport cluster. + * + * @generated from protobuf message prehog.v1alpha.BotJoinEvent + */ +export interface BotJoinEvent { + /** + * bot_name is the anonymised name of the bot. + * + * @generated from protobuf field: string bot_name = 1; + */ + botName: string; + /** + * join_method is the join method of the token associated with the bot on + * creation. This will be the string value of `api/types.JoinMethod`. + * + * @generated from protobuf field: string join_method = 2; + */ + joinMethod: string; + /** + * join_token_name is the anonymised name of the token used to join + * the cluster. + * + * @generated from protobuf field: string join_token_name = 3; + */ + joinTokenName: string; +} +/** + * UICreateNewRoleClickEvent is an event that can be triggered during custom role creation + * + * @generated from protobuf message prehog.v1alpha.UICreateNewRoleClickEvent + */ +export interface UICreateNewRoleClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UICreateNewRoleSaveClickEvent is an event that can be triggered during custom role creation + * + * @generated from protobuf message prehog.v1alpha.UICreateNewRoleSaveClickEvent + */ +export interface UICreateNewRoleSaveClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UICreateNewRoleCancelClickEvent is an event that can be triggered during custom role creation + * + * @generated from protobuf message prehog.v1alpha.UICreateNewRoleCancelClickEvent + */ +export interface UICreateNewRoleCancelClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UICreateNewRoleViewDocumentationClickEvent is an event that can be triggered during custom role creation + * + * @generated from protobuf message prehog.v1alpha.UICreateNewRoleViewDocumentationClickEvent + */ +export interface UICreateNewRoleViewDocumentationClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; +} +/** + * UICallToActionClickEvent is a click in a Teleport Web UI's CTA + * + * @generated from protobuf message prehog.v1alpha.UICallToActionClickEvent + */ +export interface UICallToActionClickEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.CTA cta = 2; + */ + cta: CTA; +} +/** + * a request forwarded to a kube cluster's API server (other than exec and + * port-forward) + * + * PostHog event: tp.kube.request + * + * @generated from protobuf message prehog.v1alpha.KubeRequestEvent + */ +export interface KubeRequestEvent { + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * Indicates the kind of user (e.g. bot or human), if known. + * + * @generated from protobuf field: prehog.v1alpha.UserKind user_kind = 2; + */ + userKind: UserKind; +} +/** + * an sftp event, represents a single operation on a file + * + * PostHog event: tp.sftp + * + * @generated from protobuf message prehog.v1alpha.SFTPEvent + */ +export interface SFTPEvent { + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * matching SFTPAction in teleport/api/types/events/events.proto + * + * @generated from protobuf field: int32 action = 2; + */ + action: number; + /** + * Indicates the kind of user (bot or human), if known. + * + * @generated from protobuf field: prehog.v1alpha.UserKind user_kind = 3; + */ + userKind: UserKind; +} +/** + * @generated from protobuf message prehog.v1alpha.AgentMetadataEvent + */ +export interface AgentMetadataEvent { + /** + * @generated from protobuf field: string version = 1; + */ + version: string; + /** + * @generated from protobuf field: string host_id = 2; + */ + hostId: string; + /** + * @generated from protobuf field: repeated string services = 3; + */ + services: string[]; + /** + * @generated from protobuf field: string os = 4; + */ + os: string; + /** + * @generated from protobuf field: string os_version = 5; + */ + osVersion: string; + /** + * @generated from protobuf field: string host_architecture = 6; + */ + hostArchitecture: string; + /** + * @generated from protobuf field: string glibc_version = 7; + */ + glibcVersion: string; + /** + * @generated from protobuf field: repeated string install_methods = 8; + */ + installMethods: string[]; + /** + * @generated from protobuf field: string container_runtime = 9; + */ + containerRuntime: string; + /** + * @generated from protobuf field: string container_orchestrator = 10; + */ + containerOrchestrator: string; + /** + * @generated from protobuf field: string cloud_environment = 11; + */ + cloudEnvironment: string; + /** + * external_upgrader is the name of the registered external upgrader. if non-empty, this field indicates + * that the associated agent is enrolled in automatic upgrades. + * + * @generated from protobuf field: string external_upgrader = 12; + */ + externalUpgrader: string; +} +/** + * AssistCompletionEvent is an event that is emitted + * when a single completion occurs in the Teleport Assist, + * i.e. a user submits a prompt, and receives an answer from the Assist + * + * @generated from protobuf message prehog.v1alpha.AssistCompletionEvent + */ +export interface AssistCompletionEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * ConversationId is the UUID that identifies a single Assist conversation + * + * @generated from protobuf field: string conversation_id = 2; + */ + conversationId: string; + /** + * TotalTokens is the total amount of token used to satisfy this request + * + * @generated from protobuf field: int64 total_tokens = 3; + */ + totalTokens: number; + /** + * PromptTokens is the amount of estimated tokens used by the prompt + * + * @generated from protobuf field: int64 prompt_tokens = 4; + */ + promptTokens: number; + /** + * CompletionTokens is the amount of tokens that the completion response consists of + * + * @generated from protobuf field: int64 completion_tokens = 5; + */ + completionTokens: number; +} +/** + * AssistExecutionEvent is an event that is emitted when an Assist command + * execution is triggered by the user. + * + * @generated from protobuf message prehog.v1alpha.AssistExecutionEvent + */ +export interface AssistExecutionEvent { + /** + * UserName is anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * ConversationId is the UUID that identifies a single Assist conversation + * + * @generated from protobuf field: string conversation_id = 2; + */ + conversationId: string; + /** + * NodeCount is the number of nodes the command was executed on + * + * @generated from protobuf field: int64 node_count = 3; + */ + nodeCount: number; + /** + * TotalTokens is the total amount of token used to generate the command summary + * + * @generated from protobuf field: int64 total_tokens = 4; + */ + totalTokens: number; + /** + * PromptTokens is the amount of estimated tokens used by the prompt to generate the command summary + * + * @generated from protobuf field: int64 prompt_tokens = 5; + */ + promptTokens: number; + /** + * CompletionTokens is the amount of tokens that the summary completion response consists of + * + * @generated from protobuf field: int64 completion_tokens = 6; + */ + completionTokens: number; +} +/** + * AssistNewConversationEvent is an event that is emitted for each new Assist + * conversation and contains the conversation category. + * + * @generated from protobuf message prehog.v1alpha.AssistNewConversationEvent + */ +export interface AssistNewConversationEvent { + /** + * UserName is anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * Category is the conversation category. This represents what kind of request + * the user is asking Assist. + * + * @generated from protobuf field: string category = 2; + */ + category: string; +} +/** + * AssistAccessRequest is an event that is emitted when a user requests access + * to a resource via Assist. + * + * @generated from protobuf message prehog.v1alpha.AssistAccessRequestEvent + */ +export interface AssistAccessRequestEvent { + /** + * UserName is anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * ResourceType describes the type of resource the user is requesting access to, e.g. "node", "db", "k8s" or "role". + * + * @generated from protobuf field: string resource_type = 2; + */ + resourceType: string; + /** + * TotalTokens is the total amount of token used to generate the command summary + * + * @generated from protobuf field: int64 total_tokens = 4; + */ + totalTokens: number; + /** + * PromptTokens is the amount of estimated tokens used by the prompt to generate the command summary + * + * @generated from protobuf field: int64 prompt_tokens = 5; + */ + promptTokens: number; + /** + * CompletionTokens is the amount of tokens that the summary completion response consists of + * + * @generated from protobuf field: int64 completion_tokens = 6; + */ + completionTokens: number; +} +/** + * AssistAction is an event that is emitted when a user triggers an action (SSH command generation, output explain, etc.) + * via Assist. + * + * @generated from protobuf message prehog.v1alpha.AssistActionEvent + */ +export interface AssistActionEvent { + /** + * UserName is anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * Action is the action that was triggered, e.g. "ssh-explain", "ssh-command-generate", etc. + * + * @generated from protobuf field: string action = 2; + */ + action: string; + /** + * TotalTokens is the total amount of token used to generate the command summary + * + * @generated from protobuf field: int64 total_tokens = 4; + */ + totalTokens: number; + /** + * PromptTokens is the amount of estimated tokens used by the prompt to generate the command summary + * + * @generated from protobuf field: int64 prompt_tokens = 5; + */ + promptTokens: number; + /** + * CompletionTokens is the amount of tokens that the summary completion response consists of + * + * @generated from protobuf field: int64 completion_tokens = 6; + */ + completionTokens: number; +} +/** + * AccessListMetadata contains common metadata for Access List related events. + * + * @generated from protobuf message prehog.v1alpha.AccessListMetadata + */ +export interface AccessListMetadata { + /** + * id uniquely identifies an Access List. Will allow correlation of events within an access list. + * + * @generated from protobuf field: string id = 1; + */ + id: string; +} +/** + * AccessListCreate is an event that is emitted when an access list is created. + * + * @generated from protobuf message prehog.v1alpha.AccessListCreateEvent + */ +export interface AccessListCreateEvent { + /** + * user_name is the anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; +} +/** + * AccessListUpdate is an event that is emitted when an access list is updated. + * + * @generated from protobuf message prehog.v1alpha.AccessListUpdateEvent + */ +export interface AccessListUpdateEvent { + /** + * user_name is the anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; +} +/** + * AccessListDelete is an event that is emitted when an access list is deleted. + * + * @generated from protobuf message prehog.v1alpha.AccessListDeleteEvent + */ +export interface AccessListDeleteEvent { + /** + * user_name is the anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; +} +/** + * AccessListMemberCreate is an event that is emitted when a member is added to an access list. + * + * @generated from protobuf message prehog.v1alpha.AccessListMemberCreateEvent + */ +export interface AccessListMemberCreateEvent { + /** + * user_name is the anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; +} +/** + * AccessListMemberUpdate is an event that is emitted when a member is updated in an access list. + * + * @generated from protobuf message prehog.v1alpha.AccessListMemberUpdateEvent + */ +export interface AccessListMemberUpdateEvent { + /** + * user_name is the anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; +} +/** + * AccessListMemberDelete is an event that is emitted when a member is removed from an access list. + * + * @generated from protobuf message prehog.v1alpha.AccessListMemberDeleteEvent + */ +export interface AccessListMemberDeleteEvent { + /** + * user_name is anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; +} +/** + * AccessListGrantsToUser is an event that is emitted when access list permissions are granted to a user + * on login. + * + * @generated from protobuf message prehog.v1alpha.AccessListGrantsToUserEvent + */ +export interface AccessListGrantsToUserEvent { + /** + * user_name is the anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * count_roles_granted is the number of roles granted to a user. + * + * @generated from protobuf field: int32 count_roles_granted = 2; + */ + countRolesGranted: number; + /** + * count_traits_granted is the number of traits granted to a user. + * + * @generated from protobuf field: int32 count_traits_granted = 3; + */ + countTraitsGranted: number; +} +/** + * AccessListReviewCreateEvent is an event that is emitted when an access list review is created. + * + * @generated from protobuf message prehog.v1alpha.AccessListReviewCreateEvent + */ +export interface AccessListReviewCreateEvent { + /** + * user_name is anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; + /** + * days_past_next_audit_date is how many days past the next audit date the review came in. Can be negative. + * + * @generated from protobuf field: int32 days_past_next_audit_date = 3; + */ + daysPastNextAuditDate: number; + /** + * membership_requirements_changed indicates that the membership requirements were changed. + * + * @generated from protobuf field: bool membership_requirements_changed = 4; + */ + membershipRequirementsChanged: boolean; + /** + * review_frequency_changed indicates that the review frequency was changed. + * + * @generated from protobuf field: bool review_frequency_changed = 5; + */ + reviewFrequencyChanged: boolean; + /** + * review_day_of_month_changed indicates that the review day of month was changed. + * + * @generated from protobuf field: bool review_day_of_month_changed = 6; + */ + reviewDayOfMonthChanged: boolean; + /** + * number_of_removed_members is how many members were removed as part of this review. + * + * @generated from protobuf field: int32 number_of_removed_members = 7; + */ + numberOfRemovedMembers: number; +} +/** + * AccessListReviewDeleteEvent is an event that is emitted when an access list review is deleted. + * + * @generated from protobuf message prehog.v1alpha.AccessListReviewDeleteEvent + */ +export interface AccessListReviewDeleteEvent { + /** + * user_name is anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMetadata metadata = 2; + */ + metadata?: AccessListMetadata; + /** + * access_list_review_id is the unique identifier for the access list review. + * + * @generated from protobuf field: string access_list_review_id = 3; + */ + accessListReviewId: string; +} +/** + * AccessListReviewComplianceEvent is an event that is emitted periodically to indicate how many access + * lists are past due for a review. + * + * @generated from protobuf message prehog.v1alpha.AccessListReviewComplianceEvent + */ +export interface AccessListReviewComplianceEvent { + /** + * total_access_lists is the total number of access lists known to Teleport. + * + * @generated from protobuf field: int32 total_access_lists = 1; + */ + totalAccessLists: number; + /** + * access_lists_need_review is the number of access lists that need a review. + * + * @generated from protobuf field: int32 access_lists_need_review = 2; + */ + accessListsNeedReview: number; +} +/** + * IntegrationEnrollMetadata contains common metadata + * for Integration Enroll related events. + * + * @generated from protobuf message prehog.v1alpha.IntegrationEnrollMetadata + */ +export interface IntegrationEnrollMetadata { + /** + * id is used as a unique identifier to correlate events within the + * same enroll wizard run. + * + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * kind identifies what type of integration the user clicked on to enroll. + * + * @generated from protobuf field: prehog.v1alpha.IntegrationEnrollKind kind = 2; + */ + kind: IntegrationEnrollKind; + /** + * user_name is anonymized. + * + * @generated from protobuf field: string user_name = 3; + */ + userName: string; +} +/** + * UIIntegrationEnrollEvent is an event that is emitted when a user + * clicks on a integration to enroll. + * + * @generated from protobuf message prehog.v1alpha.UIIntegrationEnrollStartEvent + */ +export interface UIIntegrationEnrollStartEvent { + /** + * @generated from protobuf field: prehog.v1alpha.IntegrationEnrollMetadata metadata = 1; + */ + metadata?: IntegrationEnrollMetadata; +} +/** + * UIIntegrationEnrollEvent is an event that is emitted when a user + * completed enrolling an integration. + * + * @generated from protobuf message prehog.v1alpha.UIIntegrationEnrollCompleteEvent + */ +export interface UIIntegrationEnrollCompleteEvent { + /** + * @generated from protobuf field: prehog.v1alpha.IntegrationEnrollMetadata metadata = 1; + */ + metadata?: IntegrationEnrollMetadata; +} +/** + * EditorChangeEvent is an event that is emitted when a user role set changes resulting in + * a editor role being added on removed + * + * @generated from protobuf message prehog.v1alpha.EditorChangeEvent + */ +export interface EditorChangeEvent { + /** + * anonymized user name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * @generated from protobuf field: prehog.v1alpha.EditorChangeStatus status = 2; + */ + status: EditorChangeStatus; +} +/** + * Device authentication event + * + * @generated from protobuf message prehog.v1alpha.DeviceAuthenticateEvent + */ +export interface DeviceAuthenticateEvent { + /** + * anonymized device ID, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.device_id + * + * @generated from protobuf field: string device_id = 1; + */ + deviceId: string; + /** + * anonymized username, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * device OS type + * + * PostHog property: tp.device_os_type + * + * @generated from protobuf field: string device_os_type = 3; + */ + deviceOsType: string; +} +/** + * Device Enrollment event + * + * PostHost event: tp.device.enroll + * + * @generated from protobuf message prehog.v1alpha.DeviceEnrollEvent + */ +export interface DeviceEnrollEvent { + /** + * anonymized device ID, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.device_id + * + * @generated from protobuf field: string device_id = 1; + */ + deviceId: string; + /** + * anonymized username, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * device OS type + * + * PostHog property: tp.device_os_type + * + * @generated from protobuf field: string device_os_type = 3; + */ + deviceOsType: string; + /** + * device origin + * + * PostHog property: tp.device_origin + * + * @generated from protobuf field: string device_origin = 4; + */ + deviceOrigin: string; +} +/** + * FeatureRecommendationEvent captures event emitted when a feature is recommended to user or + * when user completes the desired CTA for the feature. + * + * PostHost event: tp.ui.feature.recommendation + * + * @generated from protobuf message prehog.v1alpha.FeatureRecommendationEvent + */ +export interface FeatureRecommendationEvent { + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64; + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * feature is name of the Teleport feature. + * + * PostHog property: tp.feature + * + * @generated from protobuf field: prehog.v1alpha.Feature feature = 2; + */ + feature: Feature; + /** + * feature_recommendation_status records recommendation state, which can be 'NOTIFIED' (feature is recommended) + * OR 'DONE' (user completes desired CTA) + * + * PostHost property: tp.feature_recommendation_status + * + * @generated from protobuf field: prehog.v1alpha.FeatureRecommendationStatus feature_recommendation_status = 3; + */ + featureRecommendationStatus: FeatureRecommendationStatus; +} +/** + * LicenseLimitEvent is emitted when access to Teleport feature + * is denied based on license limits + * + * PostHost event: tp.license.limit + * + * @generated from protobuf message prehog.v1alpha.LicenseLimitEvent + */ +export interface LicenseLimitEvent { + /** + * PostHost property: tp.license_limit + * + * @generated from protobuf field: prehog.v1alpha.LicenseLimit license_limit = 1; + */ + licenseLimit: LicenseLimit; +} +/** + * DesktopDirectoryShareEvent is emitted when directory sharing is used + * in a Teleport desktop session. + * + * @generated from protobuf message prehog.v1alpha.DesktopDirectoryShareEvent + */ +export interface DesktopDirectoryShareEvent { + /** + * anonymized desktop addr, used to uniquely idenfity the desktop + * + * PostHog property: tp.desktop + * + * @generated from protobuf field: string desktop = 1; + */ + desktop: string; + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64; + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; + /** + * anonymized directory name + * + * PostHog property: tp.directory_name + * + * @generated from protobuf field: string directory_name = 3; + */ + directoryName: string; +} +/** + * DesktopClipboardEvent is emitted when data is transferred between a user's + * local clipboard and a remote Windows clipboard. + * + * @generated from protobuf message prehog.v1alpha.DesktopClipboardEvent + */ +export interface DesktopClipboardEvent { + /** + * anonymized desktop addr, used to uniquely idenfity the desktop + * + * PostHog property: tp.desktop + * + * @generated from protobuf field: string desktop = 1; + */ + desktop: string; + /** + * anonymized Teleport username, 32 bytes (HMAC-SHA-256) encoded in base64; + * + * PostHog property: tp.user_name + * + * @generated from protobuf field: string user_name = 2; + */ + userName: string; +} +/** + * TAGExecuteQueryEvent is an event that is emitted + * when a single query is executed in the Teleport Access Graph. + * This event is emitted for both successful and failed queries. For + * successful queries, the total number of nodes and edges is reported. + * + * @generated from protobuf message prehog.v1alpha.TAGExecuteQueryEvent + */ +export interface TAGExecuteQueryEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * total_nodes is the total amount of nodes returned by the query. + * + * @generated from protobuf field: int64 total_nodes = 2; + */ + totalNodes: number; + /** + * total_edges is the total amount of edges returned by the query. + * + * @generated from protobuf field: int64 total_edges = 3; + */ + totalEdges: number; + /** + * is_success is true if the query was successful and false it if failed. + * + * @generated from protobuf field: bool is_success = 4; + */ + isSuccess: boolean; +} +/** + * ExternalAuditStorageAuthenticateEvent is emitted when the External Audit + * Storage feature authenticates to the customer AWS account via OIDC connector. + * The purpose is to have a regularly emitted event indicating that the External + * Audit Storage feature is still in use. + * + * @generated from protobuf message prehog.v1alpha.ExternalAuditStorageAuthenticateEvent + */ +export interface ExternalAuditStorageAuthenticateEvent { +} +/** + * SecurityReportGetResultEvent is emitted when the user requests a security report. + * + * @generated from protobuf message prehog.v1alpha.SecurityReportGetResultEvent + */ +export interface SecurityReportGetResultEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * name is the name of the security report. + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * days is the time range of the security reports in days. + * + * @generated from protobuf field: int32 days = 3; + */ + days: number; +} +/** + * AuditQueryRunEvent is emitted when the user runs an audit query. + * + * @generated from protobuf message prehog.v1alpha.AuditQueryRunEvent + */ +export interface AuditQueryRunEvent { + /** + * anonymized + * + * @generated from protobuf field: string user_name = 1; + */ + userName: string; + /** + * days is the time range of the query in days. + * + * @generated from protobuf field: int32 days = 2; + */ + days: number; + /** + * is_success is true if the query was successful false if execution failed. + * + * @generated from protobuf field: bool is_success = 3; + */ + isSuccess: boolean; +} +/** + * DiscoveryFetchEvent is emitted when a DiscoveryService polls for new resources of a given type + * + * @generated from protobuf message prehog.v1alpha.DiscoveryFetchEvent + */ +export interface DiscoveryFetchEvent { + /** + * cloud_provider is the cloud provider used to fetch resources + * Eg, AWS, Azure, GCP, Kubernetes + * + * PostHog property: tp.cloud + * + * @generated from protobuf field: string cloud_provider = 1; + */ + cloudProvider: string; + /** + * resource_type is the type of resource that this fetch is polling. + * It depends on the Cloud Provider (defined above). + * Eg, rds, ec2, vm, aks, gce, app + * + * PostHog property: tp.resource_type + * + * @generated from protobuf field: string resource_type = 2; + */ + resourceType: string; +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitEventRequest + */ +export interface SubmitEventRequest { + /** + * anonymized, 32 bytes (HMAC-SHA-256) encoded in base64 + * + * PostHog property: tp.cluster_name (still in base64) + * + * @generated from protobuf field: string cluster_name = 1; + */ + clusterName: string; + /** + * optional, will default to the ingest time if unset + * + * PostHog timestamp + * + * @generated from protobuf field: google.protobuf.Timestamp timestamp = 2; + */ + timestamp?: Timestamp; + /** + * @generated from protobuf oneof: event + */ + event: { + oneofKind: "userLogin"; + /** + * @generated from protobuf field: prehog.v1alpha.UserLoginEvent user_login = 3; + */ + userLogin: UserLoginEvent; + } | { + oneofKind: "ssoCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.SSOCreateEvent sso_create = 4; + */ + ssoCreate: SSOCreateEvent; + } | { + oneofKind: "resourceCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.ResourceCreateEvent resource_create = 5; + */ + resourceCreate: ResourceCreateEvent; + } | { + oneofKind: "sessionStart"; + /** + * REMOVE IN V14: Use session_start_v2 instead + * + * @generated from protobuf field: prehog.v1alpha.SessionStartEvent session_start = 6; + */ + sessionStart: SessionStartEvent; + } | { + oneofKind: "uiBannerClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UIBannerClickEvent ui_banner_click = 7; + */ + uiBannerClick: UIBannerClickEvent; + } | { + oneofKind: "uiOnboardCompleteGoToDashboardClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent ui_onboard_complete_go_to_dashboard_click = 9; + */ + uiOnboardCompleteGoToDashboardClick: UIOnboardCompleteGoToDashboardClickEvent; + } | { + oneofKind: "uiOnboardAddFirstResourceClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UIOnboardAddFirstResourceClickEvent ui_onboard_add_first_resource_click = 10; + */ + uiOnboardAddFirstResourceClick: UIOnboardAddFirstResourceClickEvent; + } | { + oneofKind: "uiOnboardAddFirstResourceLaterClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent ui_onboard_add_first_resource_later_click = 11; + */ + uiOnboardAddFirstResourceLaterClick: UIOnboardAddFirstResourceLaterClickEvent; + } | { + oneofKind: "uiOnboardSetCredentialSubmit"; + /** + * @generated from protobuf field: prehog.v1alpha.UIOnboardSetCredentialSubmitEvent ui_onboard_set_credential_submit = 12; + */ + uiOnboardSetCredentialSubmit: UIOnboardSetCredentialSubmitEvent; + } | { + oneofKind: "uiOnboardRegisterChallengeSubmit"; + /** + * @generated from protobuf field: prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent ui_onboard_register_challenge_submit = 13; + */ + uiOnboardRegisterChallengeSubmit: UIOnboardRegisterChallengeSubmitEvent; + } | { + oneofKind: "uiRecoveryCodesContinueClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UIRecoveryCodesContinueClickEvent ui_recovery_codes_continue_click = 14; + */ + uiRecoveryCodesContinueClick: UIRecoveryCodesContinueClickEvent; + } | { + oneofKind: "uiRecoveryCodesCopyClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UIRecoveryCodesCopyClickEvent ui_recovery_codes_copy_click = 15; + */ + uiRecoveryCodesCopyClick: UIRecoveryCodesCopyClickEvent; + } | { + oneofKind: "uiRecoveryCodesPrintClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UIRecoveryCodesPrintClickEvent ui_recovery_codes_print_click = 16; + */ + uiRecoveryCodesPrintClick: UIRecoveryCodesPrintClickEvent; + } | { + oneofKind: "uiDiscoverStartedEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverStartedEvent ui_discover_started_event = 17; + */ + uiDiscoverStartedEvent: UIDiscoverStartedEvent; + } | { + oneofKind: "uiDiscoverResourceSelectionEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverResourceSelectionEvent ui_discover_resource_selection_event = 18; + */ + uiDiscoverResourceSelectionEvent: UIDiscoverResourceSelectionEvent; + } | { + oneofKind: "userCertificateIssuedEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UserCertificateIssuedEvent user_certificate_issued_event = 19; + */ + userCertificateIssuedEvent: UserCertificateIssuedEvent; + } | { + oneofKind: "sessionStartV2"; + /** + * Note: semantics of SessionStartEvent type values have changed to + * differentiate SSH from Kubernetes exec sessions (as well as adding + * db/app/desktop events). The structures are the same, however, so we don't + * need a new message type. + * + * @generated from protobuf field: prehog.v1alpha.SessionStartEvent session_start_v2 = 20; + */ + sessionStartV2: SessionStartEvent; + } | { + oneofKind: "uiDiscoverDeployServiceEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDeployServiceEvent ui_discover_deploy_service_event = 21; + */ + uiDiscoverDeployServiceEvent: UIDiscoverDeployServiceEvent; + } | { + oneofKind: "uiDiscoverDatabaseRegisterEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDatabaseRegisterEvent ui_discover_database_register_event = 22; + */ + uiDiscoverDatabaseRegisterEvent: UIDiscoverDatabaseRegisterEvent; + } | { + oneofKind: "uiDiscoverDatabaseConfigureMtlsEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDatabaseConfigureMTLSEvent ui_discover_database_configure_mtls_event = 23; + */ + uiDiscoverDatabaseConfigureMtlsEvent: UIDiscoverDatabaseConfigureMTLSEvent; + } | { + oneofKind: "uiDiscoverDesktopActiveDirectoryToolsInstallEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDesktopActiveDirectoryToolsInstallEvent ui_discover_desktop_active_directory_tools_install_event = 24; + */ + uiDiscoverDesktopActiveDirectoryToolsInstallEvent: UIDiscoverDesktopActiveDirectoryToolsInstallEvent; + } | { + oneofKind: "uiDiscoverDesktopActiveDirectoryConfigureEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDesktopActiveDirectoryConfigureEvent ui_discover_desktop_active_directory_configure_event = 25; + */ + uiDiscoverDesktopActiveDirectoryConfigureEvent: UIDiscoverDesktopActiveDirectoryConfigureEvent; + } | { + oneofKind: "uiDiscoverAutoDiscoveredResourcesEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverAutoDiscoveredResourcesEvent ui_discover_auto_discovered_resources_event = 26; + */ + uiDiscoverAutoDiscoveredResourcesEvent: UIDiscoverAutoDiscoveredResourcesEvent; + } | { + oneofKind: "uiDiscoverDatabaseConfigureIamPolicyEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDatabaseConfigureIAMPolicyEvent ui_discover_database_configure_iam_policy_event = 27; + */ + uiDiscoverDatabaseConfigureIamPolicyEvent: UIDiscoverDatabaseConfigureIAMPolicyEvent; + } | { + oneofKind: "uiDiscoverPrincipalsConfigureEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverPrincipalsConfigureEvent ui_discover_principals_configure_event = 28; + */ + uiDiscoverPrincipalsConfigureEvent: UIDiscoverPrincipalsConfigureEvent; + } | { + oneofKind: "uiDiscoverTestConnectionEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverTestConnectionEvent ui_discover_test_connection_event = 29; + */ + uiDiscoverTestConnectionEvent: UIDiscoverTestConnectionEvent; + } | { + oneofKind: "uiDiscoverCompletedEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverCompletedEvent ui_discover_completed_event = 30; + */ + uiDiscoverCompletedEvent: UIDiscoverCompletedEvent; + } | { + oneofKind: "roleCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.RoleCreateEvent role_create = 31; + */ + roleCreate: RoleCreateEvent; + } | { + oneofKind: "uiCreateNewRoleClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UICreateNewRoleClickEvent ui_create_new_role_click = 32; + */ + uiCreateNewRoleClick: UICreateNewRoleClickEvent; + } | { + oneofKind: "uiCreateNewRoleSaveClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UICreateNewRoleSaveClickEvent ui_create_new_role_save_click = 33; + */ + uiCreateNewRoleSaveClick: UICreateNewRoleSaveClickEvent; + } | { + oneofKind: "uiCreateNewRoleCancelClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UICreateNewRoleCancelClickEvent ui_create_new_role_cancel_click = 34; + */ + uiCreateNewRoleCancelClick: UICreateNewRoleCancelClickEvent; + } | { + oneofKind: "uiCreateNewRoleViewDocumentationClick"; + /** + * @generated from protobuf field: prehog.v1alpha.UICreateNewRoleViewDocumentationClickEvent ui_create_new_role_view_documentation_click = 35; + */ + uiCreateNewRoleViewDocumentationClick: UICreateNewRoleViewDocumentationClickEvent; + } | { + oneofKind: "kubeRequest"; + /** + * @generated from protobuf field: prehog.v1alpha.KubeRequestEvent kube_request = 36; + */ + kubeRequest: KubeRequestEvent; + } | { + oneofKind: "sftp"; + /** + * @generated from protobuf field: prehog.v1alpha.SFTPEvent sftp = 37; + */ + sftp: SFTPEvent; + } | { + oneofKind: "agentMetadataEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.AgentMetadataEvent agent_metadata_event = 38; + */ + agentMetadataEvent: AgentMetadataEvent; + } | { + oneofKind: "resourceHeartbeat"; + /** + * @generated from protobuf field: prehog.v1alpha.ResourceHeartbeatEvent resource_heartbeat = 39; + */ + resourceHeartbeat: ResourceHeartbeatEvent; + } | { + oneofKind: "uiDiscoverIntegrationAwsOidcConnectEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverIntegrationAWSOIDCConnectEvent ui_discover_integration_aws_oidc_connect_event = 40; + */ + uiDiscoverIntegrationAwsOidcConnectEvent: UIDiscoverIntegrationAWSOIDCConnectEvent; + } | { + oneofKind: "uiDiscoverDatabaseRdsEnrollEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDatabaseRDSEnrollEvent ui_discover_database_rds_enroll_event = 41; + */ + uiDiscoverDatabaseRdsEnrollEvent: UIDiscoverDatabaseRDSEnrollEvent; + } | { + oneofKind: "uiCallToActionClickEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UICallToActionClickEvent ui_call_to_action_click_event = 42; + */ + uiCallToActionClickEvent: UICallToActionClickEvent; + } | { + oneofKind: "assistCompletion"; + /** + * @generated from protobuf field: prehog.v1alpha.AssistCompletionEvent assist_completion = 43; + */ + assistCompletion: AssistCompletionEvent; + } | { + oneofKind: "uiIntegrationEnrollStartEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIIntegrationEnrollStartEvent ui_integration_enroll_start_event = 44; + */ + uiIntegrationEnrollStartEvent: UIIntegrationEnrollStartEvent; + } | { + oneofKind: "uiIntegrationEnrollCompleteEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.UIIntegrationEnrollCompleteEvent ui_integration_enroll_complete_event = 45; + */ + uiIntegrationEnrollCompleteEvent: UIIntegrationEnrollCompleteEvent; + } | { + oneofKind: "editorChangeEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.EditorChangeEvent editor_change_event = 46; + */ + editorChangeEvent: EditorChangeEvent; + } | { + oneofKind: "botCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.BotCreateEvent bot_create = 47; + */ + botCreate: BotCreateEvent; + } | { + oneofKind: "uiOnboardQuestionnaireSubmit"; + /** + * @generated from protobuf field: prehog.v1alpha.UIOnboardQuestionnaireSubmitEvent ui_onboard_questionnaire_submit = 48; + */ + uiOnboardQuestionnaireSubmit: UIOnboardQuestionnaireSubmitEvent; + } | { + oneofKind: "botJoin"; + /** + * @generated from protobuf field: prehog.v1alpha.BotJoinEvent bot_join = 49; + */ + botJoin: BotJoinEvent; + } | { + oneofKind: "assistExecution"; + /** + * @generated from protobuf field: prehog.v1alpha.AssistExecutionEvent assist_execution = 50; + */ + assistExecution: AssistExecutionEvent; + } | { + oneofKind: "assistNewConversation"; + /** + * @generated from protobuf field: prehog.v1alpha.AssistNewConversationEvent assist_new_conversation = 51; + */ + assistNewConversation: AssistNewConversationEvent; + } | { + oneofKind: "deviceAuthenticateEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.DeviceAuthenticateEvent device_authenticate_event = 52; + */ + deviceAuthenticateEvent: DeviceAuthenticateEvent; + } | { + oneofKind: "featureRecommendationEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.FeatureRecommendationEvent feature_recommendation_event = 53; + */ + featureRecommendationEvent: FeatureRecommendationEvent; + } | { + oneofKind: "assistAccessRequest"; + /** + * @generated from protobuf field: prehog.v1alpha.AssistAccessRequestEvent assist_access_request = 54; + */ + assistAccessRequest: AssistAccessRequestEvent; + } | { + oneofKind: "assistAction"; + /** + * @generated from protobuf field: prehog.v1alpha.AssistActionEvent assist_action = 55; + */ + assistAction: AssistActionEvent; + } | { + oneofKind: "deviceEnrollEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.DeviceEnrollEvent device_enroll_event = 56; + */ + deviceEnrollEvent: DeviceEnrollEvent; + } | { + oneofKind: "licenseLimitEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.LicenseLimitEvent license_limit_event = 57; + */ + licenseLimitEvent: LicenseLimitEvent; + } | { + oneofKind: "accessListCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListCreateEvent access_list_create = 58; + */ + accessListCreate: AccessListCreateEvent; + } | { + oneofKind: "accessListUpdate"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListUpdateEvent access_list_update = 59; + */ + accessListUpdate: AccessListUpdateEvent; + } | { + oneofKind: "accessListDelete"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListDeleteEvent access_list_delete = 60; + */ + accessListDelete: AccessListDeleteEvent; + } | { + oneofKind: "accessListMemberCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMemberCreateEvent access_list_member_create = 61; + */ + accessListMemberCreate: AccessListMemberCreateEvent; + } | { + oneofKind: "accessListMemberUpdate"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMemberUpdateEvent access_list_member_update = 62; + */ + accessListMemberUpdate: AccessListMemberUpdateEvent; + } | { + oneofKind: "accessListMemberDelete"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListMemberDeleteEvent access_list_member_delete = 63; + */ + accessListMemberDelete: AccessListMemberDeleteEvent; + } | { + oneofKind: "accessListGrantsToUser"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListGrantsToUserEvent access_list_grants_to_user = 64; + */ + accessListGrantsToUser: AccessListGrantsToUserEvent; + } | { + oneofKind: "uiDiscoverEc2InstanceSelection"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverEC2InstanceSelectionEvent ui_discover_ec2_instance_selection = 65; + */ + uiDiscoverEc2InstanceSelection: UIDiscoverEC2InstanceSelectionEvent; + } | { + oneofKind: "uiDiscoverDeployEice"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverDeployEICEEvent ui_discover_deploy_eice = 66; + */ + uiDiscoverDeployEice: UIDiscoverDeployEICEEvent; + } | { + oneofKind: "uiDiscoverCreateNode"; + /** + * @generated from protobuf field: prehog.v1alpha.UIDiscoverCreateNodeEvent ui_discover_create_node = 67; + */ + uiDiscoverCreateNode: UIDiscoverCreateNodeEvent; + } | { + oneofKind: "desktopDirectoryShare"; + /** + * @generated from protobuf field: prehog.v1alpha.DesktopDirectoryShareEvent desktop_directory_share = 68; + */ + desktopDirectoryShare: DesktopDirectoryShareEvent; + } | { + oneofKind: "desktopClipboardTransfer"; + /** + * @generated from protobuf field: prehog.v1alpha.DesktopClipboardEvent desktop_clipboard_transfer = 69; + */ + desktopClipboardTransfer: DesktopClipboardEvent; + } | { + oneofKind: "tagExecuteQuery"; + /** + * @generated from protobuf field: prehog.v1alpha.TAGExecuteQueryEvent tag_execute_query = 70; + */ + tagExecuteQuery: TAGExecuteQueryEvent; + } | { + oneofKind: "externalAuditStorageAuthenticate"; + /** + * @generated from protobuf field: prehog.v1alpha.ExternalAuditStorageAuthenticateEvent external_audit_storage_authenticate = 71; + */ + externalAuditStorageAuthenticate: ExternalAuditStorageAuthenticateEvent; + } | { + oneofKind: "securityReportGetResult"; + /** + * @generated from protobuf field: prehog.v1alpha.SecurityReportGetResultEvent security_report_get_result = 72; + */ + securityReportGetResult: SecurityReportGetResultEvent; + } | { + oneofKind: "auditQueryRun"; + /** + * @generated from protobuf field: prehog.v1alpha.AuditQueryRunEvent audit_query_run = 73; + */ + auditQueryRun: AuditQueryRunEvent; + } | { + oneofKind: "discoveryFetchEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.DiscoveryFetchEvent discovery_fetch_event = 74; + */ + discoveryFetchEvent: DiscoveryFetchEvent; + } | { + oneofKind: "accessListReviewCreate"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListReviewCreateEvent access_list_review_create = 75; + */ + accessListReviewCreate: AccessListReviewCreateEvent; + } | { + oneofKind: "accessListReviewDelete"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListReviewDeleteEvent access_list_review_delete = 76; + */ + accessListReviewDelete: AccessListReviewDeleteEvent; + } | { + oneofKind: "accessListReviewCompliance"; + /** + * @generated from protobuf field: prehog.v1alpha.AccessListReviewComplianceEvent access_list_review_compliance = 77; + */ + accessListReviewCompliance: AccessListReviewComplianceEvent; + } | { + oneofKind: "mfaAuthenticationEvent"; + /** + * @generated from protobuf field: prehog.v1alpha.MFAAuthenticationEvent mfa_authentication_event = 78; + */ + mfaAuthenticationEvent: MFAAuthenticationEvent; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitEventResponse + */ +export interface SubmitEventResponse { +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitEventsRequest + */ +export interface SubmitEventsRequest { + /** + * individual events to be submitted in a batch, up to 500 at once + * + * @generated from protobuf field: repeated prehog.v1alpha.SubmitEventRequest events = 1; + */ + events: SubmitEventRequest[]; +} +/** + * @generated from protobuf message prehog.v1alpha.SubmitEventsResponse + */ +export interface SubmitEventsResponse { +} +/** + * @generated from protobuf message prehog.v1alpha.HelloTeleportRequest + */ +export interface HelloTeleportRequest { +} +/** + * @generated from protobuf message prehog.v1alpha.HelloTeleportResponse + */ +export interface HelloTeleportResponse { +} +/** + * the kind of a "resource" as intended by ResourceHeartbeatEvent + * Keep in sync with prehog/v1/teleport.proto + * + * @generated from protobuf enum prehog.v1alpha.ResourceKind + */ +export enum ResourceKind { + /** + * @generated from protobuf enum value: RESOURCE_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * PostHog property value: "node" + * + * @generated from protobuf enum value: RESOURCE_KIND_NODE = 1; + */ + NODE = 1, + /** + * PostHog property value: "app_server" + * + * @generated from protobuf enum value: RESOURCE_KIND_APP_SERVER = 2; + */ + APP_SERVER = 2, + /** + * PostHog property value: "kube_server" + * + * @generated from protobuf enum value: RESOURCE_KIND_KUBE_SERVER = 3; + */ + KUBE_SERVER = 3, + /** + * PostHog property value: "db_server" + * + * @generated from protobuf enum value: RESOURCE_KIND_DB_SERVER = 4; + */ + DB_SERVER = 4, + /** + * PostHog property value: "windows_desktop" + * + * @generated from protobuf enum value: RESOURCE_KIND_WINDOWS_DESKTOP = 5; + */ + WINDOWS_DESKTOP = 5, + /** + * ServerV3 ("node") heartbeat with a subkind of "openssh" (as opposed to + * empty or "teleport"); not used in keepalives + * + * PostHog property value: "node.openssh" + * + * @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH = 6; + */ + NODE_OPENSSH = 6, + /** + * ServerV3 ("node") heartbeat with a subkind of "openssh-ec2-ice". + * Nodes that map EC2 instances and are accessed using EC2 Instance Connect Endpoint. + * Not used in keepalives. + * This is the SubKind SubKindOpenSSHEICENode in teleport repo. + * + * PostHog property value: "node.openssh_ec2_ice" + * + * @generated from protobuf enum value: RESOURCE_KIND_NODE_OPENSSH_EICE = 7; + */ + NODE_OPENSSH_EICE = 7 +} +/** + * The kind of user a given username refers to. Usernames should always refer to + * a valid cluster user (even if temporary, e.g. SSO), but may be Machine ID + * bot users. + * + * @generated from protobuf enum prehog.v1alpha.UserKind + */ +export enum UserKind { + /** + * Indicates a legacy cluster emitting events without a defined user kind. + * Note that users (from PostHog's perspective) can be identified via future + * events if the cluster is upgraded to specify this field. + * + * PostHog property value: "" + * + * @generated from protobuf enum value: USER_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * Indicates the user associated with this event is human, either created + * locally or via SSO. + * + * PostHog property value: "human" + * + * @generated from protobuf enum value: USER_KIND_HUMAN = 1; + */ + HUMAN = 1, + /** + * Indicates the user associated with this event is a Machine ID bot user. + * + * PostHog property value: "bot" + * + * @generated from protobuf enum value: USER_KIND_BOT = 2; + */ + BOT = 2 +} +/** + * DiscoverResource represents a resource type. + * + * @generated from protobuf enum prehog.v1alpha.DiscoverResource + */ +export enum DiscoverResource { + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_SERVER = 1; + */ + SERVER = 1, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_KUBERNETES = 2; + */ + KUBERNETES = 2, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_POSTGRES_SELF_HOSTED = 3; + */ + DATABASE_POSTGRES_SELF_HOSTED = 3, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_MYSQL_SELF_HOSTED = 4; + */ + DATABASE_MYSQL_SELF_HOSTED = 4, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_MONGODB_SELF_HOSTED = 5; + */ + DATABASE_MONGODB_SELF_HOSTED = 5, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_POSTGRES_RDS = 6; + */ + DATABASE_POSTGRES_RDS = 6, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_MYSQL_RDS = 7; + */ + DATABASE_MYSQL_RDS = 7, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_APPLICATION_HTTP = 8; + */ + APPLICATION_HTTP = 8, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_APPLICATION_TCP = 9; + */ + APPLICATION_TCP = 9, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_WINDOWS_DESKTOP = 10; + */ + WINDOWS_DESKTOP = 10, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_SQLSERVER_RDS = 11; + */ + DATABASE_SQLSERVER_RDS = 11, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_POSTGRES_REDSHIFT = 12; + */ + DATABASE_POSTGRES_REDSHIFT = 12, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_SQLSERVER_SELF_HOSTED = 13; + */ + DATABASE_SQLSERVER_SELF_HOSTED = 13, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_REDIS_SELF_HOSTED = 14; + */ + DATABASE_REDIS_SELF_HOSTED = 14, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_POSTGRES_GCP = 15; + */ + DATABASE_POSTGRES_GCP = 15, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_MYSQL_GCP = 16; + */ + DATABASE_MYSQL_GCP = 16, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_SQLSERVER_GCP = 17; + */ + DATABASE_SQLSERVER_GCP = 17, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_POSTGRES_REDSHIFT_SERVERLESS = 18; + */ + DATABASE_POSTGRES_REDSHIFT_SERVERLESS = 18, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_POSTGRES_AZURE = 19; + */ + DATABASE_POSTGRES_AZURE = 19, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_DYNAMODB = 20; + */ + DATABASE_DYNAMODB = 20, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_CASSANDRA_KEYSPACES = 21; + */ + DATABASE_CASSANDRA_KEYSPACES = 21, + /** + * Cassandra & ScyllaDb + * + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_CASSANDRA_SELF_HOSTED = 22; + */ + DATABASE_CASSANDRA_SELF_HOSTED = 22, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_ELASTICSEARCH_SELF_HOSTED = 23; + */ + DATABASE_ELASTICSEARCH_SELF_HOSTED = 23, + /** + * Elasticache & MemoryDb + * + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_REDIS_ELASTICACHE = 24; + */ + DATABASE_REDIS_ELASTICACHE = 24, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_REDIS_MEMORYDB = 25; + */ + DATABASE_REDIS_MEMORYDB = 25, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_REDIS_AZURE_CACHE = 26; + */ + DATABASE_REDIS_AZURE_CACHE = 26, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_REDIS_CLUSTER_SELF_HOSTED = 27; + */ + DATABASE_REDIS_CLUSTER_SELF_HOSTED = 27, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_MYSQL_AZURE = 28; + */ + DATABASE_MYSQL_AZURE = 28, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_SQLSERVER_AZURE = 29; + */ + DATABASE_SQLSERVER_AZURE = 29, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_SQLSERVER_MICROSOFT = 30; + */ + DATABASE_SQLSERVER_MICROSOFT = 30, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_COCKROACHDB_SELF_HOSTED = 31; + */ + DATABASE_COCKROACHDB_SELF_HOSTED = 31, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_MONGODB_ATLAS = 32; + */ + DATABASE_MONGODB_ATLAS = 32, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DATABASE_SNOWFLAKE = 33; + */ + DATABASE_SNOWFLAKE = 33, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DOC_DATABASE_RDS_PROXY = 34; + */ + DOC_DATABASE_RDS_PROXY = 34, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DOC_DATABASE_HIGH_AVAILABILITY = 35; + */ + DOC_DATABASE_HIGH_AVAILABILITY = 35, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DOC_DATABASE_DYNAMIC_REGISTRATION = 36; + */ + DOC_DATABASE_DYNAMIC_REGISTRATION = 36, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_SAML_APPLICATION = 37; + */ + SAML_APPLICATION = 37, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_EC2_INSTANCE = 38; + */ + EC2_INSTANCE = 38, + /** + * @generated from protobuf enum value: DISCOVER_RESOURCE_DOC_WINDOWS_DESKTOP_NON_AD = 39; + */ + DOC_WINDOWS_DESKTOP_NON_AD = 39 +} +/** + * DiscoverStatus represents a Discover Step outcome. + * + * @generated from protobuf enum prehog.v1alpha.DiscoverStatus + */ +export enum DiscoverStatus { + /** + * @generated from protobuf enum value: DISCOVER_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * The user tried to complete the action and it succeeded. + * + * @generated from protobuf enum value: DISCOVER_STATUS_SUCCESS = 1; + */ + SUCCESS = 1, + /** + * The system skipped the step. + * For example: + * When setting up a Database and there's already a Database Service proxying the DB. + * In this case the Database Agent installation is skipped. + * + * @generated from protobuf enum value: DISCOVER_STATUS_SKIPPED = 2; + */ + SKIPPED = 2, + /** + * The user tried to complete the action and it failed. + * + * @generated from protobuf enum value: DISCOVER_STATUS_ERROR = 3; + */ + ERROR = 3, + /** + * The user did not complete the action and left the wizard. + * + * @generated from protobuf enum value: DISCOVER_STATUS_ABORTED = 4; + */ + ABORTED = 4 +} +/** + * CTA represents teleport web UI's call to action buttons + * + * @generated from protobuf enum prehog.v1alpha.CTA + */ +export enum CTA { + /** + * @generated from protobuf enum value: CTA_UNSPECIFIED = 0; + */ + CTA_UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: CTA_AUTH_CONNECTOR = 1; + */ + CTA_AUTH_CONNECTOR = 1, + /** + * @generated from protobuf enum value: CTA_ACTIVE_SESSIONS = 2; + */ + CTA_ACTIVE_SESSIONS = 2, + /** + * @generated from protobuf enum value: CTA_ACCESS_REQUESTS = 3; + */ + CTA_ACCESS_REQUESTS = 3, + /** + * @generated from protobuf enum value: CTA_PREMIUM_SUPPORT = 4; + */ + CTA_PREMIUM_SUPPORT = 4, + /** + * @generated from protobuf enum value: CTA_TRUSTED_DEVICES = 5; + */ + CTA_TRUSTED_DEVICES = 5, + /** + * @generated from protobuf enum value: CTA_UPGRADE_BANNER = 6; + */ + CTA_UPGRADE_BANNER = 6, + /** + * @generated from protobuf enum value: CTA_BILLING_SUMMARY = 7; + */ + CTA_BILLING_SUMMARY = 7, + /** + * @generated from protobuf enum value: CTA_ACCESS_LIST = 8; + */ + CTA_ACCESS_LIST = 8, + /** + * @generated from protobuf enum value: CTA_ACCESS_MONITORING = 9; + */ + CTA_ACCESS_MONITORING = 9, + /** + * @generated from protobuf enum value: CTA_EXTERNAL_AUDIT_STORAGE = 10; + */ + CTA_EXTERNAL_AUDIT_STORAGE = 10, + /** + * @generated from protobuf enum value: CTA_OKTA_USER_SYNC = 11; + */ + CTA_OKTA_USER_SYNC = 11 +} +/** + * IntegrationEnrollKind represents the types of integration that + * can be enrolled. + * + * @generated from protobuf enum prehog.v1alpha.IntegrationEnrollKind + */ +export enum IntegrationEnrollKind { + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_SLACK = 1; + */ + SLACK = 1, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_AWS_OIDC = 2; + */ + AWS_OIDC = 2, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_PAGERDUTY = 3; + */ + PAGERDUTY = 3, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_EMAIL = 4; + */ + EMAIL = 4, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_JIRA = 5; + */ + JIRA = 5, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_DISCORD = 6; + */ + DISCORD = 6, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MATTERMOST = 7; + */ + MATTERMOST = 7, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MS_TEAMS = 8; + */ + MS_TEAMS = 8, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_OPSGENIE = 9; + */ + OPSGENIE = 9, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_OKTA = 10; + */ + OKTA = 10, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_JAMF = 11; + */ + JAMF = 11, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID = 12; + */ + MACHINE_ID = 12, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_GITHUB_ACTIONS = 13; + */ + MACHINE_ID_GITHUB_ACTIONS = 13, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_CIRCLECI = 14; + */ + MACHINE_ID_CIRCLECI = 14, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_GITLAB = 15; + */ + MACHINE_ID_GITLAB = 15, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_JENKINS = 16; + */ + MACHINE_ID_JENKINS = 16, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_ANSIBLE = 17; + */ + MACHINE_ID_ANSIBLE = 17, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_AWS = 18; + */ + MACHINE_ID_AWS = 18, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_GCP = 19; + */ + MACHINE_ID_GCP = 19, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_AZURE = 20; + */ + MACHINE_ID_AZURE = 20, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_SPACELIFT = 21; + */ + MACHINE_ID_SPACELIFT = 21, + /** + * @generated from protobuf enum value: INTEGRATION_ENROLL_KIND_MACHINE_ID_KUBERNETES = 22; + */ + MACHINE_ID_KUBERNETES = 22 +} +/** + * EditorChangeStatus is the possible value of an EditorChangeEvent event status + * + * @generated from protobuf enum prehog.v1alpha.EditorChangeStatus + */ +export enum EditorChangeStatus { + /** + * @generated from protobuf enum value: EDITOR_CHANGE_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * Status when the editor role is granted + * + * @generated from protobuf enum value: EDITOR_CHANGE_STATUS_ROLE_GRANTED = 1; + */ + ROLE_GRANTED = 1, + /** + * Status when the editor role is removed + * + * @generated from protobuf enum value: EDITOR_CHANGE_STATUS_ROLE_REMOVED = 2; + */ + ROLE_REMOVED = 2 +} +/** + * Feature is name of Teleport feature + * + * @generated from protobuf enum prehog.v1alpha.Feature + */ +export enum Feature { + /** + * @generated from protobuf enum value: FEATURE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: FEATURE_TRUSTED_DEVICES = 1; + */ + TRUSTED_DEVICES = 1 +} +/** + * FeatureRecommendationStatus is feature recommendation status. + * + * @generated from protobuf enum prehog.v1alpha.FeatureRecommendationStatus + */ +export enum FeatureRecommendationStatus { + /** + * @generated from protobuf enum value: FEATURE_RECOMMENDATION_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * FEATURE_RECOMMENDATION_STATUS_NOTIFIED is emitted when a feature is recommended (notified in UI) to user. + * + * @generated from protobuf enum value: FEATURE_RECOMMENDATION_STATUS_NOTIFIED = 1; + */ + NOTIFIED = 1, + /** + * FEATURE_RECOMMENDATION_STATUS_DONE is emitted when user completes the desired CTA. + * + * @generated from protobuf enum value: FEATURE_RECOMMENDATION_STATUS_DONE = 2; + */ + DONE = 2 +} +/** + * LicenseLimit indicates event type that triggered LicenseLimitEvent. + * + * @generated from protobuf enum prehog.v1alpha.LicenseLimit + */ +export enum LicenseLimit { + /** + * @generated from protobuf enum value: LICENSE_LIMIT_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * LICENSE_LIMIT_DEVICE_TRUST_TEAM_JAMF is emitted if license does not + * allow Jamf integration (e.g. Team Plan) + * + * @generated from protobuf enum value: LICENSE_LIMIT_DEVICE_TRUST_TEAM_JAMF = 1; + */ + DEVICE_TRUST_TEAM_JAMF = 1, + /** + * LICENSE_LIMIT_DEVICE_TRUST_TEAM_USAGE is emitted when allowed enrolled device + * limit is reached + * + * @generated from protobuf enum value: LICENSE_LIMIT_DEVICE_TRUST_TEAM_USAGE = 2; + */ + DEVICE_TRUST_TEAM_USAGE = 2 +} +// @generated message type with reflection information, may provide speed optimized methods +class UserLoginEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UserLoginEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "connector_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "required_private_key_policy", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UserLoginEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.connectorType = ""; + message.deviceId = ""; + message.requiredPrivateKeyPolicy = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserLoginEvent): UserLoginEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string connector_type */ 2: + message.connectorType = reader.string(); + break; + case /* string device_id */ 3: + message.deviceId = reader.string(); + break; + case /* string required_private_key_policy */ 4: + message.requiredPrivateKeyPolicy = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UserLoginEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string connector_type = 2; */ + if (message.connectorType !== "") + writer.tag(2, WireType.LengthDelimited).string(message.connectorType); + /* string device_id = 3; */ + if (message.deviceId !== "") + writer.tag(3, WireType.LengthDelimited).string(message.deviceId); + /* string required_private_key_policy = 4; */ + if (message.requiredPrivateKeyPolicy !== "") + writer.tag(4, WireType.LengthDelimited).string(message.requiredPrivateKeyPolicy); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UserLoginEvent + */ +export const UserLoginEvent = new UserLoginEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MFAAuthenticationEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.MFAAuthenticationEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "device_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "mfa_challenge_scope", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): MFAAuthenticationEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.deviceId = ""; + message.deviceType = ""; + message.mfaChallengeScope = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MFAAuthenticationEvent): MFAAuthenticationEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string device_id */ 2: + message.deviceId = reader.string(); + break; + case /* string device_type */ 3: + message.deviceType = reader.string(); + break; + case /* string mfa_challenge_scope */ 4: + message.mfaChallengeScope = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MFAAuthenticationEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string device_id = 2; */ + if (message.deviceId !== "") + writer.tag(2, WireType.LengthDelimited).string(message.deviceId); + /* string device_type = 3; */ + if (message.deviceType !== "") + writer.tag(3, WireType.LengthDelimited).string(message.deviceType); + /* string mfa_challenge_scope = 4; */ + if (message.mfaChallengeScope !== "") + writer.tag(4, WireType.LengthDelimited).string(message.mfaChallengeScope); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.MFAAuthenticationEvent + */ +export const MFAAuthenticationEvent = new MFAAuthenticationEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SSOCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SSOCreateEvent", [ + { no: 1, name: "connector_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): SSOCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.connectorType = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SSOCreateEvent): SSOCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string connector_type */ 1: + message.connectorType = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SSOCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string connector_type = 1; */ + if (message.connectorType !== "") + writer.tag(1, WireType.LengthDelimited).string(message.connectorType); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SSOCreateEvent + */ +export const SSOCreateEvent = new SSOCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResourceCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ResourceCreateEvent", [ + { no: 1, name: "resource_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "resource_origin", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "cloud_provider", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "database", kind: "message", T: () => DiscoveredDatabaseMetadata } + ]); + } + create(value?: PartialMessage): ResourceCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.resourceType = ""; + message.resourceOrigin = ""; + message.cloudProvider = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceCreateEvent): ResourceCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string resource_type */ 1: + message.resourceType = reader.string(); + break; + case /* string resource_origin */ 2: + message.resourceOrigin = reader.string(); + break; + case /* string cloud_provider */ 3: + message.cloudProvider = reader.string(); + break; + case /* prehog.v1alpha.DiscoveredDatabaseMetadata database */ 4: + message.database = DiscoveredDatabaseMetadata.internalBinaryRead(reader, reader.uint32(), options, message.database); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourceCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string resource_type = 1; */ + if (message.resourceType !== "") + writer.tag(1, WireType.LengthDelimited).string(message.resourceType); + /* string resource_origin = 2; */ + if (message.resourceOrigin !== "") + writer.tag(2, WireType.LengthDelimited).string(message.resourceOrigin); + /* string cloud_provider = 3; */ + if (message.cloudProvider !== "") + writer.tag(3, WireType.LengthDelimited).string(message.cloudProvider); + /* prehog.v1alpha.DiscoveredDatabaseMetadata database = 4; */ + if (message.database) + DiscoveredDatabaseMetadata.internalBinaryWrite(message.database, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ResourceCreateEvent + */ +export const ResourceCreateEvent = new ResourceCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DiscoveredDatabaseMetadata$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DiscoveredDatabaseMetadata", [ + { no: 1, name: "db_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "db_protocol", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DiscoveredDatabaseMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.dbType = ""; + message.dbProtocol = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DiscoveredDatabaseMetadata): DiscoveredDatabaseMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string db_type */ 1: + message.dbType = reader.string(); + break; + case /* string db_protocol */ 2: + message.dbProtocol = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DiscoveredDatabaseMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string db_type = 1; */ + if (message.dbType !== "") + writer.tag(1, WireType.LengthDelimited).string(message.dbType); + /* string db_protocol = 2; */ + if (message.dbProtocol !== "") + writer.tag(2, WireType.LengthDelimited).string(message.dbProtocol); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DiscoveredDatabaseMetadata + */ +export const DiscoveredDatabaseMetadata = new DiscoveredDatabaseMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResourceHeartbeatEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ResourceHeartbeatEvent", [ + { no: 1, name: "resource_name", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "resource_kind", kind: "enum", T: () => ["prehog.v1alpha.ResourceKind", ResourceKind, "RESOURCE_KIND_"] }, + { no: 3, name: "static", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): ResourceHeartbeatEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.resourceName = new Uint8Array(0); + message.resourceKind = 0; + message.static = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceHeartbeatEvent): ResourceHeartbeatEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes resource_name */ 1: + message.resourceName = reader.bytes(); + break; + case /* prehog.v1alpha.ResourceKind resource_kind */ 2: + message.resourceKind = reader.int32(); + break; + case /* bool static */ 3: + message.static = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourceHeartbeatEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes resource_name = 1; */ + if (message.resourceName.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.resourceName); + /* prehog.v1alpha.ResourceKind resource_kind = 2; */ + if (message.resourceKind !== 0) + writer.tag(2, WireType.Varint).int32(message.resourceKind); + /* bool static = 3; */ + if (message.static !== false) + writer.tag(3, WireType.Varint).bool(message.static); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ResourceHeartbeatEvent + */ +export const ResourceHeartbeatEvent = new ResourceHeartbeatEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SessionStartEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SessionStartEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "session_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "database", kind: "message", T: () => SessionStartDatabaseMetadata }, + { no: 4, name: "desktop", kind: "message", T: () => SessionStartDesktopMetadata }, + { no: 5, name: "user_kind", kind: "enum", T: () => ["prehog.v1alpha.UserKind", UserKind, "USER_KIND_"] } + ]); + } + create(value?: PartialMessage): SessionStartEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.sessionType = ""; + message.userKind = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SessionStartEvent): SessionStartEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string session_type */ 2: + message.sessionType = reader.string(); + break; + case /* prehog.v1alpha.SessionStartDatabaseMetadata database */ 3: + message.database = SessionStartDatabaseMetadata.internalBinaryRead(reader, reader.uint32(), options, message.database); + break; + case /* prehog.v1alpha.SessionStartDesktopMetadata desktop */ 4: + message.desktop = SessionStartDesktopMetadata.internalBinaryRead(reader, reader.uint32(), options, message.desktop); + break; + case /* prehog.v1alpha.UserKind user_kind */ 5: + message.userKind = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SessionStartEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string session_type = 2; */ + if (message.sessionType !== "") + writer.tag(2, WireType.LengthDelimited).string(message.sessionType); + /* prehog.v1alpha.SessionStartDatabaseMetadata database = 3; */ + if (message.database) + SessionStartDatabaseMetadata.internalBinaryWrite(message.database, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.SessionStartDesktopMetadata desktop = 4; */ + if (message.desktop) + SessionStartDesktopMetadata.internalBinaryWrite(message.desktop, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UserKind user_kind = 5; */ + if (message.userKind !== 0) + writer.tag(5, WireType.Varint).int32(message.userKind); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SessionStartEvent + */ +export const SessionStartEvent = new SessionStartEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SessionStartDatabaseMetadata$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SessionStartDatabaseMetadata", [ + { no: 1, name: "db_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "db_protocol", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "db_origin", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): SessionStartDatabaseMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.dbType = ""; + message.dbProtocol = ""; + message.dbOrigin = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SessionStartDatabaseMetadata): SessionStartDatabaseMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string db_type */ 1: + message.dbType = reader.string(); + break; + case /* string db_protocol */ 2: + message.dbProtocol = reader.string(); + break; + case /* string db_origin */ 3: + message.dbOrigin = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SessionStartDatabaseMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string db_type = 1; */ + if (message.dbType !== "") + writer.tag(1, WireType.LengthDelimited).string(message.dbType); + /* string db_protocol = 2; */ + if (message.dbProtocol !== "") + writer.tag(2, WireType.LengthDelimited).string(message.dbProtocol); + /* string db_origin = 3; */ + if (message.dbOrigin !== "") + writer.tag(3, WireType.LengthDelimited).string(message.dbOrigin); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SessionStartDatabaseMetadata + */ +export const SessionStartDatabaseMetadata = new SessionStartDatabaseMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SessionStartDesktopMetadata$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SessionStartDesktopMetadata", [ + { no: 1, name: "desktop_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "origin", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "windows_domain", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "allow_user_creation", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): SessionStartDesktopMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.desktopType = ""; + message.origin = ""; + message.windowsDomain = ""; + message.allowUserCreation = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SessionStartDesktopMetadata): SessionStartDesktopMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string desktop_type */ 1: + message.desktopType = reader.string(); + break; + case /* string origin */ 2: + message.origin = reader.string(); + break; + case /* string windows_domain */ 3: + message.windowsDomain = reader.string(); + break; + case /* bool allow_user_creation */ 4: + message.allowUserCreation = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SessionStartDesktopMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string desktop_type = 1; */ + if (message.desktopType !== "") + writer.tag(1, WireType.LengthDelimited).string(message.desktopType); + /* string origin = 2; */ + if (message.origin !== "") + writer.tag(2, WireType.LengthDelimited).string(message.origin); + /* string windows_domain = 3; */ + if (message.windowsDomain !== "") + writer.tag(3, WireType.LengthDelimited).string(message.windowsDomain); + /* bool allow_user_creation = 4; */ + if (message.allowUserCreation !== false) + writer.tag(4, WireType.Varint).bool(message.allowUserCreation); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SessionStartDesktopMetadata + */ +export const SessionStartDesktopMetadata = new SessionStartDesktopMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UserCertificateIssuedEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UserCertificateIssuedEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "ttl", kind: "message", T: () => Duration }, + { no: 3, name: "is_bot", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "usage_database", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "usage_app", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "usage_kubernetes", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "usage_desktop", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 8, name: "private_key_policy", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UserCertificateIssuedEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.isBot = false; + message.usageDatabase = false; + message.usageApp = false; + message.usageKubernetes = false; + message.usageDesktop = false; + message.privateKeyPolicy = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserCertificateIssuedEvent): UserCertificateIssuedEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* google.protobuf.Duration ttl */ 2: + message.ttl = Duration.internalBinaryRead(reader, reader.uint32(), options, message.ttl); + break; + case /* bool is_bot */ 3: + message.isBot = reader.bool(); + break; + case /* bool usage_database */ 4: + message.usageDatabase = reader.bool(); + break; + case /* bool usage_app */ 5: + message.usageApp = reader.bool(); + break; + case /* bool usage_kubernetes */ 6: + message.usageKubernetes = reader.bool(); + break; + case /* bool usage_desktop */ 7: + message.usageDesktop = reader.bool(); + break; + case /* string private_key_policy */ 8: + message.privateKeyPolicy = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UserCertificateIssuedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* google.protobuf.Duration ttl = 2; */ + if (message.ttl) + Duration.internalBinaryWrite(message.ttl, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* bool is_bot = 3; */ + if (message.isBot !== false) + writer.tag(3, WireType.Varint).bool(message.isBot); + /* bool usage_database = 4; */ + if (message.usageDatabase !== false) + writer.tag(4, WireType.Varint).bool(message.usageDatabase); + /* bool usage_app = 5; */ + if (message.usageApp !== false) + writer.tag(5, WireType.Varint).bool(message.usageApp); + /* bool usage_kubernetes = 6; */ + if (message.usageKubernetes !== false) + writer.tag(6, WireType.Varint).bool(message.usageKubernetes); + /* bool usage_desktop = 7; */ + if (message.usageDesktop !== false) + writer.tag(7, WireType.Varint).bool(message.usageDesktop); + /* string private_key_policy = 8; */ + if (message.privateKeyPolicy !== "") + writer.tag(8, WireType.LengthDelimited).string(message.privateKeyPolicy); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UserCertificateIssuedEvent + */ +export const UserCertificateIssuedEvent = new UserCertificateIssuedEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIBannerClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIBannerClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "alert", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIBannerClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.alert = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIBannerClickEvent): UIBannerClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string alert */ 2: + message.alert = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIBannerClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string alert = 2; */ + if (message.alert !== "") + writer.tag(2, WireType.LengthDelimited).string(message.alert); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIBannerClickEvent + */ +export const UIBannerClickEvent = new UIBannerClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIOnboardCompleteGoToDashboardClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIOnboardCompleteGoToDashboardClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIOnboardCompleteGoToDashboardClickEvent): UIOnboardCompleteGoToDashboardClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIOnboardCompleteGoToDashboardClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent + */ +export const UIOnboardCompleteGoToDashboardClickEvent = new UIOnboardCompleteGoToDashboardClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIOnboardAddFirstResourceClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIOnboardAddFirstResourceClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIOnboardAddFirstResourceClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIOnboardAddFirstResourceClickEvent): UIOnboardAddFirstResourceClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIOnboardAddFirstResourceClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIOnboardAddFirstResourceClickEvent + */ +export const UIOnboardAddFirstResourceClickEvent = new UIOnboardAddFirstResourceClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIOnboardAddFirstResourceLaterClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIOnboardAddFirstResourceLaterClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIOnboardAddFirstResourceLaterClickEvent): UIOnboardAddFirstResourceLaterClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIOnboardAddFirstResourceLaterClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent + */ +export const UIOnboardAddFirstResourceLaterClickEvent = new UIOnboardAddFirstResourceLaterClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIOnboardSetCredentialSubmitEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIOnboardSetCredentialSubmitEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIOnboardSetCredentialSubmitEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIOnboardSetCredentialSubmitEvent): UIOnboardSetCredentialSubmitEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIOnboardSetCredentialSubmitEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIOnboardSetCredentialSubmitEvent + */ +export const UIOnboardSetCredentialSubmitEvent = new UIOnboardSetCredentialSubmitEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIOnboardRegisterChallengeSubmitEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "mfa_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "login_flow", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIOnboardRegisterChallengeSubmitEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.mfaType = ""; + message.loginFlow = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIOnboardRegisterChallengeSubmitEvent): UIOnboardRegisterChallengeSubmitEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string mfa_type */ 2: + message.mfaType = reader.string(); + break; + case /* string login_flow */ 3: + message.loginFlow = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIOnboardRegisterChallengeSubmitEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string mfa_type = 2; */ + if (message.mfaType !== "") + writer.tag(2, WireType.LengthDelimited).string(message.mfaType); + /* string login_flow = 3; */ + if (message.loginFlow !== "") + writer.tag(3, WireType.LengthDelimited).string(message.loginFlow); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent + */ +export const UIOnboardRegisterChallengeSubmitEvent = new UIOnboardRegisterChallengeSubmitEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIOnboardQuestionnaireSubmitEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIOnboardQuestionnaireSubmitEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIOnboardQuestionnaireSubmitEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIOnboardQuestionnaireSubmitEvent): UIOnboardQuestionnaireSubmitEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIOnboardQuestionnaireSubmitEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIOnboardQuestionnaireSubmitEvent + */ +export const UIOnboardQuestionnaireSubmitEvent = new UIOnboardQuestionnaireSubmitEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIRecoveryCodesContinueClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIRecoveryCodesContinueClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIRecoveryCodesContinueClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIRecoveryCodesContinueClickEvent): UIRecoveryCodesContinueClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIRecoveryCodesContinueClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIRecoveryCodesContinueClickEvent + */ +export const UIRecoveryCodesContinueClickEvent = new UIRecoveryCodesContinueClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIRecoveryCodesCopyClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIRecoveryCodesCopyClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIRecoveryCodesCopyClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIRecoveryCodesCopyClickEvent): UIRecoveryCodesCopyClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIRecoveryCodesCopyClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIRecoveryCodesCopyClickEvent + */ +export const UIRecoveryCodesCopyClickEvent = new UIRecoveryCodesCopyClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIRecoveryCodesPrintClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIRecoveryCodesPrintClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UIRecoveryCodesPrintClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIRecoveryCodesPrintClickEvent): UIRecoveryCodesPrintClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIRecoveryCodesPrintClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIRecoveryCodesPrintClickEvent + */ +export const UIRecoveryCodesPrintClickEvent = new UIRecoveryCodesPrintClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DiscoverMetadata$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DiscoverMetadata", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "sso", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): DiscoverMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.id = ""; + message.userName = ""; + message.sso = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DiscoverMetadata): DiscoverMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* bool sso */ 3: + message.sso = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DiscoverMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, WireType.LengthDelimited).string(message.id); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* bool sso = 3; */ + if (message.sso !== false) + writer.tag(3, WireType.Varint).bool(message.sso); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DiscoverMetadata + */ +export const DiscoverMetadata = new DiscoverMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DiscoverResourceMetadata$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DiscoverResourceMetadata", [ + { no: 1, name: "resource", kind: "enum", T: () => ["prehog.v1alpha.DiscoverResource", DiscoverResource, "DISCOVER_RESOURCE_"] } + ]); + } + create(value?: PartialMessage): DiscoverResourceMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.resource = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DiscoverResourceMetadata): DiscoverResourceMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverResource resource */ 1: + message.resource = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DiscoverResourceMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverResource resource = 1; */ + if (message.resource !== 0) + writer.tag(1, WireType.Varint).int32(message.resource); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DiscoverResourceMetadata + */ +export const DiscoverResourceMetadata = new DiscoverResourceMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DiscoverStepStatus$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DiscoverStepStatus", [ + { no: 1, name: "status", kind: "enum", T: () => ["prehog.v1alpha.DiscoverStatus", DiscoverStatus, "DISCOVER_STATUS_"] }, + { no: 2, name: "error", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DiscoverStepStatus { + const message = globalThis.Object.create((this.messagePrototype!)); + message.status = 0; + message.error = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DiscoverStepStatus): DiscoverStepStatus { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverStatus status */ 1: + message.status = reader.int32(); + break; + case /* string error */ 2: + message.error = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DiscoverStepStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverStatus status = 1; */ + if (message.status !== 0) + writer.tag(1, WireType.Varint).int32(message.status); + /* string error = 2; */ + if (message.error !== "") + writer.tag(2, WireType.LengthDelimited).string(message.error); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DiscoverStepStatus + */ +export const DiscoverStepStatus = new DiscoverStepStatus$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverStartedEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverStartedEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverStartedEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverStartedEvent): UIDiscoverStartedEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 2: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverStartedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 2; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverStartedEvent + */ +export const UIDiscoverStartedEvent = new UIDiscoverStartedEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverResourceSelectionEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverResourceSelectionEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverResourceSelectionEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverResourceSelectionEvent): UIDiscoverResourceSelectionEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverResourceSelectionEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverResourceSelectionEvent + */ +export const UIDiscoverResourceSelectionEvent = new UIDiscoverResourceSelectionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverIntegrationAWSOIDCConnectEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverIntegrationAWSOIDCConnectEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverIntegrationAWSOIDCConnectEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverIntegrationAWSOIDCConnectEvent): UIDiscoverIntegrationAWSOIDCConnectEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverIntegrationAWSOIDCConnectEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverIntegrationAWSOIDCConnectEvent + */ +export const UIDiscoverIntegrationAWSOIDCConnectEvent = new UIDiscoverIntegrationAWSOIDCConnectEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDatabaseRDSEnrollEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDatabaseRDSEnrollEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus }, + { no: 4, name: "selected_resources_count", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): UIDiscoverDatabaseRDSEnrollEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.selectedResourcesCount = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDatabaseRDSEnrollEvent): UIDiscoverDatabaseRDSEnrollEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + case /* int64 selected_resources_count */ 4: + message.selectedResourcesCount = reader.int64().toNumber(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDatabaseRDSEnrollEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* int64 selected_resources_count = 4; */ + if (message.selectedResourcesCount !== 0) + writer.tag(4, WireType.Varint).int64(message.selectedResourcesCount); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDatabaseRDSEnrollEvent + */ +export const UIDiscoverDatabaseRDSEnrollEvent = new UIDiscoverDatabaseRDSEnrollEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDeployServiceEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDeployServiceEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus }, + { no: 4, name: "deploy_method", kind: "enum", T: () => ["prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployMethod", UIDiscoverDeployServiceEvent_DeployMethod, "DEPLOY_METHOD_"] }, + { no: 5, name: "deploy_type", kind: "enum", T: () => ["prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployType", UIDiscoverDeployServiceEvent_DeployType, "DEPLOY_TYPE_"] } + ]); + } + create(value?: PartialMessage): UIDiscoverDeployServiceEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.deployMethod = 0; + message.deployType = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDeployServiceEvent): UIDiscoverDeployServiceEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + case /* prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployMethod deploy_method */ 4: + message.deployMethod = reader.int32(); + break; + case /* prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployType deploy_type */ 5: + message.deployType = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDeployServiceEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployMethod deploy_method = 4; */ + if (message.deployMethod !== 0) + writer.tag(4, WireType.Varint).int32(message.deployMethod); + /* prehog.v1alpha.UIDiscoverDeployServiceEvent.DeployType deploy_type = 5; */ + if (message.deployType !== 0) + writer.tag(5, WireType.Varint).int32(message.deployType); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDeployServiceEvent + */ +export const UIDiscoverDeployServiceEvent = new UIDiscoverDeployServiceEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDatabaseRegisterEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDatabaseRegisterEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverDatabaseRegisterEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDatabaseRegisterEvent): UIDiscoverDatabaseRegisterEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDatabaseRegisterEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDatabaseRegisterEvent + */ +export const UIDiscoverDatabaseRegisterEvent = new UIDiscoverDatabaseRegisterEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDatabaseConfigureMTLSEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDatabaseConfigureMTLSEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverDatabaseConfigureMTLSEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDatabaseConfigureMTLSEvent): UIDiscoverDatabaseConfigureMTLSEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDatabaseConfigureMTLSEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDatabaseConfigureMTLSEvent + */ +export const UIDiscoverDatabaseConfigureMTLSEvent = new UIDiscoverDatabaseConfigureMTLSEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDesktopActiveDirectoryToolsInstallEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDesktopActiveDirectoryToolsInstallEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverDesktopActiveDirectoryToolsInstallEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDesktopActiveDirectoryToolsInstallEvent): UIDiscoverDesktopActiveDirectoryToolsInstallEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDesktopActiveDirectoryToolsInstallEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDesktopActiveDirectoryToolsInstallEvent + */ +export const UIDiscoverDesktopActiveDirectoryToolsInstallEvent = new UIDiscoverDesktopActiveDirectoryToolsInstallEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDesktopActiveDirectoryConfigureEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDesktopActiveDirectoryConfigureEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverDesktopActiveDirectoryConfigureEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDesktopActiveDirectoryConfigureEvent): UIDiscoverDesktopActiveDirectoryConfigureEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDesktopActiveDirectoryConfigureEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDesktopActiveDirectoryConfigureEvent + */ +export const UIDiscoverDesktopActiveDirectoryConfigureEvent = new UIDiscoverDesktopActiveDirectoryConfigureEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverAutoDiscoveredResourcesEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverAutoDiscoveredResourcesEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus }, + { no: 4, name: "resources_count", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): UIDiscoverAutoDiscoveredResourcesEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.resourcesCount = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverAutoDiscoveredResourcesEvent): UIDiscoverAutoDiscoveredResourcesEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + case /* int64 resources_count */ 4: + message.resourcesCount = reader.int64().toNumber(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverAutoDiscoveredResourcesEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* int64 resources_count = 4; */ + if (message.resourcesCount !== 0) + writer.tag(4, WireType.Varint).int64(message.resourcesCount); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverAutoDiscoveredResourcesEvent + */ +export const UIDiscoverAutoDiscoveredResourcesEvent = new UIDiscoverAutoDiscoveredResourcesEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverEC2InstanceSelectionEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverEC2InstanceSelectionEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverEC2InstanceSelectionEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverEC2InstanceSelectionEvent): UIDiscoverEC2InstanceSelectionEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverEC2InstanceSelectionEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverEC2InstanceSelectionEvent + */ +export const UIDiscoverEC2InstanceSelectionEvent = new UIDiscoverEC2InstanceSelectionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDeployEICEEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDeployEICEEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverDeployEICEEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDeployEICEEvent): UIDiscoverDeployEICEEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDeployEICEEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDeployEICEEvent + */ +export const UIDiscoverDeployEICEEvent = new UIDiscoverDeployEICEEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverCreateNodeEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverCreateNodeEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverCreateNodeEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverCreateNodeEvent): UIDiscoverCreateNodeEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverCreateNodeEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverCreateNodeEvent + */ +export const UIDiscoverCreateNodeEvent = new UIDiscoverCreateNodeEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverDatabaseConfigureIAMPolicyEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverDatabaseConfigureIAMPolicyEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverDatabaseConfigureIAMPolicyEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverDatabaseConfigureIAMPolicyEvent): UIDiscoverDatabaseConfigureIAMPolicyEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverDatabaseConfigureIAMPolicyEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverDatabaseConfigureIAMPolicyEvent + */ +export const UIDiscoverDatabaseConfigureIAMPolicyEvent = new UIDiscoverDatabaseConfigureIAMPolicyEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverPrincipalsConfigureEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverPrincipalsConfigureEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverPrincipalsConfigureEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverPrincipalsConfigureEvent): UIDiscoverPrincipalsConfigureEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverPrincipalsConfigureEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverPrincipalsConfigureEvent + */ +export const UIDiscoverPrincipalsConfigureEvent = new UIDiscoverPrincipalsConfigureEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverTestConnectionEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverTestConnectionEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverTestConnectionEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverTestConnectionEvent): UIDiscoverTestConnectionEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverTestConnectionEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverTestConnectionEvent + */ +export const UIDiscoverTestConnectionEvent = new UIDiscoverTestConnectionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIDiscoverCompletedEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIDiscoverCompletedEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => DiscoverMetadata }, + { no: 2, name: "resource", kind: "message", T: () => DiscoverResourceMetadata }, + { no: 3, name: "status", kind: "message", T: () => DiscoverStepStatus } + ]); + } + create(value?: PartialMessage): UIDiscoverCompletedEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIDiscoverCompletedEvent): UIDiscoverCompletedEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.DiscoverMetadata metadata */ 1: + message.metadata = DiscoverMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* prehog.v1alpha.DiscoverResourceMetadata resource */ 2: + message.resource = DiscoverResourceMetadata.internalBinaryRead(reader, reader.uint32(), options, message.resource); + break; + case /* prehog.v1alpha.DiscoverStepStatus status */ 3: + message.status = DiscoverStepStatus.internalBinaryRead(reader, reader.uint32(), options, message.status); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIDiscoverCompletedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.DiscoverMetadata metadata = 1; */ + if (message.metadata) + DiscoverMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverResourceMetadata resource = 2; */ + if (message.resource) + DiscoverResourceMetadata.internalBinaryWrite(message.resource, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoverStepStatus status = 3; */ + if (message.status) + DiscoverStepStatus.internalBinaryWrite(message.status, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIDiscoverCompletedEvent + */ +export const UIDiscoverCompletedEvent = new UIDiscoverCompletedEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class RoleCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.RoleCreateEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "role_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): RoleCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.roleName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RoleCreateEvent): RoleCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string role_name */ 2: + message.roleName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: RoleCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string role_name = 2; */ + if (message.roleName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.roleName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.RoleCreateEvent + */ +export const RoleCreateEvent = new RoleCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BotCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.BotCreateEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "bot_user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "role_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "role_count", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 5, name: "join_method", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "bot_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): BotCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.botUserName = ""; + message.roleName = ""; + message.roleCount = 0; + message.joinMethod = ""; + message.botName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BotCreateEvent): BotCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string bot_user_name */ 2: + message.botUserName = reader.string(); + break; + case /* string role_name */ 3: + message.roleName = reader.string(); + break; + case /* int64 role_count */ 4: + message.roleCount = reader.int64().toNumber(); + break; + case /* string join_method */ 5: + message.joinMethod = reader.string(); + break; + case /* string bot_name */ 6: + message.botName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: BotCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string bot_user_name = 2; */ + if (message.botUserName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.botUserName); + /* string role_name = 3; */ + if (message.roleName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.roleName); + /* int64 role_count = 4; */ + if (message.roleCount !== 0) + writer.tag(4, WireType.Varint).int64(message.roleCount); + /* string join_method = 5; */ + if (message.joinMethod !== "") + writer.tag(5, WireType.LengthDelimited).string(message.joinMethod); + /* string bot_name = 6; */ + if (message.botName !== "") + writer.tag(6, WireType.LengthDelimited).string(message.botName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.BotCreateEvent + */ +export const BotCreateEvent = new BotCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BotJoinEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.BotJoinEvent", [ + { no: 1, name: "bot_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "join_method", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "join_token_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): BotJoinEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.botName = ""; + message.joinMethod = ""; + message.joinTokenName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BotJoinEvent): BotJoinEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string bot_name */ 1: + message.botName = reader.string(); + break; + case /* string join_method */ 2: + message.joinMethod = reader.string(); + break; + case /* string join_token_name */ 3: + message.joinTokenName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: BotJoinEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string bot_name = 1; */ + if (message.botName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.botName); + /* string join_method = 2; */ + if (message.joinMethod !== "") + writer.tag(2, WireType.LengthDelimited).string(message.joinMethod); + /* string join_token_name = 3; */ + if (message.joinTokenName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.joinTokenName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.BotJoinEvent + */ +export const BotJoinEvent = new BotJoinEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UICreateNewRoleClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UICreateNewRoleClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UICreateNewRoleClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UICreateNewRoleClickEvent): UICreateNewRoleClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UICreateNewRoleClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UICreateNewRoleClickEvent + */ +export const UICreateNewRoleClickEvent = new UICreateNewRoleClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UICreateNewRoleSaveClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UICreateNewRoleSaveClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UICreateNewRoleSaveClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UICreateNewRoleSaveClickEvent): UICreateNewRoleSaveClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UICreateNewRoleSaveClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UICreateNewRoleSaveClickEvent + */ +export const UICreateNewRoleSaveClickEvent = new UICreateNewRoleSaveClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UICreateNewRoleCancelClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UICreateNewRoleCancelClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UICreateNewRoleCancelClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UICreateNewRoleCancelClickEvent): UICreateNewRoleCancelClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UICreateNewRoleCancelClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UICreateNewRoleCancelClickEvent + */ +export const UICreateNewRoleCancelClickEvent = new UICreateNewRoleCancelClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UICreateNewRoleViewDocumentationClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UICreateNewRoleViewDocumentationClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UICreateNewRoleViewDocumentationClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UICreateNewRoleViewDocumentationClickEvent): UICreateNewRoleViewDocumentationClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UICreateNewRoleViewDocumentationClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UICreateNewRoleViewDocumentationClickEvent + */ +export const UICreateNewRoleViewDocumentationClickEvent = new UICreateNewRoleViewDocumentationClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UICallToActionClickEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UICallToActionClickEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "cta", kind: "enum", T: () => ["prehog.v1alpha.CTA", CTA] } + ]); + } + create(value?: PartialMessage): UICallToActionClickEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.cta = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UICallToActionClickEvent): UICallToActionClickEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.CTA cta */ 2: + message.cta = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UICallToActionClickEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.CTA cta = 2; */ + if (message.cta !== 0) + writer.tag(2, WireType.Varint).int32(message.cta); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UICallToActionClickEvent + */ +export const UICallToActionClickEvent = new UICallToActionClickEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class KubeRequestEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.KubeRequestEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_kind", kind: "enum", T: () => ["prehog.v1alpha.UserKind", UserKind, "USER_KIND_"] } + ]); + } + create(value?: PartialMessage): KubeRequestEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.userKind = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KubeRequestEvent): KubeRequestEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.UserKind user_kind */ 2: + message.userKind = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: KubeRequestEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.UserKind user_kind = 2; */ + if (message.userKind !== 0) + writer.tag(2, WireType.Varint).int32(message.userKind); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.KubeRequestEvent + */ +export const KubeRequestEvent = new KubeRequestEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SFTPEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SFTPEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "action", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "user_kind", kind: "enum", T: () => ["prehog.v1alpha.UserKind", UserKind, "USER_KIND_"] } + ]); + } + create(value?: PartialMessage): SFTPEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.action = 0; + message.userKind = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFTPEvent): SFTPEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* int32 action */ 2: + message.action = reader.int32(); + break; + case /* prehog.v1alpha.UserKind user_kind */ 3: + message.userKind = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SFTPEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* int32 action = 2; */ + if (message.action !== 0) + writer.tag(2, WireType.Varint).int32(message.action); + /* prehog.v1alpha.UserKind user_kind = 3; */ + if (message.userKind !== 0) + writer.tag(3, WireType.Varint).int32(message.userKind); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SFTPEvent + */ +export const SFTPEvent = new SFTPEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AgentMetadataEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AgentMetadataEvent", [ + { no: 1, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "host_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "services", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "os", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "os_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "host_architecture", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "glibc_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "install_methods", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 9, name: "container_runtime", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "container_orchestrator", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 11, name: "cloud_environment", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 12, name: "external_upgrader", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AgentMetadataEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.version = ""; + message.hostId = ""; + message.services = []; + message.os = ""; + message.osVersion = ""; + message.hostArchitecture = ""; + message.glibcVersion = ""; + message.installMethods = []; + message.containerRuntime = ""; + message.containerOrchestrator = ""; + message.cloudEnvironment = ""; + message.externalUpgrader = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AgentMetadataEvent): AgentMetadataEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string version */ 1: + message.version = reader.string(); + break; + case /* string host_id */ 2: + message.hostId = reader.string(); + break; + case /* repeated string services */ 3: + message.services.push(reader.string()); + break; + case /* string os */ 4: + message.os = reader.string(); + break; + case /* string os_version */ 5: + message.osVersion = reader.string(); + break; + case /* string host_architecture */ 6: + message.hostArchitecture = reader.string(); + break; + case /* string glibc_version */ 7: + message.glibcVersion = reader.string(); + break; + case /* repeated string install_methods */ 8: + message.installMethods.push(reader.string()); + break; + case /* string container_runtime */ 9: + message.containerRuntime = reader.string(); + break; + case /* string container_orchestrator */ 10: + message.containerOrchestrator = reader.string(); + break; + case /* string cloud_environment */ 11: + message.cloudEnvironment = reader.string(); + break; + case /* string external_upgrader */ 12: + message.externalUpgrader = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AgentMetadataEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string version = 1; */ + if (message.version !== "") + writer.tag(1, WireType.LengthDelimited).string(message.version); + /* string host_id = 2; */ + if (message.hostId !== "") + writer.tag(2, WireType.LengthDelimited).string(message.hostId); + /* repeated string services = 3; */ + for (let i = 0; i < message.services.length; i++) + writer.tag(3, WireType.LengthDelimited).string(message.services[i]); + /* string os = 4; */ + if (message.os !== "") + writer.tag(4, WireType.LengthDelimited).string(message.os); + /* string os_version = 5; */ + if (message.osVersion !== "") + writer.tag(5, WireType.LengthDelimited).string(message.osVersion); + /* string host_architecture = 6; */ + if (message.hostArchitecture !== "") + writer.tag(6, WireType.LengthDelimited).string(message.hostArchitecture); + /* string glibc_version = 7; */ + if (message.glibcVersion !== "") + writer.tag(7, WireType.LengthDelimited).string(message.glibcVersion); + /* repeated string install_methods = 8; */ + for (let i = 0; i < message.installMethods.length; i++) + writer.tag(8, WireType.LengthDelimited).string(message.installMethods[i]); + /* string container_runtime = 9; */ + if (message.containerRuntime !== "") + writer.tag(9, WireType.LengthDelimited).string(message.containerRuntime); + /* string container_orchestrator = 10; */ + if (message.containerOrchestrator !== "") + writer.tag(10, WireType.LengthDelimited).string(message.containerOrchestrator); + /* string cloud_environment = 11; */ + if (message.cloudEnvironment !== "") + writer.tag(11, WireType.LengthDelimited).string(message.cloudEnvironment); + /* string external_upgrader = 12; */ + if (message.externalUpgrader !== "") + writer.tag(12, WireType.LengthDelimited).string(message.externalUpgrader); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AgentMetadataEvent + */ +export const AgentMetadataEvent = new AgentMetadataEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AssistCompletionEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AssistCompletionEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "conversation_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "total_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "prompt_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 5, name: "completion_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): AssistCompletionEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.conversationId = ""; + message.totalTokens = 0; + message.promptTokens = 0; + message.completionTokens = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssistCompletionEvent): AssistCompletionEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string conversation_id */ 2: + message.conversationId = reader.string(); + break; + case /* int64 total_tokens */ 3: + message.totalTokens = reader.int64().toNumber(); + break; + case /* int64 prompt_tokens */ 4: + message.promptTokens = reader.int64().toNumber(); + break; + case /* int64 completion_tokens */ 5: + message.completionTokens = reader.int64().toNumber(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AssistCompletionEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string conversation_id = 2; */ + if (message.conversationId !== "") + writer.tag(2, WireType.LengthDelimited).string(message.conversationId); + /* int64 total_tokens = 3; */ + if (message.totalTokens !== 0) + writer.tag(3, WireType.Varint).int64(message.totalTokens); + /* int64 prompt_tokens = 4; */ + if (message.promptTokens !== 0) + writer.tag(4, WireType.Varint).int64(message.promptTokens); + /* int64 completion_tokens = 5; */ + if (message.completionTokens !== 0) + writer.tag(5, WireType.Varint).int64(message.completionTokens); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AssistCompletionEvent + */ +export const AssistCompletionEvent = new AssistCompletionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AssistExecutionEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AssistExecutionEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "conversation_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "node_count", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "total_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 5, name: "prompt_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 6, name: "completion_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): AssistExecutionEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.conversationId = ""; + message.nodeCount = 0; + message.totalTokens = 0; + message.promptTokens = 0; + message.completionTokens = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssistExecutionEvent): AssistExecutionEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string conversation_id */ 2: + message.conversationId = reader.string(); + break; + case /* int64 node_count */ 3: + message.nodeCount = reader.int64().toNumber(); + break; + case /* int64 total_tokens */ 4: + message.totalTokens = reader.int64().toNumber(); + break; + case /* int64 prompt_tokens */ 5: + message.promptTokens = reader.int64().toNumber(); + break; + case /* int64 completion_tokens */ 6: + message.completionTokens = reader.int64().toNumber(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AssistExecutionEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string conversation_id = 2; */ + if (message.conversationId !== "") + writer.tag(2, WireType.LengthDelimited).string(message.conversationId); + /* int64 node_count = 3; */ + if (message.nodeCount !== 0) + writer.tag(3, WireType.Varint).int64(message.nodeCount); + /* int64 total_tokens = 4; */ + if (message.totalTokens !== 0) + writer.tag(4, WireType.Varint).int64(message.totalTokens); + /* int64 prompt_tokens = 5; */ + if (message.promptTokens !== 0) + writer.tag(5, WireType.Varint).int64(message.promptTokens); + /* int64 completion_tokens = 6; */ + if (message.completionTokens !== 0) + writer.tag(6, WireType.Varint).int64(message.completionTokens); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AssistExecutionEvent + */ +export const AssistExecutionEvent = new AssistExecutionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AssistNewConversationEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AssistNewConversationEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "category", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AssistNewConversationEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.category = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssistNewConversationEvent): AssistNewConversationEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string category */ 2: + message.category = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AssistNewConversationEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string category = 2; */ + if (message.category !== "") + writer.tag(2, WireType.LengthDelimited).string(message.category); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AssistNewConversationEvent + */ +export const AssistNewConversationEvent = new AssistNewConversationEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AssistAccessRequestEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AssistAccessRequestEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "resource_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "total_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 5, name: "prompt_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 6, name: "completion_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): AssistAccessRequestEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.resourceType = ""; + message.totalTokens = 0; + message.promptTokens = 0; + message.completionTokens = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssistAccessRequestEvent): AssistAccessRequestEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string resource_type */ 2: + message.resourceType = reader.string(); + break; + case /* int64 total_tokens */ 4: + message.totalTokens = reader.int64().toNumber(); + break; + case /* int64 prompt_tokens */ 5: + message.promptTokens = reader.int64().toNumber(); + break; + case /* int64 completion_tokens */ 6: + message.completionTokens = reader.int64().toNumber(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AssistAccessRequestEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string resource_type = 2; */ + if (message.resourceType !== "") + writer.tag(2, WireType.LengthDelimited).string(message.resourceType); + /* int64 total_tokens = 4; */ + if (message.totalTokens !== 0) + writer.tag(4, WireType.Varint).int64(message.totalTokens); + /* int64 prompt_tokens = 5; */ + if (message.promptTokens !== 0) + writer.tag(5, WireType.Varint).int64(message.promptTokens); + /* int64 completion_tokens = 6; */ + if (message.completionTokens !== 0) + writer.tag(6, WireType.Varint).int64(message.completionTokens); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AssistAccessRequestEvent + */ +export const AssistAccessRequestEvent = new AssistAccessRequestEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AssistActionEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AssistActionEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "action", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "total_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 5, name: "prompt_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 6, name: "completion_tokens", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ } + ]); + } + create(value?: PartialMessage): AssistActionEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.action = ""; + message.totalTokens = 0; + message.promptTokens = 0; + message.completionTokens = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssistActionEvent): AssistActionEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string action */ 2: + message.action = reader.string(); + break; + case /* int64 total_tokens */ 4: + message.totalTokens = reader.int64().toNumber(); + break; + case /* int64 prompt_tokens */ 5: + message.promptTokens = reader.int64().toNumber(); + break; + case /* int64 completion_tokens */ 6: + message.completionTokens = reader.int64().toNumber(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AssistActionEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string action = 2; */ + if (message.action !== "") + writer.tag(2, WireType.LengthDelimited).string(message.action); + /* int64 total_tokens = 4; */ + if (message.totalTokens !== 0) + writer.tag(4, WireType.Varint).int64(message.totalTokens); + /* int64 prompt_tokens = 5; */ + if (message.promptTokens !== 0) + writer.tag(5, WireType.Varint).int64(message.promptTokens); + /* int64 completion_tokens = 6; */ + if (message.completionTokens !== 0) + writer.tag(6, WireType.Varint).int64(message.completionTokens); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AssistActionEvent + */ +export const AssistActionEvent = new AssistActionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListMetadata$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListMetadata", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AccessListMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.id = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListMetadata): AccessListMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, WireType.LengthDelimited).string(message.id); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListMetadata + */ +export const AccessListMetadata = new AccessListMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListCreateEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata } + ]); + } + create(value?: PartialMessage): AccessListCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListCreateEvent): AccessListCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListCreateEvent + */ +export const AccessListCreateEvent = new AccessListCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListUpdateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListUpdateEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata } + ]); + } + create(value?: PartialMessage): AccessListUpdateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListUpdateEvent): AccessListUpdateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListUpdateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListUpdateEvent + */ +export const AccessListUpdateEvent = new AccessListUpdateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListDeleteEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListDeleteEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata } + ]); + } + create(value?: PartialMessage): AccessListDeleteEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListDeleteEvent): AccessListDeleteEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListDeleteEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListDeleteEvent + */ +export const AccessListDeleteEvent = new AccessListDeleteEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListMemberCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListMemberCreateEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata } + ]); + } + create(value?: PartialMessage): AccessListMemberCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListMemberCreateEvent): AccessListMemberCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListMemberCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListMemberCreateEvent + */ +export const AccessListMemberCreateEvent = new AccessListMemberCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListMemberUpdateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListMemberUpdateEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata } + ]); + } + create(value?: PartialMessage): AccessListMemberUpdateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListMemberUpdateEvent): AccessListMemberUpdateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListMemberUpdateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListMemberUpdateEvent + */ +export const AccessListMemberUpdateEvent = new AccessListMemberUpdateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListMemberDeleteEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListMemberDeleteEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata } + ]); + } + create(value?: PartialMessage): AccessListMemberDeleteEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListMemberDeleteEvent): AccessListMemberDeleteEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListMemberDeleteEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListMemberDeleteEvent + */ +export const AccessListMemberDeleteEvent = new AccessListMemberDeleteEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListGrantsToUserEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListGrantsToUserEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "count_roles_granted", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "count_traits_granted", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): AccessListGrantsToUserEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.countRolesGranted = 0; + message.countTraitsGranted = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListGrantsToUserEvent): AccessListGrantsToUserEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* int32 count_roles_granted */ 2: + message.countRolesGranted = reader.int32(); + break; + case /* int32 count_traits_granted */ 3: + message.countTraitsGranted = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListGrantsToUserEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* int32 count_roles_granted = 2; */ + if (message.countRolesGranted !== 0) + writer.tag(2, WireType.Varint).int32(message.countRolesGranted); + /* int32 count_traits_granted = 3; */ + if (message.countTraitsGranted !== 0) + writer.tag(3, WireType.Varint).int32(message.countTraitsGranted); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListGrantsToUserEvent + */ +export const AccessListGrantsToUserEvent = new AccessListGrantsToUserEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListReviewCreateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListReviewCreateEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata }, + { no: 3, name: "days_past_next_audit_date", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 4, name: "membership_requirements_changed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "review_frequency_changed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "review_day_of_month_changed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "number_of_removed_members", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): AccessListReviewCreateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.daysPastNextAuditDate = 0; + message.membershipRequirementsChanged = false; + message.reviewFrequencyChanged = false; + message.reviewDayOfMonthChanged = false; + message.numberOfRemovedMembers = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListReviewCreateEvent): AccessListReviewCreateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* int32 days_past_next_audit_date */ 3: + message.daysPastNextAuditDate = reader.int32(); + break; + case /* bool membership_requirements_changed */ 4: + message.membershipRequirementsChanged = reader.bool(); + break; + case /* bool review_frequency_changed */ 5: + message.reviewFrequencyChanged = reader.bool(); + break; + case /* bool review_day_of_month_changed */ 6: + message.reviewDayOfMonthChanged = reader.bool(); + break; + case /* int32 number_of_removed_members */ 7: + message.numberOfRemovedMembers = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListReviewCreateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* int32 days_past_next_audit_date = 3; */ + if (message.daysPastNextAuditDate !== 0) + writer.tag(3, WireType.Varint).int32(message.daysPastNextAuditDate); + /* bool membership_requirements_changed = 4; */ + if (message.membershipRequirementsChanged !== false) + writer.tag(4, WireType.Varint).bool(message.membershipRequirementsChanged); + /* bool review_frequency_changed = 5; */ + if (message.reviewFrequencyChanged !== false) + writer.tag(5, WireType.Varint).bool(message.reviewFrequencyChanged); + /* bool review_day_of_month_changed = 6; */ + if (message.reviewDayOfMonthChanged !== false) + writer.tag(6, WireType.Varint).bool(message.reviewDayOfMonthChanged); + /* int32 number_of_removed_members = 7; */ + if (message.numberOfRemovedMembers !== 0) + writer.tag(7, WireType.Varint).int32(message.numberOfRemovedMembers); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListReviewCreateEvent + */ +export const AccessListReviewCreateEvent = new AccessListReviewCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListReviewDeleteEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListReviewDeleteEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "metadata", kind: "message", T: () => AccessListMetadata }, + { no: 3, name: "access_list_review_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AccessListReviewDeleteEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.accessListReviewId = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListReviewDeleteEvent): AccessListReviewDeleteEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.AccessListMetadata metadata */ 2: + message.metadata = AccessListMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + case /* string access_list_review_id */ 3: + message.accessListReviewId = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListReviewDeleteEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.AccessListMetadata metadata = 2; */ + if (message.metadata) + AccessListMetadata.internalBinaryWrite(message.metadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* string access_list_review_id = 3; */ + if (message.accessListReviewId !== "") + writer.tag(3, WireType.LengthDelimited).string(message.accessListReviewId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListReviewDeleteEvent + */ +export const AccessListReviewDeleteEvent = new AccessListReviewDeleteEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListReviewComplianceEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AccessListReviewComplianceEvent", [ + { no: 1, name: "total_access_lists", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "access_lists_need_review", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): AccessListReviewComplianceEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.totalAccessLists = 0; + message.accessListsNeedReview = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListReviewComplianceEvent): AccessListReviewComplianceEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int32 total_access_lists */ 1: + message.totalAccessLists = reader.int32(); + break; + case /* int32 access_lists_need_review */ 2: + message.accessListsNeedReview = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListReviewComplianceEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int32 total_access_lists = 1; */ + if (message.totalAccessLists !== 0) + writer.tag(1, WireType.Varint).int32(message.totalAccessLists); + /* int32 access_lists_need_review = 2; */ + if (message.accessListsNeedReview !== 0) + writer.tag(2, WireType.Varint).int32(message.accessListsNeedReview); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AccessListReviewComplianceEvent + */ +export const AccessListReviewComplianceEvent = new AccessListReviewComplianceEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class IntegrationEnrollMetadata$Type extends MessageType { + constructor() { + super("prehog.v1alpha.IntegrationEnrollMetadata", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "kind", kind: "enum", T: () => ["prehog.v1alpha.IntegrationEnrollKind", IntegrationEnrollKind, "INTEGRATION_ENROLL_KIND_"] }, + { no: 3, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): IntegrationEnrollMetadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.id = ""; + message.kind = 0; + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: IntegrationEnrollMetadata): IntegrationEnrollMetadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* prehog.v1alpha.IntegrationEnrollKind kind */ 2: + message.kind = reader.int32(); + break; + case /* string user_name */ 3: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: IntegrationEnrollMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, WireType.LengthDelimited).string(message.id); + /* prehog.v1alpha.IntegrationEnrollKind kind = 2; */ + if (message.kind !== 0) + writer.tag(2, WireType.Varint).int32(message.kind); + /* string user_name = 3; */ + if (message.userName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.IntegrationEnrollMetadata + */ +export const IntegrationEnrollMetadata = new IntegrationEnrollMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIIntegrationEnrollStartEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIIntegrationEnrollStartEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => IntegrationEnrollMetadata } + ]); + } + create(value?: PartialMessage): UIIntegrationEnrollStartEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIIntegrationEnrollStartEvent): UIIntegrationEnrollStartEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.IntegrationEnrollMetadata metadata */ 1: + message.metadata = IntegrationEnrollMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIIntegrationEnrollStartEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.IntegrationEnrollMetadata metadata = 1; */ + if (message.metadata) + IntegrationEnrollMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIIntegrationEnrollStartEvent + */ +export const UIIntegrationEnrollStartEvent = new UIIntegrationEnrollStartEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UIIntegrationEnrollCompleteEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.UIIntegrationEnrollCompleteEvent", [ + { no: 1, name: "metadata", kind: "message", T: () => IntegrationEnrollMetadata } + ]); + } + create(value?: PartialMessage): UIIntegrationEnrollCompleteEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UIIntegrationEnrollCompleteEvent): UIIntegrationEnrollCompleteEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.IntegrationEnrollMetadata metadata */ 1: + message.metadata = IntegrationEnrollMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UIIntegrationEnrollCompleteEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.IntegrationEnrollMetadata metadata = 1; */ + if (message.metadata) + IntegrationEnrollMetadata.internalBinaryWrite(message.metadata, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.UIIntegrationEnrollCompleteEvent + */ +export const UIIntegrationEnrollCompleteEvent = new UIIntegrationEnrollCompleteEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EditorChangeEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.EditorChangeEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "status", kind: "enum", T: () => ["prehog.v1alpha.EditorChangeStatus", EditorChangeStatus, "EDITOR_CHANGE_STATUS_"] } + ]); + } + create(value?: PartialMessage): EditorChangeEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.status = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EditorChangeEvent): EditorChangeEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.EditorChangeStatus status */ 2: + message.status = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EditorChangeEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.EditorChangeStatus status = 2; */ + if (message.status !== 0) + writer.tag(2, WireType.Varint).int32(message.status); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.EditorChangeEvent + */ +export const EditorChangeEvent = new EditorChangeEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeviceAuthenticateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DeviceAuthenticateEvent", [ + { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "device_os_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DeviceAuthenticateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.deviceId = ""; + message.userName = ""; + message.deviceOsType = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeviceAuthenticateEvent): DeviceAuthenticateEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string device_id */ 1: + message.deviceId = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* string device_os_type */ 3: + message.deviceOsType = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeviceAuthenticateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string device_id = 1; */ + if (message.deviceId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.deviceId); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* string device_os_type = 3; */ + if (message.deviceOsType !== "") + writer.tag(3, WireType.LengthDelimited).string(message.deviceOsType); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DeviceAuthenticateEvent + */ +export const DeviceAuthenticateEvent = new DeviceAuthenticateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeviceEnrollEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DeviceEnrollEvent", [ + { no: 1, name: "device_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "device_os_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "device_origin", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DeviceEnrollEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.deviceId = ""; + message.userName = ""; + message.deviceOsType = ""; + message.deviceOrigin = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeviceEnrollEvent): DeviceEnrollEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string device_id */ 1: + message.deviceId = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* string device_os_type */ 3: + message.deviceOsType = reader.string(); + break; + case /* string device_origin */ 4: + message.deviceOrigin = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeviceEnrollEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string device_id = 1; */ + if (message.deviceId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.deviceId); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* string device_os_type = 3; */ + if (message.deviceOsType !== "") + writer.tag(3, WireType.LengthDelimited).string(message.deviceOsType); + /* string device_origin = 4; */ + if (message.deviceOrigin !== "") + writer.tag(4, WireType.LengthDelimited).string(message.deviceOrigin); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DeviceEnrollEvent + */ +export const DeviceEnrollEvent = new DeviceEnrollEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FeatureRecommendationEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.FeatureRecommendationEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "feature", kind: "enum", T: () => ["prehog.v1alpha.Feature", Feature, "FEATURE_"] }, + { no: 3, name: "feature_recommendation_status", kind: "enum", T: () => ["prehog.v1alpha.FeatureRecommendationStatus", FeatureRecommendationStatus, "FEATURE_RECOMMENDATION_STATUS_"] } + ]); + } + create(value?: PartialMessage): FeatureRecommendationEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.feature = 0; + message.featureRecommendationStatus = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureRecommendationEvent): FeatureRecommendationEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* prehog.v1alpha.Feature feature */ 2: + message.feature = reader.int32(); + break; + case /* prehog.v1alpha.FeatureRecommendationStatus feature_recommendation_status */ 3: + message.featureRecommendationStatus = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FeatureRecommendationEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* prehog.v1alpha.Feature feature = 2; */ + if (message.feature !== 0) + writer.tag(2, WireType.Varint).int32(message.feature); + /* prehog.v1alpha.FeatureRecommendationStatus feature_recommendation_status = 3; */ + if (message.featureRecommendationStatus !== 0) + writer.tag(3, WireType.Varint).int32(message.featureRecommendationStatus); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.FeatureRecommendationEvent + */ +export const FeatureRecommendationEvent = new FeatureRecommendationEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class LicenseLimitEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.LicenseLimitEvent", [ + { no: 1, name: "license_limit", kind: "enum", T: () => ["prehog.v1alpha.LicenseLimit", LicenseLimit, "LICENSE_LIMIT_"] } + ]); + } + create(value?: PartialMessage): LicenseLimitEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.licenseLimit = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LicenseLimitEvent): LicenseLimitEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* prehog.v1alpha.LicenseLimit license_limit */ 1: + message.licenseLimit = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: LicenseLimitEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* prehog.v1alpha.LicenseLimit license_limit = 1; */ + if (message.licenseLimit !== 0) + writer.tag(1, WireType.Varint).int32(message.licenseLimit); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.LicenseLimitEvent + */ +export const LicenseLimitEvent = new LicenseLimitEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DesktopDirectoryShareEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DesktopDirectoryShareEvent", [ + { no: 1, name: "desktop", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "directory_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DesktopDirectoryShareEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.desktop = ""; + message.userName = ""; + message.directoryName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DesktopDirectoryShareEvent): DesktopDirectoryShareEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string desktop */ 1: + message.desktop = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + case /* string directory_name */ 3: + message.directoryName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DesktopDirectoryShareEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string desktop = 1; */ + if (message.desktop !== "") + writer.tag(1, WireType.LengthDelimited).string(message.desktop); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + /* string directory_name = 3; */ + if (message.directoryName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.directoryName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DesktopDirectoryShareEvent + */ +export const DesktopDirectoryShareEvent = new DesktopDirectoryShareEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DesktopClipboardEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DesktopClipboardEvent", [ + { no: 1, name: "desktop", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DesktopClipboardEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.desktop = ""; + message.userName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DesktopClipboardEvent): DesktopClipboardEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string desktop */ 1: + message.desktop = reader.string(); + break; + case /* string user_name */ 2: + message.userName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DesktopClipboardEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string desktop = 1; */ + if (message.desktop !== "") + writer.tag(1, WireType.LengthDelimited).string(message.desktop); + /* string user_name = 2; */ + if (message.userName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.userName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DesktopClipboardEvent + */ +export const DesktopClipboardEvent = new DesktopClipboardEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class TAGExecuteQueryEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.TAGExecuteQueryEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "total_nodes", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 3, name: "total_edges", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 4, name: "is_success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): TAGExecuteQueryEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.totalNodes = 0; + message.totalEdges = 0; + message.isSuccess = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TAGExecuteQueryEvent): TAGExecuteQueryEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* int64 total_nodes */ 2: + message.totalNodes = reader.int64().toNumber(); + break; + case /* int64 total_edges */ 3: + message.totalEdges = reader.int64().toNumber(); + break; + case /* bool is_success */ 4: + message.isSuccess = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: TAGExecuteQueryEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* int64 total_nodes = 2; */ + if (message.totalNodes !== 0) + writer.tag(2, WireType.Varint).int64(message.totalNodes); + /* int64 total_edges = 3; */ + if (message.totalEdges !== 0) + writer.tag(3, WireType.Varint).int64(message.totalEdges); + /* bool is_success = 4; */ + if (message.isSuccess !== false) + writer.tag(4, WireType.Varint).bool(message.isSuccess); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.TAGExecuteQueryEvent + */ +export const TAGExecuteQueryEvent = new TAGExecuteQueryEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ExternalAuditStorageAuthenticateEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.ExternalAuditStorageAuthenticateEvent", []); + } + create(value?: PartialMessage): ExternalAuditStorageAuthenticateEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExternalAuditStorageAuthenticateEvent): ExternalAuditStorageAuthenticateEvent { + return target ?? this.create(); + } + internalBinaryWrite(message: ExternalAuditStorageAuthenticateEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.ExternalAuditStorageAuthenticateEvent + */ +export const ExternalAuditStorageAuthenticateEvent = new ExternalAuditStorageAuthenticateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SecurityReportGetResultEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SecurityReportGetResultEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "days", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): SecurityReportGetResultEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.name = ""; + message.days = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SecurityReportGetResultEvent): SecurityReportGetResultEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* int32 days */ 3: + message.days = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SecurityReportGetResultEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* int32 days = 3; */ + if (message.days !== 0) + writer.tag(3, WireType.Varint).int32(message.days); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SecurityReportGetResultEvent + */ +export const SecurityReportGetResultEvent = new SecurityReportGetResultEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AuditQueryRunEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.AuditQueryRunEvent", [ + { no: 1, name: "user_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "days", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "is_success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): AuditQueryRunEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.userName = ""; + message.days = 0; + message.isSuccess = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuditQueryRunEvent): AuditQueryRunEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string user_name */ 1: + message.userName = reader.string(); + break; + case /* int32 days */ 2: + message.days = reader.int32(); + break; + case /* bool is_success */ 3: + message.isSuccess = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AuditQueryRunEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string user_name = 1; */ + if (message.userName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.userName); + /* int32 days = 2; */ + if (message.days !== 0) + writer.tag(2, WireType.Varint).int32(message.days); + /* bool is_success = 3; */ + if (message.isSuccess !== false) + writer.tag(3, WireType.Varint).bool(message.isSuccess); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.AuditQueryRunEvent + */ +export const AuditQueryRunEvent = new AuditQueryRunEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DiscoveryFetchEvent$Type extends MessageType { + constructor() { + super("prehog.v1alpha.DiscoveryFetchEvent", [ + { no: 1, name: "cloud_provider", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "resource_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DiscoveryFetchEvent { + const message = globalThis.Object.create((this.messagePrototype!)); + message.cloudProvider = ""; + message.resourceType = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DiscoveryFetchEvent): DiscoveryFetchEvent { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cloud_provider */ 1: + message.cloudProvider = reader.string(); + break; + case /* string resource_type */ 2: + message.resourceType = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DiscoveryFetchEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cloud_provider = 1; */ + if (message.cloudProvider !== "") + writer.tag(1, WireType.LengthDelimited).string(message.cloudProvider); + /* string resource_type = 2; */ + if (message.resourceType !== "") + writer.tag(2, WireType.LengthDelimited).string(message.resourceType); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.DiscoveryFetchEvent + */ +export const DiscoveryFetchEvent = new DiscoveryFetchEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitEventRequest$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitEventRequest", [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "timestamp", kind: "message", T: () => Timestamp }, + { no: 3, name: "user_login", kind: "message", oneof: "event", T: () => UserLoginEvent }, + { no: 4, name: "sso_create", kind: "message", oneof: "event", T: () => SSOCreateEvent }, + { no: 5, name: "resource_create", kind: "message", oneof: "event", T: () => ResourceCreateEvent }, + { no: 6, name: "session_start", kind: "message", oneof: "event", T: () => SessionStartEvent }, + { no: 7, name: "ui_banner_click", kind: "message", oneof: "event", T: () => UIBannerClickEvent }, + { no: 9, name: "ui_onboard_complete_go_to_dashboard_click", kind: "message", oneof: "event", T: () => UIOnboardCompleteGoToDashboardClickEvent }, + { no: 10, name: "ui_onboard_add_first_resource_click", kind: "message", oneof: "event", T: () => UIOnboardAddFirstResourceClickEvent }, + { no: 11, name: "ui_onboard_add_first_resource_later_click", kind: "message", oneof: "event", T: () => UIOnboardAddFirstResourceLaterClickEvent }, + { no: 12, name: "ui_onboard_set_credential_submit", kind: "message", oneof: "event", T: () => UIOnboardSetCredentialSubmitEvent }, + { no: 13, name: "ui_onboard_register_challenge_submit", kind: "message", oneof: "event", T: () => UIOnboardRegisterChallengeSubmitEvent }, + { no: 14, name: "ui_recovery_codes_continue_click", kind: "message", oneof: "event", T: () => UIRecoveryCodesContinueClickEvent }, + { no: 15, name: "ui_recovery_codes_copy_click", kind: "message", oneof: "event", T: () => UIRecoveryCodesCopyClickEvent }, + { no: 16, name: "ui_recovery_codes_print_click", kind: "message", oneof: "event", T: () => UIRecoveryCodesPrintClickEvent }, + { no: 17, name: "ui_discover_started_event", kind: "message", oneof: "event", T: () => UIDiscoverStartedEvent }, + { no: 18, name: "ui_discover_resource_selection_event", kind: "message", oneof: "event", T: () => UIDiscoverResourceSelectionEvent }, + { no: 19, name: "user_certificate_issued_event", kind: "message", oneof: "event", T: () => UserCertificateIssuedEvent }, + { no: 20, name: "session_start_v2", kind: "message", oneof: "event", T: () => SessionStartEvent }, + { no: 21, name: "ui_discover_deploy_service_event", kind: "message", oneof: "event", T: () => UIDiscoverDeployServiceEvent }, + { no: 22, name: "ui_discover_database_register_event", kind: "message", oneof: "event", T: () => UIDiscoverDatabaseRegisterEvent }, + { no: 23, name: "ui_discover_database_configure_mtls_event", kind: "message", oneof: "event", T: () => UIDiscoverDatabaseConfigureMTLSEvent }, + { no: 24, name: "ui_discover_desktop_active_directory_tools_install_event", kind: "message", oneof: "event", T: () => UIDiscoverDesktopActiveDirectoryToolsInstallEvent }, + { no: 25, name: "ui_discover_desktop_active_directory_configure_event", kind: "message", oneof: "event", T: () => UIDiscoverDesktopActiveDirectoryConfigureEvent }, + { no: 26, name: "ui_discover_auto_discovered_resources_event", kind: "message", oneof: "event", T: () => UIDiscoverAutoDiscoveredResourcesEvent }, + { no: 27, name: "ui_discover_database_configure_iam_policy_event", kind: "message", oneof: "event", T: () => UIDiscoverDatabaseConfigureIAMPolicyEvent }, + { no: 28, name: "ui_discover_principals_configure_event", kind: "message", oneof: "event", T: () => UIDiscoverPrincipalsConfigureEvent }, + { no: 29, name: "ui_discover_test_connection_event", kind: "message", oneof: "event", T: () => UIDiscoverTestConnectionEvent }, + { no: 30, name: "ui_discover_completed_event", kind: "message", oneof: "event", T: () => UIDiscoverCompletedEvent }, + { no: 31, name: "role_create", kind: "message", oneof: "event", T: () => RoleCreateEvent }, + { no: 32, name: "ui_create_new_role_click", kind: "message", oneof: "event", T: () => UICreateNewRoleClickEvent }, + { no: 33, name: "ui_create_new_role_save_click", kind: "message", oneof: "event", T: () => UICreateNewRoleSaveClickEvent }, + { no: 34, name: "ui_create_new_role_cancel_click", kind: "message", oneof: "event", T: () => UICreateNewRoleCancelClickEvent }, + { no: 35, name: "ui_create_new_role_view_documentation_click", kind: "message", oneof: "event", T: () => UICreateNewRoleViewDocumentationClickEvent }, + { no: 36, name: "kube_request", kind: "message", oneof: "event", T: () => KubeRequestEvent }, + { no: 37, name: "sftp", kind: "message", oneof: "event", T: () => SFTPEvent }, + { no: 38, name: "agent_metadata_event", kind: "message", oneof: "event", T: () => AgentMetadataEvent }, + { no: 39, name: "resource_heartbeat", kind: "message", oneof: "event", T: () => ResourceHeartbeatEvent }, + { no: 40, name: "ui_discover_integration_aws_oidc_connect_event", kind: "message", oneof: "event", T: () => UIDiscoverIntegrationAWSOIDCConnectEvent }, + { no: 41, name: "ui_discover_database_rds_enroll_event", kind: "message", oneof: "event", T: () => UIDiscoverDatabaseRDSEnrollEvent }, + { no: 42, name: "ui_call_to_action_click_event", kind: "message", oneof: "event", T: () => UICallToActionClickEvent }, + { no: 43, name: "assist_completion", kind: "message", oneof: "event", T: () => AssistCompletionEvent }, + { no: 44, name: "ui_integration_enroll_start_event", kind: "message", oneof: "event", T: () => UIIntegrationEnrollStartEvent }, + { no: 45, name: "ui_integration_enroll_complete_event", kind: "message", oneof: "event", T: () => UIIntegrationEnrollCompleteEvent }, + { no: 46, name: "editor_change_event", kind: "message", oneof: "event", T: () => EditorChangeEvent }, + { no: 47, name: "bot_create", kind: "message", oneof: "event", T: () => BotCreateEvent }, + { no: 48, name: "ui_onboard_questionnaire_submit", kind: "message", oneof: "event", T: () => UIOnboardQuestionnaireSubmitEvent }, + { no: 49, name: "bot_join", kind: "message", oneof: "event", T: () => BotJoinEvent }, + { no: 50, name: "assist_execution", kind: "message", oneof: "event", T: () => AssistExecutionEvent }, + { no: 51, name: "assist_new_conversation", kind: "message", oneof: "event", T: () => AssistNewConversationEvent }, + { no: 52, name: "device_authenticate_event", kind: "message", oneof: "event", T: () => DeviceAuthenticateEvent }, + { no: 53, name: "feature_recommendation_event", kind: "message", oneof: "event", T: () => FeatureRecommendationEvent }, + { no: 54, name: "assist_access_request", kind: "message", oneof: "event", T: () => AssistAccessRequestEvent }, + { no: 55, name: "assist_action", kind: "message", oneof: "event", T: () => AssistActionEvent }, + { no: 56, name: "device_enroll_event", kind: "message", oneof: "event", T: () => DeviceEnrollEvent }, + { no: 57, name: "license_limit_event", kind: "message", oneof: "event", T: () => LicenseLimitEvent }, + { no: 58, name: "access_list_create", kind: "message", oneof: "event", T: () => AccessListCreateEvent }, + { no: 59, name: "access_list_update", kind: "message", oneof: "event", T: () => AccessListUpdateEvent }, + { no: 60, name: "access_list_delete", kind: "message", oneof: "event", T: () => AccessListDeleteEvent }, + { no: 61, name: "access_list_member_create", kind: "message", oneof: "event", T: () => AccessListMemberCreateEvent }, + { no: 62, name: "access_list_member_update", kind: "message", oneof: "event", T: () => AccessListMemberUpdateEvent }, + { no: 63, name: "access_list_member_delete", kind: "message", oneof: "event", T: () => AccessListMemberDeleteEvent }, + { no: 64, name: "access_list_grants_to_user", kind: "message", oneof: "event", T: () => AccessListGrantsToUserEvent }, + { no: 65, name: "ui_discover_ec2_instance_selection", kind: "message", oneof: "event", T: () => UIDiscoverEC2InstanceSelectionEvent }, + { no: 66, name: "ui_discover_deploy_eice", kind: "message", oneof: "event", T: () => UIDiscoverDeployEICEEvent }, + { no: 67, name: "ui_discover_create_node", kind: "message", oneof: "event", T: () => UIDiscoverCreateNodeEvent }, + { no: 68, name: "desktop_directory_share", kind: "message", oneof: "event", T: () => DesktopDirectoryShareEvent }, + { no: 69, name: "desktop_clipboard_transfer", kind: "message", oneof: "event", T: () => DesktopClipboardEvent }, + { no: 70, name: "tag_execute_query", kind: "message", oneof: "event", T: () => TAGExecuteQueryEvent }, + { no: 71, name: "external_audit_storage_authenticate", kind: "message", oneof: "event", T: () => ExternalAuditStorageAuthenticateEvent }, + { no: 72, name: "security_report_get_result", kind: "message", oneof: "event", T: () => SecurityReportGetResultEvent }, + { no: 73, name: "audit_query_run", kind: "message", oneof: "event", T: () => AuditQueryRunEvent }, + { no: 74, name: "discovery_fetch_event", kind: "message", oneof: "event", T: () => DiscoveryFetchEvent }, + { no: 75, name: "access_list_review_create", kind: "message", oneof: "event", T: () => AccessListReviewCreateEvent }, + { no: 76, name: "access_list_review_delete", kind: "message", oneof: "event", T: () => AccessListReviewDeleteEvent }, + { no: 77, name: "access_list_review_compliance", kind: "message", oneof: "event", T: () => AccessListReviewComplianceEvent }, + { no: 78, name: "mfa_authentication_event", kind: "message", oneof: "event", T: () => MFAAuthenticationEvent } + ]); + } + create(value?: PartialMessage): SubmitEventRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.clusterName = ""; + message.event = { oneofKind: undefined }; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitEventRequest): SubmitEventRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string cluster_name */ 1: + message.clusterName = reader.string(); + break; + case /* google.protobuf.Timestamp timestamp */ 2: + message.timestamp = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timestamp); + break; + case /* prehog.v1alpha.UserLoginEvent user_login */ 3: + message.event = { + oneofKind: "userLogin", + userLogin: UserLoginEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).userLogin) + }; + break; + case /* prehog.v1alpha.SSOCreateEvent sso_create */ 4: + message.event = { + oneofKind: "ssoCreate", + ssoCreate: SSOCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).ssoCreate) + }; + break; + case /* prehog.v1alpha.ResourceCreateEvent resource_create */ 5: + message.event = { + oneofKind: "resourceCreate", + resourceCreate: ResourceCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).resourceCreate) + }; + break; + case /* prehog.v1alpha.SessionStartEvent session_start */ 6: + message.event = { + oneofKind: "sessionStart", + sessionStart: SessionStartEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).sessionStart) + }; + break; + case /* prehog.v1alpha.UIBannerClickEvent ui_banner_click */ 7: + message.event = { + oneofKind: "uiBannerClick", + uiBannerClick: UIBannerClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiBannerClick) + }; + break; + case /* prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent ui_onboard_complete_go_to_dashboard_click */ 9: + message.event = { + oneofKind: "uiOnboardCompleteGoToDashboardClick", + uiOnboardCompleteGoToDashboardClick: UIOnboardCompleteGoToDashboardClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiOnboardCompleteGoToDashboardClick) + }; + break; + case /* prehog.v1alpha.UIOnboardAddFirstResourceClickEvent ui_onboard_add_first_resource_click */ 10: + message.event = { + oneofKind: "uiOnboardAddFirstResourceClick", + uiOnboardAddFirstResourceClick: UIOnboardAddFirstResourceClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiOnboardAddFirstResourceClick) + }; + break; + case /* prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent ui_onboard_add_first_resource_later_click */ 11: + message.event = { + oneofKind: "uiOnboardAddFirstResourceLaterClick", + uiOnboardAddFirstResourceLaterClick: UIOnboardAddFirstResourceLaterClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiOnboardAddFirstResourceLaterClick) + }; + break; + case /* prehog.v1alpha.UIOnboardSetCredentialSubmitEvent ui_onboard_set_credential_submit */ 12: + message.event = { + oneofKind: "uiOnboardSetCredentialSubmit", + uiOnboardSetCredentialSubmit: UIOnboardSetCredentialSubmitEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiOnboardSetCredentialSubmit) + }; + break; + case /* prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent ui_onboard_register_challenge_submit */ 13: + message.event = { + oneofKind: "uiOnboardRegisterChallengeSubmit", + uiOnboardRegisterChallengeSubmit: UIOnboardRegisterChallengeSubmitEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiOnboardRegisterChallengeSubmit) + }; + break; + case /* prehog.v1alpha.UIRecoveryCodesContinueClickEvent ui_recovery_codes_continue_click */ 14: + message.event = { + oneofKind: "uiRecoveryCodesContinueClick", + uiRecoveryCodesContinueClick: UIRecoveryCodesContinueClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiRecoveryCodesContinueClick) + }; + break; + case /* prehog.v1alpha.UIRecoveryCodesCopyClickEvent ui_recovery_codes_copy_click */ 15: + message.event = { + oneofKind: "uiRecoveryCodesCopyClick", + uiRecoveryCodesCopyClick: UIRecoveryCodesCopyClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiRecoveryCodesCopyClick) + }; + break; + case /* prehog.v1alpha.UIRecoveryCodesPrintClickEvent ui_recovery_codes_print_click */ 16: + message.event = { + oneofKind: "uiRecoveryCodesPrintClick", + uiRecoveryCodesPrintClick: UIRecoveryCodesPrintClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiRecoveryCodesPrintClick) + }; + break; + case /* prehog.v1alpha.UIDiscoverStartedEvent ui_discover_started_event */ 17: + message.event = { + oneofKind: "uiDiscoverStartedEvent", + uiDiscoverStartedEvent: UIDiscoverStartedEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverStartedEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverResourceSelectionEvent ui_discover_resource_selection_event */ 18: + message.event = { + oneofKind: "uiDiscoverResourceSelectionEvent", + uiDiscoverResourceSelectionEvent: UIDiscoverResourceSelectionEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverResourceSelectionEvent) + }; + break; + case /* prehog.v1alpha.UserCertificateIssuedEvent user_certificate_issued_event */ 19: + message.event = { + oneofKind: "userCertificateIssuedEvent", + userCertificateIssuedEvent: UserCertificateIssuedEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).userCertificateIssuedEvent) + }; + break; + case /* prehog.v1alpha.SessionStartEvent session_start_v2 */ 20: + message.event = { + oneofKind: "sessionStartV2", + sessionStartV2: SessionStartEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).sessionStartV2) + }; + break; + case /* prehog.v1alpha.UIDiscoverDeployServiceEvent ui_discover_deploy_service_event */ 21: + message.event = { + oneofKind: "uiDiscoverDeployServiceEvent", + uiDiscoverDeployServiceEvent: UIDiscoverDeployServiceEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDeployServiceEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverDatabaseRegisterEvent ui_discover_database_register_event */ 22: + message.event = { + oneofKind: "uiDiscoverDatabaseRegisterEvent", + uiDiscoverDatabaseRegisterEvent: UIDiscoverDatabaseRegisterEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDatabaseRegisterEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverDatabaseConfigureMTLSEvent ui_discover_database_configure_mtls_event */ 23: + message.event = { + oneofKind: "uiDiscoverDatabaseConfigureMtlsEvent", + uiDiscoverDatabaseConfigureMtlsEvent: UIDiscoverDatabaseConfigureMTLSEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDatabaseConfigureMtlsEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverDesktopActiveDirectoryToolsInstallEvent ui_discover_desktop_active_directory_tools_install_event */ 24: + message.event = { + oneofKind: "uiDiscoverDesktopActiveDirectoryToolsInstallEvent", + uiDiscoverDesktopActiveDirectoryToolsInstallEvent: UIDiscoverDesktopActiveDirectoryToolsInstallEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDesktopActiveDirectoryToolsInstallEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverDesktopActiveDirectoryConfigureEvent ui_discover_desktop_active_directory_configure_event */ 25: + message.event = { + oneofKind: "uiDiscoverDesktopActiveDirectoryConfigureEvent", + uiDiscoverDesktopActiveDirectoryConfigureEvent: UIDiscoverDesktopActiveDirectoryConfigureEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDesktopActiveDirectoryConfigureEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverAutoDiscoveredResourcesEvent ui_discover_auto_discovered_resources_event */ 26: + message.event = { + oneofKind: "uiDiscoverAutoDiscoveredResourcesEvent", + uiDiscoverAutoDiscoveredResourcesEvent: UIDiscoverAutoDiscoveredResourcesEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverAutoDiscoveredResourcesEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverDatabaseConfigureIAMPolicyEvent ui_discover_database_configure_iam_policy_event */ 27: + message.event = { + oneofKind: "uiDiscoverDatabaseConfigureIamPolicyEvent", + uiDiscoverDatabaseConfigureIamPolicyEvent: UIDiscoverDatabaseConfigureIAMPolicyEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDatabaseConfigureIamPolicyEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverPrincipalsConfigureEvent ui_discover_principals_configure_event */ 28: + message.event = { + oneofKind: "uiDiscoverPrincipalsConfigureEvent", + uiDiscoverPrincipalsConfigureEvent: UIDiscoverPrincipalsConfigureEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverPrincipalsConfigureEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverTestConnectionEvent ui_discover_test_connection_event */ 29: + message.event = { + oneofKind: "uiDiscoverTestConnectionEvent", + uiDiscoverTestConnectionEvent: UIDiscoverTestConnectionEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverTestConnectionEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverCompletedEvent ui_discover_completed_event */ 30: + message.event = { + oneofKind: "uiDiscoverCompletedEvent", + uiDiscoverCompletedEvent: UIDiscoverCompletedEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverCompletedEvent) + }; + break; + case /* prehog.v1alpha.RoleCreateEvent role_create */ 31: + message.event = { + oneofKind: "roleCreate", + roleCreate: RoleCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).roleCreate) + }; + break; + case /* prehog.v1alpha.UICreateNewRoleClickEvent ui_create_new_role_click */ 32: + message.event = { + oneofKind: "uiCreateNewRoleClick", + uiCreateNewRoleClick: UICreateNewRoleClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiCreateNewRoleClick) + }; + break; + case /* prehog.v1alpha.UICreateNewRoleSaveClickEvent ui_create_new_role_save_click */ 33: + message.event = { + oneofKind: "uiCreateNewRoleSaveClick", + uiCreateNewRoleSaveClick: UICreateNewRoleSaveClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiCreateNewRoleSaveClick) + }; + break; + case /* prehog.v1alpha.UICreateNewRoleCancelClickEvent ui_create_new_role_cancel_click */ 34: + message.event = { + oneofKind: "uiCreateNewRoleCancelClick", + uiCreateNewRoleCancelClick: UICreateNewRoleCancelClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiCreateNewRoleCancelClick) + }; + break; + case /* prehog.v1alpha.UICreateNewRoleViewDocumentationClickEvent ui_create_new_role_view_documentation_click */ 35: + message.event = { + oneofKind: "uiCreateNewRoleViewDocumentationClick", + uiCreateNewRoleViewDocumentationClick: UICreateNewRoleViewDocumentationClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiCreateNewRoleViewDocumentationClick) + }; + break; + case /* prehog.v1alpha.KubeRequestEvent kube_request */ 36: + message.event = { + oneofKind: "kubeRequest", + kubeRequest: KubeRequestEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).kubeRequest) + }; + break; + case /* prehog.v1alpha.SFTPEvent sftp */ 37: + message.event = { + oneofKind: "sftp", + sftp: SFTPEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).sftp) + }; + break; + case /* prehog.v1alpha.AgentMetadataEvent agent_metadata_event */ 38: + message.event = { + oneofKind: "agentMetadataEvent", + agentMetadataEvent: AgentMetadataEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).agentMetadataEvent) + }; + break; + case /* prehog.v1alpha.ResourceHeartbeatEvent resource_heartbeat */ 39: + message.event = { + oneofKind: "resourceHeartbeat", + resourceHeartbeat: ResourceHeartbeatEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).resourceHeartbeat) + }; + break; + case /* prehog.v1alpha.UIDiscoverIntegrationAWSOIDCConnectEvent ui_discover_integration_aws_oidc_connect_event */ 40: + message.event = { + oneofKind: "uiDiscoverIntegrationAwsOidcConnectEvent", + uiDiscoverIntegrationAwsOidcConnectEvent: UIDiscoverIntegrationAWSOIDCConnectEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverIntegrationAwsOidcConnectEvent) + }; + break; + case /* prehog.v1alpha.UIDiscoverDatabaseRDSEnrollEvent ui_discover_database_rds_enroll_event */ 41: + message.event = { + oneofKind: "uiDiscoverDatabaseRdsEnrollEvent", + uiDiscoverDatabaseRdsEnrollEvent: UIDiscoverDatabaseRDSEnrollEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDatabaseRdsEnrollEvent) + }; + break; + case /* prehog.v1alpha.UICallToActionClickEvent ui_call_to_action_click_event */ 42: + message.event = { + oneofKind: "uiCallToActionClickEvent", + uiCallToActionClickEvent: UICallToActionClickEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiCallToActionClickEvent) + }; + break; + case /* prehog.v1alpha.AssistCompletionEvent assist_completion */ 43: + message.event = { + oneofKind: "assistCompletion", + assistCompletion: AssistCompletionEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).assistCompletion) + }; + break; + case /* prehog.v1alpha.UIIntegrationEnrollStartEvent ui_integration_enroll_start_event */ 44: + message.event = { + oneofKind: "uiIntegrationEnrollStartEvent", + uiIntegrationEnrollStartEvent: UIIntegrationEnrollStartEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiIntegrationEnrollStartEvent) + }; + break; + case /* prehog.v1alpha.UIIntegrationEnrollCompleteEvent ui_integration_enroll_complete_event */ 45: + message.event = { + oneofKind: "uiIntegrationEnrollCompleteEvent", + uiIntegrationEnrollCompleteEvent: UIIntegrationEnrollCompleteEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiIntegrationEnrollCompleteEvent) + }; + break; + case /* prehog.v1alpha.EditorChangeEvent editor_change_event */ 46: + message.event = { + oneofKind: "editorChangeEvent", + editorChangeEvent: EditorChangeEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).editorChangeEvent) + }; + break; + case /* prehog.v1alpha.BotCreateEvent bot_create */ 47: + message.event = { + oneofKind: "botCreate", + botCreate: BotCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).botCreate) + }; + break; + case /* prehog.v1alpha.UIOnboardQuestionnaireSubmitEvent ui_onboard_questionnaire_submit */ 48: + message.event = { + oneofKind: "uiOnboardQuestionnaireSubmit", + uiOnboardQuestionnaireSubmit: UIOnboardQuestionnaireSubmitEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiOnboardQuestionnaireSubmit) + }; + break; + case /* prehog.v1alpha.BotJoinEvent bot_join */ 49: + message.event = { + oneofKind: "botJoin", + botJoin: BotJoinEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).botJoin) + }; + break; + case /* prehog.v1alpha.AssistExecutionEvent assist_execution */ 50: + message.event = { + oneofKind: "assistExecution", + assistExecution: AssistExecutionEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).assistExecution) + }; + break; + case /* prehog.v1alpha.AssistNewConversationEvent assist_new_conversation */ 51: + message.event = { + oneofKind: "assistNewConversation", + assistNewConversation: AssistNewConversationEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).assistNewConversation) + }; + break; + case /* prehog.v1alpha.DeviceAuthenticateEvent device_authenticate_event */ 52: + message.event = { + oneofKind: "deviceAuthenticateEvent", + deviceAuthenticateEvent: DeviceAuthenticateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).deviceAuthenticateEvent) + }; + break; + case /* prehog.v1alpha.FeatureRecommendationEvent feature_recommendation_event */ 53: + message.event = { + oneofKind: "featureRecommendationEvent", + featureRecommendationEvent: FeatureRecommendationEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).featureRecommendationEvent) + }; + break; + case /* prehog.v1alpha.AssistAccessRequestEvent assist_access_request */ 54: + message.event = { + oneofKind: "assistAccessRequest", + assistAccessRequest: AssistAccessRequestEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).assistAccessRequest) + }; + break; + case /* prehog.v1alpha.AssistActionEvent assist_action */ 55: + message.event = { + oneofKind: "assistAction", + assistAction: AssistActionEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).assistAction) + }; + break; + case /* prehog.v1alpha.DeviceEnrollEvent device_enroll_event */ 56: + message.event = { + oneofKind: "deviceEnrollEvent", + deviceEnrollEvent: DeviceEnrollEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).deviceEnrollEvent) + }; + break; + case /* prehog.v1alpha.LicenseLimitEvent license_limit_event */ 57: + message.event = { + oneofKind: "licenseLimitEvent", + licenseLimitEvent: LicenseLimitEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).licenseLimitEvent) + }; + break; + case /* prehog.v1alpha.AccessListCreateEvent access_list_create */ 58: + message.event = { + oneofKind: "accessListCreate", + accessListCreate: AccessListCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListCreate) + }; + break; + case /* prehog.v1alpha.AccessListUpdateEvent access_list_update */ 59: + message.event = { + oneofKind: "accessListUpdate", + accessListUpdate: AccessListUpdateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListUpdate) + }; + break; + case /* prehog.v1alpha.AccessListDeleteEvent access_list_delete */ 60: + message.event = { + oneofKind: "accessListDelete", + accessListDelete: AccessListDeleteEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListDelete) + }; + break; + case /* prehog.v1alpha.AccessListMemberCreateEvent access_list_member_create */ 61: + message.event = { + oneofKind: "accessListMemberCreate", + accessListMemberCreate: AccessListMemberCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListMemberCreate) + }; + break; + case /* prehog.v1alpha.AccessListMemberUpdateEvent access_list_member_update */ 62: + message.event = { + oneofKind: "accessListMemberUpdate", + accessListMemberUpdate: AccessListMemberUpdateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListMemberUpdate) + }; + break; + case /* prehog.v1alpha.AccessListMemberDeleteEvent access_list_member_delete */ 63: + message.event = { + oneofKind: "accessListMemberDelete", + accessListMemberDelete: AccessListMemberDeleteEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListMemberDelete) + }; + break; + case /* prehog.v1alpha.AccessListGrantsToUserEvent access_list_grants_to_user */ 64: + message.event = { + oneofKind: "accessListGrantsToUser", + accessListGrantsToUser: AccessListGrantsToUserEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListGrantsToUser) + }; + break; + case /* prehog.v1alpha.UIDiscoverEC2InstanceSelectionEvent ui_discover_ec2_instance_selection */ 65: + message.event = { + oneofKind: "uiDiscoverEc2InstanceSelection", + uiDiscoverEc2InstanceSelection: UIDiscoverEC2InstanceSelectionEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverEc2InstanceSelection) + }; + break; + case /* prehog.v1alpha.UIDiscoverDeployEICEEvent ui_discover_deploy_eice */ 66: + message.event = { + oneofKind: "uiDiscoverDeployEice", + uiDiscoverDeployEice: UIDiscoverDeployEICEEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverDeployEice) + }; + break; + case /* prehog.v1alpha.UIDiscoverCreateNodeEvent ui_discover_create_node */ 67: + message.event = { + oneofKind: "uiDiscoverCreateNode", + uiDiscoverCreateNode: UIDiscoverCreateNodeEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).uiDiscoverCreateNode) + }; + break; + case /* prehog.v1alpha.DesktopDirectoryShareEvent desktop_directory_share */ 68: + message.event = { + oneofKind: "desktopDirectoryShare", + desktopDirectoryShare: DesktopDirectoryShareEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).desktopDirectoryShare) + }; + break; + case /* prehog.v1alpha.DesktopClipboardEvent desktop_clipboard_transfer */ 69: + message.event = { + oneofKind: "desktopClipboardTransfer", + desktopClipboardTransfer: DesktopClipboardEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).desktopClipboardTransfer) + }; + break; + case /* prehog.v1alpha.TAGExecuteQueryEvent tag_execute_query */ 70: + message.event = { + oneofKind: "tagExecuteQuery", + tagExecuteQuery: TAGExecuteQueryEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).tagExecuteQuery) + }; + break; + case /* prehog.v1alpha.ExternalAuditStorageAuthenticateEvent external_audit_storage_authenticate */ 71: + message.event = { + oneofKind: "externalAuditStorageAuthenticate", + externalAuditStorageAuthenticate: ExternalAuditStorageAuthenticateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).externalAuditStorageAuthenticate) + }; + break; + case /* prehog.v1alpha.SecurityReportGetResultEvent security_report_get_result */ 72: + message.event = { + oneofKind: "securityReportGetResult", + securityReportGetResult: SecurityReportGetResultEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).securityReportGetResult) + }; + break; + case /* prehog.v1alpha.AuditQueryRunEvent audit_query_run */ 73: + message.event = { + oneofKind: "auditQueryRun", + auditQueryRun: AuditQueryRunEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).auditQueryRun) + }; + break; + case /* prehog.v1alpha.DiscoveryFetchEvent discovery_fetch_event */ 74: + message.event = { + oneofKind: "discoveryFetchEvent", + discoveryFetchEvent: DiscoveryFetchEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).discoveryFetchEvent) + }; + break; + case /* prehog.v1alpha.AccessListReviewCreateEvent access_list_review_create */ 75: + message.event = { + oneofKind: "accessListReviewCreate", + accessListReviewCreate: AccessListReviewCreateEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListReviewCreate) + }; + break; + case /* prehog.v1alpha.AccessListReviewDeleteEvent access_list_review_delete */ 76: + message.event = { + oneofKind: "accessListReviewDelete", + accessListReviewDelete: AccessListReviewDeleteEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListReviewDelete) + }; + break; + case /* prehog.v1alpha.AccessListReviewComplianceEvent access_list_review_compliance */ 77: + message.event = { + oneofKind: "accessListReviewCompliance", + accessListReviewCompliance: AccessListReviewComplianceEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).accessListReviewCompliance) + }; + break; + case /* prehog.v1alpha.MFAAuthenticationEvent mfa_authentication_event */ 78: + message.event = { + oneofKind: "mfaAuthenticationEvent", + mfaAuthenticationEvent: MFAAuthenticationEvent.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).mfaAuthenticationEvent) + }; + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SubmitEventRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string cluster_name = 1; */ + if (message.clusterName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.clusterName); + /* google.protobuf.Timestamp timestamp = 2; */ + if (message.timestamp) + Timestamp.internalBinaryWrite(message.timestamp, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UserLoginEvent user_login = 3; */ + if (message.event.oneofKind === "userLogin") + UserLoginEvent.internalBinaryWrite(message.event.userLogin, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.SSOCreateEvent sso_create = 4; */ + if (message.event.oneofKind === "ssoCreate") + SSOCreateEvent.internalBinaryWrite(message.event.ssoCreate, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ResourceCreateEvent resource_create = 5; */ + if (message.event.oneofKind === "resourceCreate") + ResourceCreateEvent.internalBinaryWrite(message.event.resourceCreate, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.SessionStartEvent session_start = 6; */ + if (message.event.oneofKind === "sessionStart") + SessionStartEvent.internalBinaryWrite(message.event.sessionStart, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIBannerClickEvent ui_banner_click = 7; */ + if (message.event.oneofKind === "uiBannerClick") + UIBannerClickEvent.internalBinaryWrite(message.event.uiBannerClick, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent ui_onboard_complete_go_to_dashboard_click = 9; */ + if (message.event.oneofKind === "uiOnboardCompleteGoToDashboardClick") + UIOnboardCompleteGoToDashboardClickEvent.internalBinaryWrite(message.event.uiOnboardCompleteGoToDashboardClick, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIOnboardAddFirstResourceClickEvent ui_onboard_add_first_resource_click = 10; */ + if (message.event.oneofKind === "uiOnboardAddFirstResourceClick") + UIOnboardAddFirstResourceClickEvent.internalBinaryWrite(message.event.uiOnboardAddFirstResourceClick, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent ui_onboard_add_first_resource_later_click = 11; */ + if (message.event.oneofKind === "uiOnboardAddFirstResourceLaterClick") + UIOnboardAddFirstResourceLaterClickEvent.internalBinaryWrite(message.event.uiOnboardAddFirstResourceLaterClick, writer.tag(11, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIOnboardSetCredentialSubmitEvent ui_onboard_set_credential_submit = 12; */ + if (message.event.oneofKind === "uiOnboardSetCredentialSubmit") + UIOnboardSetCredentialSubmitEvent.internalBinaryWrite(message.event.uiOnboardSetCredentialSubmit, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent ui_onboard_register_challenge_submit = 13; */ + if (message.event.oneofKind === "uiOnboardRegisterChallengeSubmit") + UIOnboardRegisterChallengeSubmitEvent.internalBinaryWrite(message.event.uiOnboardRegisterChallengeSubmit, writer.tag(13, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIRecoveryCodesContinueClickEvent ui_recovery_codes_continue_click = 14; */ + if (message.event.oneofKind === "uiRecoveryCodesContinueClick") + UIRecoveryCodesContinueClickEvent.internalBinaryWrite(message.event.uiRecoveryCodesContinueClick, writer.tag(14, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIRecoveryCodesCopyClickEvent ui_recovery_codes_copy_click = 15; */ + if (message.event.oneofKind === "uiRecoveryCodesCopyClick") + UIRecoveryCodesCopyClickEvent.internalBinaryWrite(message.event.uiRecoveryCodesCopyClick, writer.tag(15, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIRecoveryCodesPrintClickEvent ui_recovery_codes_print_click = 16; */ + if (message.event.oneofKind === "uiRecoveryCodesPrintClick") + UIRecoveryCodesPrintClickEvent.internalBinaryWrite(message.event.uiRecoveryCodesPrintClick, writer.tag(16, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverStartedEvent ui_discover_started_event = 17; */ + if (message.event.oneofKind === "uiDiscoverStartedEvent") + UIDiscoverStartedEvent.internalBinaryWrite(message.event.uiDiscoverStartedEvent, writer.tag(17, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverResourceSelectionEvent ui_discover_resource_selection_event = 18; */ + if (message.event.oneofKind === "uiDiscoverResourceSelectionEvent") + UIDiscoverResourceSelectionEvent.internalBinaryWrite(message.event.uiDiscoverResourceSelectionEvent, writer.tag(18, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UserCertificateIssuedEvent user_certificate_issued_event = 19; */ + if (message.event.oneofKind === "userCertificateIssuedEvent") + UserCertificateIssuedEvent.internalBinaryWrite(message.event.userCertificateIssuedEvent, writer.tag(19, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.SessionStartEvent session_start_v2 = 20; */ + if (message.event.oneofKind === "sessionStartV2") + SessionStartEvent.internalBinaryWrite(message.event.sessionStartV2, writer.tag(20, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDeployServiceEvent ui_discover_deploy_service_event = 21; */ + if (message.event.oneofKind === "uiDiscoverDeployServiceEvent") + UIDiscoverDeployServiceEvent.internalBinaryWrite(message.event.uiDiscoverDeployServiceEvent, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDatabaseRegisterEvent ui_discover_database_register_event = 22; */ + if (message.event.oneofKind === "uiDiscoverDatabaseRegisterEvent") + UIDiscoverDatabaseRegisterEvent.internalBinaryWrite(message.event.uiDiscoverDatabaseRegisterEvent, writer.tag(22, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDatabaseConfigureMTLSEvent ui_discover_database_configure_mtls_event = 23; */ + if (message.event.oneofKind === "uiDiscoverDatabaseConfigureMtlsEvent") + UIDiscoverDatabaseConfigureMTLSEvent.internalBinaryWrite(message.event.uiDiscoverDatabaseConfigureMtlsEvent, writer.tag(23, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDesktopActiveDirectoryToolsInstallEvent ui_discover_desktop_active_directory_tools_install_event = 24; */ + if (message.event.oneofKind === "uiDiscoverDesktopActiveDirectoryToolsInstallEvent") + UIDiscoverDesktopActiveDirectoryToolsInstallEvent.internalBinaryWrite(message.event.uiDiscoverDesktopActiveDirectoryToolsInstallEvent, writer.tag(24, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDesktopActiveDirectoryConfigureEvent ui_discover_desktop_active_directory_configure_event = 25; */ + if (message.event.oneofKind === "uiDiscoverDesktopActiveDirectoryConfigureEvent") + UIDiscoverDesktopActiveDirectoryConfigureEvent.internalBinaryWrite(message.event.uiDiscoverDesktopActiveDirectoryConfigureEvent, writer.tag(25, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverAutoDiscoveredResourcesEvent ui_discover_auto_discovered_resources_event = 26; */ + if (message.event.oneofKind === "uiDiscoverAutoDiscoveredResourcesEvent") + UIDiscoverAutoDiscoveredResourcesEvent.internalBinaryWrite(message.event.uiDiscoverAutoDiscoveredResourcesEvent, writer.tag(26, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDatabaseConfigureIAMPolicyEvent ui_discover_database_configure_iam_policy_event = 27; */ + if (message.event.oneofKind === "uiDiscoverDatabaseConfigureIamPolicyEvent") + UIDiscoverDatabaseConfigureIAMPolicyEvent.internalBinaryWrite(message.event.uiDiscoverDatabaseConfigureIamPolicyEvent, writer.tag(27, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverPrincipalsConfigureEvent ui_discover_principals_configure_event = 28; */ + if (message.event.oneofKind === "uiDiscoverPrincipalsConfigureEvent") + UIDiscoverPrincipalsConfigureEvent.internalBinaryWrite(message.event.uiDiscoverPrincipalsConfigureEvent, writer.tag(28, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverTestConnectionEvent ui_discover_test_connection_event = 29; */ + if (message.event.oneofKind === "uiDiscoverTestConnectionEvent") + UIDiscoverTestConnectionEvent.internalBinaryWrite(message.event.uiDiscoverTestConnectionEvent, writer.tag(29, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverCompletedEvent ui_discover_completed_event = 30; */ + if (message.event.oneofKind === "uiDiscoverCompletedEvent") + UIDiscoverCompletedEvent.internalBinaryWrite(message.event.uiDiscoverCompletedEvent, writer.tag(30, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.RoleCreateEvent role_create = 31; */ + if (message.event.oneofKind === "roleCreate") + RoleCreateEvent.internalBinaryWrite(message.event.roleCreate, writer.tag(31, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UICreateNewRoleClickEvent ui_create_new_role_click = 32; */ + if (message.event.oneofKind === "uiCreateNewRoleClick") + UICreateNewRoleClickEvent.internalBinaryWrite(message.event.uiCreateNewRoleClick, writer.tag(32, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UICreateNewRoleSaveClickEvent ui_create_new_role_save_click = 33; */ + if (message.event.oneofKind === "uiCreateNewRoleSaveClick") + UICreateNewRoleSaveClickEvent.internalBinaryWrite(message.event.uiCreateNewRoleSaveClick, writer.tag(33, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UICreateNewRoleCancelClickEvent ui_create_new_role_cancel_click = 34; */ + if (message.event.oneofKind === "uiCreateNewRoleCancelClick") + UICreateNewRoleCancelClickEvent.internalBinaryWrite(message.event.uiCreateNewRoleCancelClick, writer.tag(34, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UICreateNewRoleViewDocumentationClickEvent ui_create_new_role_view_documentation_click = 35; */ + if (message.event.oneofKind === "uiCreateNewRoleViewDocumentationClick") + UICreateNewRoleViewDocumentationClickEvent.internalBinaryWrite(message.event.uiCreateNewRoleViewDocumentationClick, writer.tag(35, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.KubeRequestEvent kube_request = 36; */ + if (message.event.oneofKind === "kubeRequest") + KubeRequestEvent.internalBinaryWrite(message.event.kubeRequest, writer.tag(36, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.SFTPEvent sftp = 37; */ + if (message.event.oneofKind === "sftp") + SFTPEvent.internalBinaryWrite(message.event.sftp, writer.tag(37, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AgentMetadataEvent agent_metadata_event = 38; */ + if (message.event.oneofKind === "agentMetadataEvent") + AgentMetadataEvent.internalBinaryWrite(message.event.agentMetadataEvent, writer.tag(38, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ResourceHeartbeatEvent resource_heartbeat = 39; */ + if (message.event.oneofKind === "resourceHeartbeat") + ResourceHeartbeatEvent.internalBinaryWrite(message.event.resourceHeartbeat, writer.tag(39, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverIntegrationAWSOIDCConnectEvent ui_discover_integration_aws_oidc_connect_event = 40; */ + if (message.event.oneofKind === "uiDiscoverIntegrationAwsOidcConnectEvent") + UIDiscoverIntegrationAWSOIDCConnectEvent.internalBinaryWrite(message.event.uiDiscoverIntegrationAwsOidcConnectEvent, writer.tag(40, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDatabaseRDSEnrollEvent ui_discover_database_rds_enroll_event = 41; */ + if (message.event.oneofKind === "uiDiscoverDatabaseRdsEnrollEvent") + UIDiscoverDatabaseRDSEnrollEvent.internalBinaryWrite(message.event.uiDiscoverDatabaseRdsEnrollEvent, writer.tag(41, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UICallToActionClickEvent ui_call_to_action_click_event = 42; */ + if (message.event.oneofKind === "uiCallToActionClickEvent") + UICallToActionClickEvent.internalBinaryWrite(message.event.uiCallToActionClickEvent, writer.tag(42, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AssistCompletionEvent assist_completion = 43; */ + if (message.event.oneofKind === "assistCompletion") + AssistCompletionEvent.internalBinaryWrite(message.event.assistCompletion, writer.tag(43, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIIntegrationEnrollStartEvent ui_integration_enroll_start_event = 44; */ + if (message.event.oneofKind === "uiIntegrationEnrollStartEvent") + UIIntegrationEnrollStartEvent.internalBinaryWrite(message.event.uiIntegrationEnrollStartEvent, writer.tag(44, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIIntegrationEnrollCompleteEvent ui_integration_enroll_complete_event = 45; */ + if (message.event.oneofKind === "uiIntegrationEnrollCompleteEvent") + UIIntegrationEnrollCompleteEvent.internalBinaryWrite(message.event.uiIntegrationEnrollCompleteEvent, writer.tag(45, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.EditorChangeEvent editor_change_event = 46; */ + if (message.event.oneofKind === "editorChangeEvent") + EditorChangeEvent.internalBinaryWrite(message.event.editorChangeEvent, writer.tag(46, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.BotCreateEvent bot_create = 47; */ + if (message.event.oneofKind === "botCreate") + BotCreateEvent.internalBinaryWrite(message.event.botCreate, writer.tag(47, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIOnboardQuestionnaireSubmitEvent ui_onboard_questionnaire_submit = 48; */ + if (message.event.oneofKind === "uiOnboardQuestionnaireSubmit") + UIOnboardQuestionnaireSubmitEvent.internalBinaryWrite(message.event.uiOnboardQuestionnaireSubmit, writer.tag(48, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.BotJoinEvent bot_join = 49; */ + if (message.event.oneofKind === "botJoin") + BotJoinEvent.internalBinaryWrite(message.event.botJoin, writer.tag(49, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AssistExecutionEvent assist_execution = 50; */ + if (message.event.oneofKind === "assistExecution") + AssistExecutionEvent.internalBinaryWrite(message.event.assistExecution, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AssistNewConversationEvent assist_new_conversation = 51; */ + if (message.event.oneofKind === "assistNewConversation") + AssistNewConversationEvent.internalBinaryWrite(message.event.assistNewConversation, writer.tag(51, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DeviceAuthenticateEvent device_authenticate_event = 52; */ + if (message.event.oneofKind === "deviceAuthenticateEvent") + DeviceAuthenticateEvent.internalBinaryWrite(message.event.deviceAuthenticateEvent, writer.tag(52, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.FeatureRecommendationEvent feature_recommendation_event = 53; */ + if (message.event.oneofKind === "featureRecommendationEvent") + FeatureRecommendationEvent.internalBinaryWrite(message.event.featureRecommendationEvent, writer.tag(53, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AssistAccessRequestEvent assist_access_request = 54; */ + if (message.event.oneofKind === "assistAccessRequest") + AssistAccessRequestEvent.internalBinaryWrite(message.event.assistAccessRequest, writer.tag(54, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AssistActionEvent assist_action = 55; */ + if (message.event.oneofKind === "assistAction") + AssistActionEvent.internalBinaryWrite(message.event.assistAction, writer.tag(55, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DeviceEnrollEvent device_enroll_event = 56; */ + if (message.event.oneofKind === "deviceEnrollEvent") + DeviceEnrollEvent.internalBinaryWrite(message.event.deviceEnrollEvent, writer.tag(56, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.LicenseLimitEvent license_limit_event = 57; */ + if (message.event.oneofKind === "licenseLimitEvent") + LicenseLimitEvent.internalBinaryWrite(message.event.licenseLimitEvent, writer.tag(57, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListCreateEvent access_list_create = 58; */ + if (message.event.oneofKind === "accessListCreate") + AccessListCreateEvent.internalBinaryWrite(message.event.accessListCreate, writer.tag(58, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListUpdateEvent access_list_update = 59; */ + if (message.event.oneofKind === "accessListUpdate") + AccessListUpdateEvent.internalBinaryWrite(message.event.accessListUpdate, writer.tag(59, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListDeleteEvent access_list_delete = 60; */ + if (message.event.oneofKind === "accessListDelete") + AccessListDeleteEvent.internalBinaryWrite(message.event.accessListDelete, writer.tag(60, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListMemberCreateEvent access_list_member_create = 61; */ + if (message.event.oneofKind === "accessListMemberCreate") + AccessListMemberCreateEvent.internalBinaryWrite(message.event.accessListMemberCreate, writer.tag(61, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListMemberUpdateEvent access_list_member_update = 62; */ + if (message.event.oneofKind === "accessListMemberUpdate") + AccessListMemberUpdateEvent.internalBinaryWrite(message.event.accessListMemberUpdate, writer.tag(62, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListMemberDeleteEvent access_list_member_delete = 63; */ + if (message.event.oneofKind === "accessListMemberDelete") + AccessListMemberDeleteEvent.internalBinaryWrite(message.event.accessListMemberDelete, writer.tag(63, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListGrantsToUserEvent access_list_grants_to_user = 64; */ + if (message.event.oneofKind === "accessListGrantsToUser") + AccessListGrantsToUserEvent.internalBinaryWrite(message.event.accessListGrantsToUser, writer.tag(64, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverEC2InstanceSelectionEvent ui_discover_ec2_instance_selection = 65; */ + if (message.event.oneofKind === "uiDiscoverEc2InstanceSelection") + UIDiscoverEC2InstanceSelectionEvent.internalBinaryWrite(message.event.uiDiscoverEc2InstanceSelection, writer.tag(65, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverDeployEICEEvent ui_discover_deploy_eice = 66; */ + if (message.event.oneofKind === "uiDiscoverDeployEice") + UIDiscoverDeployEICEEvent.internalBinaryWrite(message.event.uiDiscoverDeployEice, writer.tag(66, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.UIDiscoverCreateNodeEvent ui_discover_create_node = 67; */ + if (message.event.oneofKind === "uiDiscoverCreateNode") + UIDiscoverCreateNodeEvent.internalBinaryWrite(message.event.uiDiscoverCreateNode, writer.tag(67, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DesktopDirectoryShareEvent desktop_directory_share = 68; */ + if (message.event.oneofKind === "desktopDirectoryShare") + DesktopDirectoryShareEvent.internalBinaryWrite(message.event.desktopDirectoryShare, writer.tag(68, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DesktopClipboardEvent desktop_clipboard_transfer = 69; */ + if (message.event.oneofKind === "desktopClipboardTransfer") + DesktopClipboardEvent.internalBinaryWrite(message.event.desktopClipboardTransfer, writer.tag(69, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.TAGExecuteQueryEvent tag_execute_query = 70; */ + if (message.event.oneofKind === "tagExecuteQuery") + TAGExecuteQueryEvent.internalBinaryWrite(message.event.tagExecuteQuery, writer.tag(70, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.ExternalAuditStorageAuthenticateEvent external_audit_storage_authenticate = 71; */ + if (message.event.oneofKind === "externalAuditStorageAuthenticate") + ExternalAuditStorageAuthenticateEvent.internalBinaryWrite(message.event.externalAuditStorageAuthenticate, writer.tag(71, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.SecurityReportGetResultEvent security_report_get_result = 72; */ + if (message.event.oneofKind === "securityReportGetResult") + SecurityReportGetResultEvent.internalBinaryWrite(message.event.securityReportGetResult, writer.tag(72, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AuditQueryRunEvent audit_query_run = 73; */ + if (message.event.oneofKind === "auditQueryRun") + AuditQueryRunEvent.internalBinaryWrite(message.event.auditQueryRun, writer.tag(73, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.DiscoveryFetchEvent discovery_fetch_event = 74; */ + if (message.event.oneofKind === "discoveryFetchEvent") + DiscoveryFetchEvent.internalBinaryWrite(message.event.discoveryFetchEvent, writer.tag(74, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListReviewCreateEvent access_list_review_create = 75; */ + if (message.event.oneofKind === "accessListReviewCreate") + AccessListReviewCreateEvent.internalBinaryWrite(message.event.accessListReviewCreate, writer.tag(75, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListReviewDeleteEvent access_list_review_delete = 76; */ + if (message.event.oneofKind === "accessListReviewDelete") + AccessListReviewDeleteEvent.internalBinaryWrite(message.event.accessListReviewDelete, writer.tag(76, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.AccessListReviewComplianceEvent access_list_review_compliance = 77; */ + if (message.event.oneofKind === "accessListReviewCompliance") + AccessListReviewComplianceEvent.internalBinaryWrite(message.event.accessListReviewCompliance, writer.tag(77, WireType.LengthDelimited).fork(), options).join(); + /* prehog.v1alpha.MFAAuthenticationEvent mfa_authentication_event = 78; */ + if (message.event.oneofKind === "mfaAuthenticationEvent") + MFAAuthenticationEvent.internalBinaryWrite(message.event.mfaAuthenticationEvent, writer.tag(78, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitEventRequest + */ +export const SubmitEventRequest = new SubmitEventRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitEventResponse$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitEventResponse", []); + } + create(value?: PartialMessage): SubmitEventResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitEventResponse): SubmitEventResponse { + return target ?? this.create(); + } + internalBinaryWrite(message: SubmitEventResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitEventResponse + */ +export const SubmitEventResponse = new SubmitEventResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitEventsRequest$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitEventsRequest", [ + { no: 1, name: "events", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => SubmitEventRequest } + ]); + } + create(value?: PartialMessage): SubmitEventsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.events = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitEventsRequest): SubmitEventsRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated prehog.v1alpha.SubmitEventRequest events */ 1: + message.events.push(SubmitEventRequest.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SubmitEventsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated prehog.v1alpha.SubmitEventRequest events = 1; */ + for (let i = 0; i < message.events.length; i++) + SubmitEventRequest.internalBinaryWrite(message.events[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitEventsRequest + */ +export const SubmitEventsRequest = new SubmitEventsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SubmitEventsResponse$Type extends MessageType { + constructor() { + super("prehog.v1alpha.SubmitEventsResponse", []); + } + create(value?: PartialMessage): SubmitEventsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubmitEventsResponse): SubmitEventsResponse { + return target ?? this.create(); + } + internalBinaryWrite(message: SubmitEventsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.SubmitEventsResponse + */ +export const SubmitEventsResponse = new SubmitEventsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class HelloTeleportRequest$Type extends MessageType { + constructor() { + super("prehog.v1alpha.HelloTeleportRequest", []); + } + create(value?: PartialMessage): HelloTeleportRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HelloTeleportRequest): HelloTeleportRequest { + return target ?? this.create(); + } + internalBinaryWrite(message: HelloTeleportRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.HelloTeleportRequest + */ +export const HelloTeleportRequest = new HelloTeleportRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class HelloTeleportResponse$Type extends MessageType { + constructor() { + super("prehog.v1alpha.HelloTeleportResponse", []); + } + create(value?: PartialMessage): HelloTeleportResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HelloTeleportResponse): HelloTeleportResponse { + return target ?? this.create(); + } + internalBinaryWrite(message: HelloTeleportResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message prehog.v1alpha.HelloTeleportResponse + */ +export const HelloTeleportResponse = new HelloTeleportResponse$Type(); +/** + * @generated ServiceType for protobuf service prehog.v1alpha.TeleportReportingService + */ +export const TeleportReportingService = new ServiceType("prehog.v1alpha.TeleportReportingService", [ + { name: "SubmitEvent", options: {}, I: SubmitEventRequest, O: SubmitEventResponse }, + { name: "SubmitEvents", options: {}, I: SubmitEventsRequest, O: SubmitEventsResponse }, + { name: "HelloTeleport", options: {}, I: HelloTeleportRequest, O: HelloTeleportResponse } +]); diff --git a/gen/proto/ts/teleport/accesslist/v1/accesslist_pb.ts b/gen/proto/ts/teleport/accesslist/v1/accesslist_pb.ts new file mode 100644 index 00000000000..6451e0126e9 --- /dev/null +++ b/gen/proto/ts/teleport/accesslist/v1/accesslist_pb.ts @@ -0,0 +1,1368 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/accesslist/v1/accesslist.proto" (package "teleport.accesslist.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Gravitational, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Trait } from "../../trait/v1/trait_pb"; +import { Duration } from "../../../google/protobuf/duration_pb"; +import { Timestamp } from "../../../google/protobuf/timestamp_pb"; +import { ResourceHeader } from "../../header/v1/resourceheader_pb"; +/** + * AccessList describes the basic building block of access grants, which are + * similar to access requests but for longer lived permissions that need to be + * regularly audited. + * + * @generated from protobuf message teleport.accesslist.v1.AccessList + */ +export interface AccessList { + /** + * header is the header for the resource. + * + * @generated from protobuf field: teleport.header.v1.ResourceHeader header = 1; + */ + header?: ResourceHeader; + /** + * spec is the specification for the access list. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessListSpec spec = 2; + */ + spec?: AccessListSpec; +} +/** + * AccessListSpec is the specification for an access list. + * + * @generated from protobuf message teleport.accesslist.v1.AccessListSpec + */ +export interface AccessListSpec { + /** + * description is an optional plaintext description of the access list. + * + * @generated from protobuf field: string description = 1; + */ + description: string; + /** + * owners is a list of owners of the access list. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.AccessListOwner owners = 2; + */ + owners: AccessListOwner[]; + /** + * audit describes the frequency that this access list must be audited. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessListAudit audit = 3; + */ + audit?: AccessListAudit; + /** + * membership_requires describes the requirements for a user to be a member of the access list. + * For a membership to an access list to be effective, the user must meet the requirements of + * Membership_requires and must be in the members list. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessListRequires membership_requires = 4; + */ + membershipRequires?: AccessListRequires; + /** + * ownership_requires describes the requirements for a user to be an owner of the access list. + * For ownership of an access list to be effective, the user must meet the requirements of + * ownership_requires and must be in the owners list. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessListRequires ownership_requires = 5; + */ + ownershipRequires?: AccessListRequires; + /** + * grants describes the access granted by membership to this access list. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessListGrants grants = 6; + */ + grants?: AccessListGrants; + /** + * title is a plaintext short description of the access list. + * + * @generated from protobuf field: string title = 8; + */ + title: string; + /** + * membership defines how list membership is applied. There are two possible + * values: + * `explicit` (default): To be considered ag member of the access list, a + * user must both meet the `membership_requires` + * conditions AND be explicitly added to the list. + * `implicit`: Any user meeting the `membership_requires` conditions will automatically + * be considered a member of this list. + * + * @generated from protobuf field: string membership = 9; + */ + membership: string; + /** + * ownership defines how list ownership of this list is determined. There are + * two possible values: + * `explicit` (default): To be considered an owner of the access list, a user + * must both meet the `ownership_requires` conditions AND be + * explicitly added to the list. + * `implicit`: Any user meeting the `ownership_requires` conditions will automatically + * be considered an owner of this list. + * + * @generated from protobuf field: string ownership = 10; + */ + ownership: string; + /** + * owner_grants describes the access granted by owners to this access list. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessListGrants owner_grants = 11; + */ + ownerGrants?: AccessListGrants; +} +/** + * AccessListOwner is an owner of an access list. + * + * @generated from protobuf message teleport.accesslist.v1.AccessListOwner + */ +export interface AccessListOwner { + /** + * name is the username of the owner. + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * description is the plaintext description of the owner and why they are an owner. + * + * @generated from protobuf field: string description = 2; + */ + description: string; + /** + * ineligible_status describes if this owner is eligible or not + * and if not, describes how they're lacking eligibility. + * + * @generated from protobuf field: teleport.accesslist.v1.IneligibleStatus ineligible_status = 3; + */ + ineligibleStatus: IneligibleStatus; +} +/** + * AccessListAudit describes the audit configuration for an access list. + * + * @generated from protobuf message teleport.accesslist.v1.AccessListAudit + */ +export interface AccessListAudit { + /** + * next_audit_date is when the next audit date should be done by. + * + * @generated from protobuf field: google.protobuf.Timestamp next_audit_date = 2; + */ + nextAuditDate?: Timestamp; + /** + * recurrence is the recurrence definition + * + * @generated from protobuf field: teleport.accesslist.v1.Recurrence recurrence = 3; + */ + recurrence?: Recurrence; + /** + * notifications is the configuration for notifying users. + * + * @generated from protobuf field: teleport.accesslist.v1.Notifications notifications = 4; + */ + notifications?: Notifications; +} +/** + * Recurrence is the definition for when reviews will be scheduled. + * + * @generated from protobuf message teleport.accesslist.v1.Recurrence + */ +export interface Recurrence { + /** + * frequency is the frequency of reviews. + * + * @generated from protobuf field: teleport.accesslist.v1.ReviewFrequency frequency = 1; + */ + frequency: ReviewFrequency; + /** + * day_of_month is the day of month that reviews will be scheduled on. + * + * @generated from protobuf field: teleport.accesslist.v1.ReviewDayOfMonth day_of_month = 2; + */ + dayOfMonth: ReviewDayOfMonth; +} +/** + * Notifications contains the configuration for notifying users of a nearing next audit date. + * + * @generated from protobuf message teleport.accesslist.v1.Notifications + */ +export interface Notifications { + /** + * start specifies when to start notifying users that the next audit date is coming up. + * + * @generated from protobuf field: google.protobuf.Duration start = 1; + */ + start?: Duration; +} +/** + * AccessListRequires describes a requirement section for an access list. A user must + * meet the following criteria to obtain the specific access to the list. + * + * @generated from protobuf message teleport.accesslist.v1.AccessListRequires + */ +export interface AccessListRequires { + /** + * roles are the user roles that must be present for the user to obtain access. + * + * @generated from protobuf field: repeated string roles = 1; + */ + roles: string[]; + /** + * traits are the traits that must be present for the user to obtain access. + * + * @generated from protobuf field: repeated teleport.trait.v1.Trait traits = 2; + */ + traits: Trait[]; +} +/** + * AccessListGrants describes what access is granted by membership to the access list. + * + * @generated from protobuf message teleport.accesslist.v1.AccessListGrants + */ +export interface AccessListGrants { + /** + * roles are the roles that are granted to users who are members of the access list. + * + * @generated from protobuf field: repeated string roles = 1; + */ + roles: string[]; + /** + * traits are the traits that are granted to users who are members of the access list. + * + * @generated from protobuf field: repeated teleport.trait.v1.Trait traits = 2; + */ + traits: Trait[]; +} +/** + * Member describes a member of an access list. + * + * @generated from protobuf message teleport.accesslist.v1.Member + */ +export interface Member { + /** + * header is the header for the resource. + * + * @generated from protobuf field: teleport.header.v1.ResourceHeader header = 1; + */ + header?: ResourceHeader; + /** + * spec is the specification for the access list member. + * + * @generated from protobuf field: teleport.accesslist.v1.MemberSpec spec = 2; + */ + spec?: MemberSpec; +} +/** + * MemberSpec is the specification for an access list member. + * + * @generated from protobuf message teleport.accesslist.v1.MemberSpec + */ +export interface MemberSpec { + /** + * associated access list + * + * @generated from protobuf field: string access_list = 1; + */ + accessList: string; + /** + * name is the name of the member of the access list. + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * joined is when the user joined the access list. + * + * @generated from protobuf field: google.protobuf.Timestamp joined = 3; + */ + joined?: Timestamp; + /** + * expires is when the user's membership to the access list expires. + * + * @generated from protobuf field: google.protobuf.Timestamp expires = 4; + */ + expires?: Timestamp; + /** + * reason is the reason this user was added to the access list. + * + * @generated from protobuf field: string reason = 5; + */ + reason: string; + /** + * added_by is the user that added this user to the access list. + * + * @generated from protobuf field: string added_by = 6; + */ + addedBy: string; + /** + * ineligible_status describes if this member is eligible or not + * and if not, describes how they're lacking eligibility. + * + * @generated from protobuf field: teleport.accesslist.v1.IneligibleStatus ineligible_status = 7; + */ + ineligibleStatus: IneligibleStatus; + /** + * membership defines how list membership was acquired. There are two possible + * values: `explicit` and `implicit`. + * + * @generated from protobuf field: string membership = 8; + */ + membership: string; +} +/** + * Review is a review of an access list. + * + * @generated from protobuf message teleport.accesslist.v1.Review + */ +export interface Review { + /** + * header is the header for the resource. + * + * @generated from protobuf field: teleport.header.v1.ResourceHeader header = 1; + */ + header?: ResourceHeader; + /** + * spec is the specification for the access list review. + * + * @generated from protobuf field: teleport.accesslist.v1.ReviewSpec spec = 2; + */ + spec?: ReviewSpec; +} +/** + * ReviewSpec is the specification for an access list review. + * + * @generated from protobuf message teleport.accesslist.v1.ReviewSpec + */ +export interface ReviewSpec { + /** + * access_list is the name of the access list that this review is for. + * + * @generated from protobuf field: string access_list = 1; + */ + accessList: string; + /** + * reviewers are the users who performed the review. + * + * @generated from protobuf field: repeated string reviewers = 2; + */ + reviewers: string[]; + /** + * review_date is the date that this review was created. + * + * @generated from protobuf field: google.protobuf.Timestamp review_date = 3; + */ + reviewDate?: Timestamp; + /** + * notes is an optional plaintext attached to the review that can be used by the review for arbitrary + * note taking on the review. + * + * @generated from protobuf field: string notes = 4; + */ + notes: string; + /** + * changes are the changes made as part of the review. + * + * @generated from protobuf field: teleport.accesslist.v1.ReviewChanges changes = 5; + */ + changes?: ReviewChanges; +} +/** + * ReviewChanges are the changes that were made as part of the review. + * + * @generated from protobuf message teleport.accesslist.v1.ReviewChanges + */ +export interface ReviewChanges { + /** + * membership_requirements_changed is populated if the requirements were changed as part of this review. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessListRequires membership_requirements_changed = 2; + */ + membershipRequirementsChanged?: AccessListRequires; + /** + * removed_members contains the members that were removed as part of this review. + * + * @generated from protobuf field: repeated string removed_members = 3; + */ + removedMembers: string[]; + /** + * review_frequency_changed is populated if the review frequency has changed. + * + * @generated from protobuf field: teleport.accesslist.v1.ReviewFrequency review_frequency_changed = 4; + */ + reviewFrequencyChanged: ReviewFrequency; + /** + * review_day_of_month_changed is populated if the review day of month has changed. + * + * @generated from protobuf field: teleport.accesslist.v1.ReviewDayOfMonth review_day_of_month_changed = 5; + */ + reviewDayOfMonthChanged: ReviewDayOfMonth; +} +/** + * ReviewFrequency is the frequency of reviews. + * + * @generated from protobuf enum teleport.accesslist.v1.ReviewFrequency + */ +export enum ReviewFrequency { + /** + * @generated from protobuf enum value: REVIEW_FREQUENCY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: REVIEW_FREQUENCY_ONE_MONTH = 1; + */ + ONE_MONTH = 1, + /** + * @generated from protobuf enum value: REVIEW_FREQUENCY_THREE_MONTHS = 3; + */ + THREE_MONTHS = 3, + /** + * @generated from protobuf enum value: REVIEW_FREQUENCY_SIX_MONTHS = 6; + */ + SIX_MONTHS = 6, + /** + * @generated from protobuf enum value: REVIEW_FREQUENCY_ONE_YEAR = 12; + */ + ONE_YEAR = 12 +} +/** + * ReviewDayOfMonth is the day of month that reviews will repeat on. + * + * @generated from protobuf enum teleport.accesslist.v1.ReviewDayOfMonth + */ +export enum ReviewDayOfMonth { + /** + * @generated from protobuf enum value: REVIEW_DAY_OF_MONTH_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: REVIEW_DAY_OF_MONTH_FIRST = 1; + */ + FIRST = 1, + /** + * @generated from protobuf enum value: REVIEW_DAY_OF_MONTH_FIFTEENTH = 15; + */ + FIFTEENTH = 15, + /** + * @generated from protobuf enum value: REVIEW_DAY_OF_MONTH_LAST = 31; + */ + LAST = 31 +} +/** + * IneligibleStatus describes how the user is ineligible. + * + * @generated from protobuf enum teleport.accesslist.v1.IneligibleStatus + */ +export enum IneligibleStatus { + /** + * INELIGIBLE_STATUS_UNSPECIFIED means eligiblity is unknown. + * + * @generated from protobuf enum value: INELIGIBLE_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * INELIGIBLE_STATUS_ELIGIBLE means checks were done and user met all requirements. + * + * @generated from protobuf enum value: INELIGIBLE_STATUS_ELIGIBLE = 1; + */ + ELIGIBLE = 1, + /** + * INELIGIBLE_STATUS_USER_NOT_EXIST means user was not found in backend. + * + * @generated from protobuf enum value: INELIGIBLE_STATUS_USER_NOT_EXIST = 2; + */ + USER_NOT_EXIST = 2, + /** + * INELIGIBLE_STATUS_MISSING_REQUIREMENTS means user is missing some requirements + * defined by AccessListRequires (fields can be either ownership_requires + * or membership_requires) + * + * @generated from protobuf enum value: INELIGIBLE_STATUS_MISSING_REQUIREMENTS = 3; + */ + MISSING_REQUIREMENTS = 3, + /** + * INELIGIBLE_STATUS_EXPIRED means user is expired. + * Only applicable to members. + * + * @generated from protobuf enum value: INELIGIBLE_STATUS_EXPIRED = 4; + */ + EXPIRED = 4 +} +// @generated message type with reflection information, may provide speed optimized methods +class AccessList$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessList", [ + { no: 1, name: "header", kind: "message", T: () => ResourceHeader }, + { no: 2, name: "spec", kind: "message", T: () => AccessListSpec } + ]); + } + create(value?: PartialMessage): AccessList { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessList): AccessList { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.header.v1.ResourceHeader header */ 1: + message.header = ResourceHeader.internalBinaryRead(reader, reader.uint32(), options, message.header); + break; + case /* teleport.accesslist.v1.AccessListSpec spec */ 2: + message.spec = AccessListSpec.internalBinaryRead(reader, reader.uint32(), options, message.spec); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessList, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.header.v1.ResourceHeader header = 1; */ + if (message.header) + ResourceHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.AccessListSpec spec = 2; */ + if (message.spec) + AccessListSpec.internalBinaryWrite(message.spec, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessList + */ +export const AccessList = new AccessList$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListSpec$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessListSpec", [ + { no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "owners", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AccessListOwner }, + { no: 3, name: "audit", kind: "message", T: () => AccessListAudit }, + { no: 4, name: "membership_requires", kind: "message", T: () => AccessListRequires }, + { no: 5, name: "ownership_requires", kind: "message", T: () => AccessListRequires }, + { no: 6, name: "grants", kind: "message", T: () => AccessListGrants }, + { no: 8, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 9, name: "membership", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "ownership", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 11, name: "owner_grants", kind: "message", T: () => AccessListGrants } + ]); + } + create(value?: PartialMessage): AccessListSpec { + const message = globalThis.Object.create((this.messagePrototype!)); + message.description = ""; + message.owners = []; + message.title = ""; + message.membership = ""; + message.ownership = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListSpec): AccessListSpec { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string description */ 1: + message.description = reader.string(); + break; + case /* repeated teleport.accesslist.v1.AccessListOwner owners */ 2: + message.owners.push(AccessListOwner.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* teleport.accesslist.v1.AccessListAudit audit */ 3: + message.audit = AccessListAudit.internalBinaryRead(reader, reader.uint32(), options, message.audit); + break; + case /* teleport.accesslist.v1.AccessListRequires membership_requires */ 4: + message.membershipRequires = AccessListRequires.internalBinaryRead(reader, reader.uint32(), options, message.membershipRequires); + break; + case /* teleport.accesslist.v1.AccessListRequires ownership_requires */ 5: + message.ownershipRequires = AccessListRequires.internalBinaryRead(reader, reader.uint32(), options, message.ownershipRequires); + break; + case /* teleport.accesslist.v1.AccessListGrants grants */ 6: + message.grants = AccessListGrants.internalBinaryRead(reader, reader.uint32(), options, message.grants); + break; + case /* string title */ 8: + message.title = reader.string(); + break; + case /* string membership */ 9: + message.membership = reader.string(); + break; + case /* string ownership */ 10: + message.ownership = reader.string(); + break; + case /* teleport.accesslist.v1.AccessListGrants owner_grants */ 11: + message.ownerGrants = AccessListGrants.internalBinaryRead(reader, reader.uint32(), options, message.ownerGrants); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string description = 1; */ + if (message.description !== "") + writer.tag(1, WireType.LengthDelimited).string(message.description); + /* repeated teleport.accesslist.v1.AccessListOwner owners = 2; */ + for (let i = 0; i < message.owners.length; i++) + AccessListOwner.internalBinaryWrite(message.owners[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.AccessListAudit audit = 3; */ + if (message.audit) + AccessListAudit.internalBinaryWrite(message.audit, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.AccessListRequires membership_requires = 4; */ + if (message.membershipRequires) + AccessListRequires.internalBinaryWrite(message.membershipRequires, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.AccessListRequires ownership_requires = 5; */ + if (message.ownershipRequires) + AccessListRequires.internalBinaryWrite(message.ownershipRequires, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.AccessListGrants grants = 6; */ + if (message.grants) + AccessListGrants.internalBinaryWrite(message.grants, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* string title = 8; */ + if (message.title !== "") + writer.tag(8, WireType.LengthDelimited).string(message.title); + /* string membership = 9; */ + if (message.membership !== "") + writer.tag(9, WireType.LengthDelimited).string(message.membership); + /* string ownership = 10; */ + if (message.ownership !== "") + writer.tag(10, WireType.LengthDelimited).string(message.ownership); + /* teleport.accesslist.v1.AccessListGrants owner_grants = 11; */ + if (message.ownerGrants) + AccessListGrants.internalBinaryWrite(message.ownerGrants, writer.tag(11, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessListSpec + */ +export const AccessListSpec = new AccessListSpec$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListOwner$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessListOwner", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "ineligible_status", kind: "enum", T: () => ["teleport.accesslist.v1.IneligibleStatus", IneligibleStatus, "INELIGIBLE_STATUS_"] } + ]); + } + create(value?: PartialMessage): AccessListOwner { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = ""; + message.description = ""; + message.ineligibleStatus = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListOwner): AccessListOwner { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* string description */ 2: + message.description = reader.string(); + break; + case /* teleport.accesslist.v1.IneligibleStatus ineligible_status */ 3: + message.ineligibleStatus = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListOwner, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* string description = 2; */ + if (message.description !== "") + writer.tag(2, WireType.LengthDelimited).string(message.description); + /* teleport.accesslist.v1.IneligibleStatus ineligible_status = 3; */ + if (message.ineligibleStatus !== 0) + writer.tag(3, WireType.Varint).int32(message.ineligibleStatus); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessListOwner + */ +export const AccessListOwner = new AccessListOwner$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListAudit$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessListAudit", [ + { no: 2, name: "next_audit_date", kind: "message", T: () => Timestamp }, + { no: 3, name: "recurrence", kind: "message", T: () => Recurrence }, + { no: 4, name: "notifications", kind: "message", T: () => Notifications } + ]); + } + create(value?: PartialMessage): AccessListAudit { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListAudit): AccessListAudit { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* google.protobuf.Timestamp next_audit_date */ 2: + message.nextAuditDate = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.nextAuditDate); + break; + case /* teleport.accesslist.v1.Recurrence recurrence */ 3: + message.recurrence = Recurrence.internalBinaryRead(reader, reader.uint32(), options, message.recurrence); + break; + case /* teleport.accesslist.v1.Notifications notifications */ 4: + message.notifications = Notifications.internalBinaryRead(reader, reader.uint32(), options, message.notifications); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListAudit, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* google.protobuf.Timestamp next_audit_date = 2; */ + if (message.nextAuditDate) + Timestamp.internalBinaryWrite(message.nextAuditDate, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.Recurrence recurrence = 3; */ + if (message.recurrence) + Recurrence.internalBinaryWrite(message.recurrence, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.Notifications notifications = 4; */ + if (message.notifications) + Notifications.internalBinaryWrite(message.notifications, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessListAudit + */ +export const AccessListAudit = new AccessListAudit$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Recurrence$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.Recurrence", [ + { no: 1, name: "frequency", kind: "enum", T: () => ["teleport.accesslist.v1.ReviewFrequency", ReviewFrequency, "REVIEW_FREQUENCY_"] }, + { no: 2, name: "day_of_month", kind: "enum", T: () => ["teleport.accesslist.v1.ReviewDayOfMonth", ReviewDayOfMonth, "REVIEW_DAY_OF_MONTH_"] } + ]); + } + create(value?: PartialMessage): Recurrence { + const message = globalThis.Object.create((this.messagePrototype!)); + message.frequency = 0; + message.dayOfMonth = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Recurrence): Recurrence { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.accesslist.v1.ReviewFrequency frequency */ 1: + message.frequency = reader.int32(); + break; + case /* teleport.accesslist.v1.ReviewDayOfMonth day_of_month */ 2: + message.dayOfMonth = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Recurrence, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.accesslist.v1.ReviewFrequency frequency = 1; */ + if (message.frequency !== 0) + writer.tag(1, WireType.Varint).int32(message.frequency); + /* teleport.accesslist.v1.ReviewDayOfMonth day_of_month = 2; */ + if (message.dayOfMonth !== 0) + writer.tag(2, WireType.Varint).int32(message.dayOfMonth); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.Recurrence + */ +export const Recurrence = new Recurrence$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Notifications$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.Notifications", [ + { no: 1, name: "start", kind: "message", T: () => Duration } + ]); + } + create(value?: PartialMessage): Notifications { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Notifications): Notifications { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* google.protobuf.Duration start */ 1: + message.start = Duration.internalBinaryRead(reader, reader.uint32(), options, message.start); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Notifications, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* google.protobuf.Duration start = 1; */ + if (message.start) + Duration.internalBinaryWrite(message.start, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.Notifications + */ +export const Notifications = new Notifications$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListRequires$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessListRequires", [ + { no: 1, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "traits", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Trait } + ]); + } + create(value?: PartialMessage): AccessListRequires { + const message = globalThis.Object.create((this.messagePrototype!)); + message.roles = []; + message.traits = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListRequires): AccessListRequires { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated string roles */ 1: + message.roles.push(reader.string()); + break; + case /* repeated teleport.trait.v1.Trait traits */ 2: + message.traits.push(Trait.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListRequires, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated string roles = 1; */ + for (let i = 0; i < message.roles.length; i++) + writer.tag(1, WireType.LengthDelimited).string(message.roles[i]); + /* repeated teleport.trait.v1.Trait traits = 2; */ + for (let i = 0; i < message.traits.length; i++) + Trait.internalBinaryWrite(message.traits[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessListRequires + */ +export const AccessListRequires = new AccessListRequires$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessListGrants$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessListGrants", [ + { no: 1, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "traits", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Trait } + ]); + } + create(value?: PartialMessage): AccessListGrants { + const message = globalThis.Object.create((this.messagePrototype!)); + message.roles = []; + message.traits = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessListGrants): AccessListGrants { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated string roles */ 1: + message.roles.push(reader.string()); + break; + case /* repeated teleport.trait.v1.Trait traits */ 2: + message.traits.push(Trait.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessListGrants, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated string roles = 1; */ + for (let i = 0; i < message.roles.length; i++) + writer.tag(1, WireType.LengthDelimited).string(message.roles[i]); + /* repeated teleport.trait.v1.Trait traits = 2; */ + for (let i = 0; i < message.traits.length; i++) + Trait.internalBinaryWrite(message.traits[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessListGrants + */ +export const AccessListGrants = new AccessListGrants$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Member$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.Member", [ + { no: 1, name: "header", kind: "message", T: () => ResourceHeader }, + { no: 2, name: "spec", kind: "message", T: () => MemberSpec } + ]); + } + create(value?: PartialMessage): Member { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Member): Member { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.header.v1.ResourceHeader header */ 1: + message.header = ResourceHeader.internalBinaryRead(reader, reader.uint32(), options, message.header); + break; + case /* teleport.accesslist.v1.MemberSpec spec */ 2: + message.spec = MemberSpec.internalBinaryRead(reader, reader.uint32(), options, message.spec); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Member, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.header.v1.ResourceHeader header = 1; */ + if (message.header) + ResourceHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.MemberSpec spec = 2; */ + if (message.spec) + MemberSpec.internalBinaryWrite(message.spec, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.Member + */ +export const Member = new Member$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MemberSpec$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.MemberSpec", [ + { no: 1, name: "access_list", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "joined", kind: "message", T: () => Timestamp }, + { no: 4, name: "expires", kind: "message", T: () => Timestamp }, + { no: 5, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "added_by", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "ineligible_status", kind: "enum", T: () => ["teleport.accesslist.v1.IneligibleStatus", IneligibleStatus, "INELIGIBLE_STATUS_"] }, + { no: 8, name: "membership", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): MemberSpec { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessList = ""; + message.name = ""; + message.reason = ""; + message.addedBy = ""; + message.ineligibleStatus = 0; + message.membership = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MemberSpec): MemberSpec { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string access_list */ 1: + message.accessList = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* google.protobuf.Timestamp joined */ 3: + message.joined = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.joined); + break; + case /* google.protobuf.Timestamp expires */ 4: + message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires); + break; + case /* string reason */ 5: + message.reason = reader.string(); + break; + case /* string added_by */ 6: + message.addedBy = reader.string(); + break; + case /* teleport.accesslist.v1.IneligibleStatus ineligible_status */ 7: + message.ineligibleStatus = reader.int32(); + break; + case /* string membership */ 8: + message.membership = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MemberSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string access_list = 1; */ + if (message.accessList !== "") + writer.tag(1, WireType.LengthDelimited).string(message.accessList); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* google.protobuf.Timestamp joined = 3; */ + if (message.joined) + Timestamp.internalBinaryWrite(message.joined, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp expires = 4; */ + if (message.expires) + Timestamp.internalBinaryWrite(message.expires, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* string reason = 5; */ + if (message.reason !== "") + writer.tag(5, WireType.LengthDelimited).string(message.reason); + /* string added_by = 6; */ + if (message.addedBy !== "") + writer.tag(6, WireType.LengthDelimited).string(message.addedBy); + /* teleport.accesslist.v1.IneligibleStatus ineligible_status = 7; */ + if (message.ineligibleStatus !== 0) + writer.tag(7, WireType.Varint).int32(message.ineligibleStatus); + /* string membership = 8; */ + if (message.membership !== "") + writer.tag(8, WireType.LengthDelimited).string(message.membership); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.MemberSpec + */ +export const MemberSpec = new MemberSpec$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Review$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.Review", [ + { no: 1, name: "header", kind: "message", T: () => ResourceHeader }, + { no: 2, name: "spec", kind: "message", T: () => ReviewSpec } + ]); + } + create(value?: PartialMessage): Review { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Review): Review { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.header.v1.ResourceHeader header */ 1: + message.header = ResourceHeader.internalBinaryRead(reader, reader.uint32(), options, message.header); + break; + case /* teleport.accesslist.v1.ReviewSpec spec */ 2: + message.spec = ReviewSpec.internalBinaryRead(reader, reader.uint32(), options, message.spec); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Review, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.header.v1.ResourceHeader header = 1; */ + if (message.header) + ResourceHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* teleport.accesslist.v1.ReviewSpec spec = 2; */ + if (message.spec) + ReviewSpec.internalBinaryWrite(message.spec, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.Review + */ +export const Review = new Review$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ReviewSpec$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ReviewSpec", [ + { no: 1, name: "access_list", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "reviewers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "review_date", kind: "message", T: () => Timestamp }, + { no: 4, name: "notes", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "changes", kind: "message", T: () => ReviewChanges } + ]); + } + create(value?: PartialMessage): ReviewSpec { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessList = ""; + message.reviewers = []; + message.notes = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReviewSpec): ReviewSpec { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string access_list */ 1: + message.accessList = reader.string(); + break; + case /* repeated string reviewers */ 2: + message.reviewers.push(reader.string()); + break; + case /* google.protobuf.Timestamp review_date */ 3: + message.reviewDate = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.reviewDate); + break; + case /* string notes */ 4: + message.notes = reader.string(); + break; + case /* teleport.accesslist.v1.ReviewChanges changes */ 5: + message.changes = ReviewChanges.internalBinaryRead(reader, reader.uint32(), options, message.changes); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ReviewSpec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string access_list = 1; */ + if (message.accessList !== "") + writer.tag(1, WireType.LengthDelimited).string(message.accessList); + /* repeated string reviewers = 2; */ + for (let i = 0; i < message.reviewers.length; i++) + writer.tag(2, WireType.LengthDelimited).string(message.reviewers[i]); + /* google.protobuf.Timestamp review_date = 3; */ + if (message.reviewDate) + Timestamp.internalBinaryWrite(message.reviewDate, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* string notes = 4; */ + if (message.notes !== "") + writer.tag(4, WireType.LengthDelimited).string(message.notes); + /* teleport.accesslist.v1.ReviewChanges changes = 5; */ + if (message.changes) + ReviewChanges.internalBinaryWrite(message.changes, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ReviewSpec + */ +export const ReviewSpec = new ReviewSpec$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ReviewChanges$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ReviewChanges", [ + { no: 2, name: "membership_requirements_changed", kind: "message", T: () => AccessListRequires }, + { no: 3, name: "removed_members", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "review_frequency_changed", kind: "enum", T: () => ["teleport.accesslist.v1.ReviewFrequency", ReviewFrequency, "REVIEW_FREQUENCY_"] }, + { no: 5, name: "review_day_of_month_changed", kind: "enum", T: () => ["teleport.accesslist.v1.ReviewDayOfMonth", ReviewDayOfMonth, "REVIEW_DAY_OF_MONTH_"] } + ]); + } + create(value?: PartialMessage): ReviewChanges { + const message = globalThis.Object.create((this.messagePrototype!)); + message.removedMembers = []; + message.reviewFrequencyChanged = 0; + message.reviewDayOfMonthChanged = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReviewChanges): ReviewChanges { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.accesslist.v1.AccessListRequires membership_requirements_changed */ 2: + message.membershipRequirementsChanged = AccessListRequires.internalBinaryRead(reader, reader.uint32(), options, message.membershipRequirementsChanged); + break; + case /* repeated string removed_members */ 3: + message.removedMembers.push(reader.string()); + break; + case /* teleport.accesslist.v1.ReviewFrequency review_frequency_changed */ 4: + message.reviewFrequencyChanged = reader.int32(); + break; + case /* teleport.accesslist.v1.ReviewDayOfMonth review_day_of_month_changed */ 5: + message.reviewDayOfMonthChanged = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ReviewChanges, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.accesslist.v1.AccessListRequires membership_requirements_changed = 2; */ + if (message.membershipRequirementsChanged) + AccessListRequires.internalBinaryWrite(message.membershipRequirementsChanged, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* repeated string removed_members = 3; */ + for (let i = 0; i < message.removedMembers.length; i++) + writer.tag(3, WireType.LengthDelimited).string(message.removedMembers[i]); + /* teleport.accesslist.v1.ReviewFrequency review_frequency_changed = 4; */ + if (message.reviewFrequencyChanged !== 0) + writer.tag(4, WireType.Varint).int32(message.reviewFrequencyChanged); + /* teleport.accesslist.v1.ReviewDayOfMonth review_day_of_month_changed = 5; */ + if (message.reviewDayOfMonthChanged !== 0) + writer.tag(5, WireType.Varint).int32(message.reviewDayOfMonthChanged); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ReviewChanges + */ +export const ReviewChanges = new ReviewChanges$Type(); diff --git a/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.grpc-client.ts b/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.grpc-client.ts new file mode 100644 index 00000000000..7f6b1a3ef85 --- /dev/null +++ b/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.grpc-client.ts @@ -0,0 +1,458 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/accesslist/v1/accesslist_service.proto" (package "teleport.accesslist.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Gravitational, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import { AccessListService } from "./accesslist_service_pb"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { GetSuggestedAccessListsResponse } from "./accesslist_service_pb"; +import type { GetSuggestedAccessListsRequest } from "./accesslist_service_pb"; +import type { AccessRequestPromoteResponse } from "./accesslist_service_pb"; +import type { AccessRequestPromoteRequest } from "./accesslist_service_pb"; +import type { DeleteAccessListReviewRequest } from "./accesslist_service_pb"; +import type { CreateAccessListReviewResponse } from "./accesslist_service_pb"; +import type { CreateAccessListReviewRequest } from "./accesslist_service_pb"; +import type { ListAllAccessListReviewsResponse } from "./accesslist_service_pb"; +import type { ListAllAccessListReviewsRequest } from "./accesslist_service_pb"; +import type { ListAccessListReviewsResponse } from "./accesslist_service_pb"; +import type { ListAccessListReviewsRequest } from "./accesslist_service_pb"; +import type { UpsertAccessListWithMembersResponse } from "./accesslist_service_pb"; +import type { UpsertAccessListWithMembersRequest } from "./accesslist_service_pb"; +import type { DeleteAllAccessListMembersRequest } from "./accesslist_service_pb"; +import type { DeleteAllAccessListMembersForAccessListRequest } from "./accesslist_service_pb"; +import type { DeleteAccessListMemberRequest } from "./accesslist_service_pb"; +import type { UpsertAccessListMemberRequest } from "./accesslist_service_pb"; +import type { Member } from "./accesslist_pb"; +import type { GetAccessListMemberRequest } from "./accesslist_service_pb"; +import type { ListAllAccessListMembersResponse } from "./accesslist_service_pb"; +import type { ListAllAccessListMembersRequest } from "./accesslist_service_pb"; +import type { ListAccessListMembersResponse } from "./accesslist_service_pb"; +import type { ListAccessListMembersRequest } from "./accesslist_service_pb"; +import type { GetAccessListsToReviewResponse } from "./accesslist_service_pb"; +import type { GetAccessListsToReviewRequest } from "./accesslist_service_pb"; +import type { DeleteAllAccessListsRequest } from "./accesslist_service_pb"; +import type { Empty } from "../../../google/protobuf/empty_pb"; +import type { DeleteAccessListRequest } from "./accesslist_service_pb"; +import type { UpsertAccessListRequest } from "./accesslist_service_pb"; +import type { AccessList } from "./accesslist_pb"; +import type { GetAccessListRequest } from "./accesslist_service_pb"; +import type { ListAccessListsResponse } from "./accesslist_service_pb"; +import type { ListAccessListsRequest } from "./accesslist_service_pb"; +import type { GetAccessListsResponse } from "./accesslist_service_pb"; +import type { GetAccessListsRequest } from "./accesslist_service_pb"; +import * as grpc from "@grpc/grpc-js"; +/** + * AccessListService provides CRUD methods for Access List resources. + * + * @generated from protobuf service teleport.accesslist.v1.AccessListService + */ +export interface IAccessListServiceClient { + /** + * GetAccessLists returns a list of all access lists. + * + * @generated from protobuf rpc: GetAccessLists(teleport.accesslist.v1.GetAccessListsRequest) returns (teleport.accesslist.v1.GetAccessListsResponse); + */ + getAccessLists(input: GetAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall; + getAccessLists(input: GetAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall; + getAccessLists(input: GetAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall; + getAccessLists(input: GetAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void): grpc.ClientUnaryCall; + /** + * ListAccessLists returns a paginated list of all access lists. + * + * @generated from protobuf rpc: ListAccessLists(teleport.accesslist.v1.ListAccessListsRequest) returns (teleport.accesslist.v1.ListAccessListsResponse); + */ + listAccessLists(input: ListAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall; + listAccessLists(input: ListAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall; + listAccessLists(input: ListAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall; + listAccessLists(input: ListAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void): grpc.ClientUnaryCall; + /** + * GetAccessList returns the specified access list resource. + * + * @generated from protobuf rpc: GetAccessList(teleport.accesslist.v1.GetAccessListRequest) returns (teleport.accesslist.v1.AccessList); + */ + getAccessList(input: GetAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + getAccessList(input: GetAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + getAccessList(input: GetAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + getAccessList(input: GetAccessListRequest, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + /** + * UpsertAccessList creates or updates an access list resource. + * + * @generated from protobuf rpc: UpsertAccessList(teleport.accesslist.v1.UpsertAccessListRequest) returns (teleport.accesslist.v1.AccessList); + */ + upsertAccessList(input: UpsertAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + upsertAccessList(input: UpsertAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + upsertAccessList(input: UpsertAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + upsertAccessList(input: UpsertAccessListRequest, callback: (err: grpc.ServiceError | null, value?: AccessList) => void): grpc.ClientUnaryCall; + /** + * DeleteAccessList hard deletes the specified access list resource. + * + * @generated from protobuf rpc: DeleteAccessList(teleport.accesslist.v1.DeleteAccessListRequest) returns (google.protobuf.Empty); + */ + deleteAccessList(input: DeleteAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessList(input: DeleteAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessList(input: DeleteAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessList(input: DeleteAccessListRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + /** + * DeleteAllAccessLists hard deletes all access lists. + * + * @generated from protobuf rpc: DeleteAllAccessLists(teleport.accesslist.v1.DeleteAllAccessListsRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessLists(input: DeleteAllAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessLists(input: DeleteAllAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessLists(input: DeleteAllAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessLists(input: DeleteAllAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + /** + * GetAccessListsToReview will return access lists that need to be reviewed by the current user. + * + * @generated from protobuf rpc: GetAccessListsToReview(teleport.accesslist.v1.GetAccessListsToReviewRequest) returns (teleport.accesslist.v1.GetAccessListsToReviewResponse); + */ + getAccessListsToReview(input: GetAccessListsToReviewRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall; + getAccessListsToReview(input: GetAccessListsToReviewRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall; + getAccessListsToReview(input: GetAccessListsToReviewRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall; + getAccessListsToReview(input: GetAccessListsToReviewRequest, callback: (err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void): grpc.ClientUnaryCall; + /** + * ListAccessListMembers returns a paginated list of all access list members. + * + * @generated from protobuf rpc: ListAccessListMembers(teleport.accesslist.v1.ListAccessListMembersRequest) returns (teleport.accesslist.v1.ListAccessListMembersResponse); + */ + listAccessListMembers(input: ListAccessListMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall; + listAccessListMembers(input: ListAccessListMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall; + listAccessListMembers(input: ListAccessListMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall; + listAccessListMembers(input: ListAccessListMembersRequest, callback: (err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void): grpc.ClientUnaryCall; + /** + * ListAllAccessListMembers returns a paginated list of all access list members for all access lists. + * + * @generated from protobuf rpc: ListAllAccessListMembers(teleport.accesslist.v1.ListAllAccessListMembersRequest) returns (teleport.accesslist.v1.ListAllAccessListMembersResponse); + */ + listAllAccessListMembers(input: ListAllAccessListMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall; + listAllAccessListMembers(input: ListAllAccessListMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall; + listAllAccessListMembers(input: ListAllAccessListMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall; + listAllAccessListMembers(input: ListAllAccessListMembersRequest, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void): grpc.ClientUnaryCall; + /** + * GetAccessListMember returns the specified access list member resource. + * + * @generated from protobuf rpc: GetAccessListMember(teleport.accesslist.v1.GetAccessListMemberRequest) returns (teleport.accesslist.v1.Member); + */ + getAccessListMember(input: GetAccessListMemberRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + getAccessListMember(input: GetAccessListMemberRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + getAccessListMember(input: GetAccessListMemberRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + getAccessListMember(input: GetAccessListMemberRequest, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + /** + * UpsertAccessListMember creates or updates an access list member resource. + * + * @generated from protobuf rpc: UpsertAccessListMember(teleport.accesslist.v1.UpsertAccessListMemberRequest) returns (teleport.accesslist.v1.Member); + */ + upsertAccessListMember(input: UpsertAccessListMemberRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + upsertAccessListMember(input: UpsertAccessListMemberRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + upsertAccessListMember(input: UpsertAccessListMemberRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + upsertAccessListMember(input: UpsertAccessListMemberRequest, callback: (err: grpc.ServiceError | null, value?: Member) => void): grpc.ClientUnaryCall; + /** + * DeleteAccessListMember hard deletes the specified access list member resource. + * + * @generated from protobuf rpc: DeleteAccessListMember(teleport.accesslist.v1.DeleteAccessListMemberRequest) returns (google.protobuf.Empty); + */ + deleteAccessListMember(input: DeleteAccessListMemberRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessListMember(input: DeleteAccessListMemberRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessListMember(input: DeleteAccessListMemberRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessListMember(input: DeleteAccessListMemberRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + /** + * DeleteAllAccessListMembers hard deletes all access list members for an access list. + * + * @generated from protobuf rpc: DeleteAllAccessListMembersForAccessList(teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + /** + * DeleteAllAccessListMembers hard deletes all access list members for an access list. + * + * @generated from protobuf rpc: DeleteAllAccessListMembers(teleport.accesslist.v1.DeleteAllAccessListMembersRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + /** + * UpsertAccessListWithMembers creates or updates an access list with members. + * + * @generated from protobuf rpc: UpsertAccessListWithMembers(teleport.accesslist.v1.UpsertAccessListWithMembersRequest) returns (teleport.accesslist.v1.UpsertAccessListWithMembersResponse); + */ + upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall; + upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall; + upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall; + upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, callback: (err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void): grpc.ClientUnaryCall; + /** + * ListAccessListReviews will list access list reviews for a particular access list. + * + * @generated from protobuf rpc: ListAccessListReviews(teleport.accesslist.v1.ListAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAccessListReviewsResponse); + */ + listAccessListReviews(input: ListAccessListReviewsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + listAccessListReviews(input: ListAccessListReviewsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + listAccessListReviews(input: ListAccessListReviewsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + listAccessListReviews(input: ListAccessListReviewsRequest, callback: (err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + /** + * ListAllAccessListReviews will list access list reviews for all access lists. + * + * @generated from protobuf rpc: ListAllAccessListReviews(teleport.accesslist.v1.ListAllAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAllAccessListReviewsResponse); + */ + listAllAccessListReviews(input: ListAllAccessListReviewsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + listAllAccessListReviews(input: ListAllAccessListReviewsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + listAllAccessListReviews(input: ListAllAccessListReviewsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + listAllAccessListReviews(input: ListAllAccessListReviewsRequest, callback: (err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void): grpc.ClientUnaryCall; + /** + * CreateAccessListReview will create a new review for an access list. It will also modify the original access list + * and its members depending on the details of the review. + * + * @generated from protobuf rpc: CreateAccessListReview(teleport.accesslist.v1.CreateAccessListReviewRequest) returns (teleport.accesslist.v1.CreateAccessListReviewResponse); + */ + createAccessListReview(input: CreateAccessListReviewRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall; + createAccessListReview(input: CreateAccessListReviewRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall; + createAccessListReview(input: CreateAccessListReviewRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall; + createAccessListReview(input: CreateAccessListReviewRequest, callback: (err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void): grpc.ClientUnaryCall; + /** + * DeleteAccessListReview will delete an access list review from the backend. + * + * @generated from protobuf rpc: DeleteAccessListReview(teleport.accesslist.v1.DeleteAccessListReviewRequest) returns (google.protobuf.Empty); + */ + deleteAccessListReview(input: DeleteAccessListReviewRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessListReview(input: DeleteAccessListReviewRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessListReview(input: DeleteAccessListReviewRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + deleteAccessListReview(input: DeleteAccessListReviewRequest, callback: (err: grpc.ServiceError | null, value?: Empty) => void): grpc.ClientUnaryCall; + /** + * AccessRequestPromote promotes an access request to an access list. + * + * @generated from protobuf rpc: AccessRequestPromote(teleport.accesslist.v1.AccessRequestPromoteRequest) returns (teleport.accesslist.v1.AccessRequestPromoteResponse); + */ + accessRequestPromote(input: AccessRequestPromoteRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall; + accessRequestPromote(input: AccessRequestPromoteRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall; + accessRequestPromote(input: AccessRequestPromoteRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall; + accessRequestPromote(input: AccessRequestPromoteRequest, callback: (err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void): grpc.ClientUnaryCall; + /** + * GetSuggestedAccessLists returns suggested access lists for an access request. + * + * @generated from protobuf rpc: GetSuggestedAccessLists(teleport.accesslist.v1.GetSuggestedAccessListsRequest) returns (teleport.accesslist.v1.GetSuggestedAccessListsResponse); + */ + getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall; + getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall; + getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall; + getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, callback: (err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void): grpc.ClientUnaryCall; +} +/** + * AccessListService provides CRUD methods for Access List resources. + * + * @generated from protobuf service teleport.accesslist.v1.AccessListService + */ +export class AccessListServiceClient extends grpc.Client implements IAccessListServiceClient { + private readonly _binaryOptions: Partial; + constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * GetAccessLists returns a list of all access lists. + * + * @generated from protobuf rpc: GetAccessLists(teleport.accesslist.v1.GetAccessListsRequest) returns (teleport.accesslist.v1.GetAccessListsResponse); + */ + getAccessLists(input: GetAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetAccessListsResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[0]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetAccessListsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * ListAccessLists returns a paginated list of all access lists. + * + * @generated from protobuf rpc: ListAccessLists(teleport.accesslist.v1.ListAccessListsRequest) returns (teleport.accesslist.v1.ListAccessListsResponse); + */ + listAccessLists(input: ListAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAccessListsResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[1]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: ListAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAccessListsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * GetAccessList returns the specified access list resource. + * + * @generated from protobuf rpc: GetAccessList(teleport.accesslist.v1.GetAccessListRequest) returns (teleport.accesslist.v1.AccessList); + */ + getAccessList(input: GetAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), callback?: ((err: grpc.ServiceError | null, value?: AccessList) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[2]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): AccessList => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * UpsertAccessList creates or updates an access list resource. + * + * @generated from protobuf rpc: UpsertAccessList(teleport.accesslist.v1.UpsertAccessListRequest) returns (teleport.accesslist.v1.AccessList); + */ + upsertAccessList(input: UpsertAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessList) => void), callback?: ((err: grpc.ServiceError | null, value?: AccessList) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[3]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: UpsertAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): AccessList => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * DeleteAccessList hard deletes the specified access list resource. + * + * @generated from protobuf rpc: DeleteAccessList(teleport.accesslist.v1.DeleteAccessListRequest) returns (google.protobuf.Empty); + */ + deleteAccessList(input: DeleteAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[4]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * DeleteAllAccessLists hard deletes all access lists. + * + * @generated from protobuf rpc: DeleteAllAccessLists(teleport.accesslist.v1.DeleteAllAccessListsRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessLists(input: DeleteAllAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[5]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAllAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * GetAccessListsToReview will return access lists that need to be reviewed by the current user. + * + * @generated from protobuf rpc: GetAccessListsToReview(teleport.accesslist.v1.GetAccessListsToReviewRequest) returns (teleport.accesslist.v1.GetAccessListsToReviewResponse); + */ + getAccessListsToReview(input: GetAccessListsToReviewRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetAccessListsToReviewResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[6]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListsToReviewRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetAccessListsToReviewResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * ListAccessListMembers returns a paginated list of all access list members. + * + * @generated from protobuf rpc: ListAccessListMembers(teleport.accesslist.v1.ListAccessListMembersRequest) returns (teleport.accesslist.v1.ListAccessListMembersResponse); + */ + listAccessListMembers(input: ListAccessListMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAccessListMembersResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[7]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: ListAccessListMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAccessListMembersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * ListAllAccessListMembers returns a paginated list of all access list members for all access lists. + * + * @generated from protobuf rpc: ListAllAccessListMembers(teleport.accesslist.v1.ListAllAccessListMembersRequest) returns (teleport.accesslist.v1.ListAllAccessListMembersResponse); + */ + listAllAccessListMembers(input: ListAllAccessListMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAllAccessListMembersResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[8]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: ListAllAccessListMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAllAccessListMembersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * GetAccessListMember returns the specified access list member resource. + * + * @generated from protobuf rpc: GetAccessListMember(teleport.accesslist.v1.GetAccessListMemberRequest) returns (teleport.accesslist.v1.Member); + */ + getAccessListMember(input: GetAccessListMemberRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), callback?: ((err: grpc.ServiceError | null, value?: Member) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[9]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: GetAccessListMemberRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Member => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * UpsertAccessListMember creates or updates an access list member resource. + * + * @generated from protobuf rpc: UpsertAccessListMember(teleport.accesslist.v1.UpsertAccessListMemberRequest) returns (teleport.accesslist.v1.Member); + */ + upsertAccessListMember(input: UpsertAccessListMemberRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Member) => void), callback?: ((err: grpc.ServiceError | null, value?: Member) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[10]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: UpsertAccessListMemberRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Member => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * DeleteAccessListMember hard deletes the specified access list member resource. + * + * @generated from protobuf rpc: DeleteAccessListMember(teleport.accesslist.v1.DeleteAccessListMemberRequest) returns (google.protobuf.Empty); + */ + deleteAccessListMember(input: DeleteAccessListMemberRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[11]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAccessListMemberRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * DeleteAllAccessListMembers hard deletes all access list members for an access list. + * + * @generated from protobuf rpc: DeleteAllAccessListMembersForAccessList(teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessListMembersForAccessList(input: DeleteAllAccessListMembersForAccessListRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[12]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAllAccessListMembersForAccessListRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * DeleteAllAccessListMembers hard deletes all access list members for an access list. + * + * @generated from protobuf rpc: DeleteAllAccessListMembers(teleport.accesslist.v1.DeleteAllAccessListMembersRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessListMembers(input: DeleteAllAccessListMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[13]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAllAccessListMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * UpsertAccessListWithMembers creates or updates an access list with members. + * + * @generated from protobuf rpc: UpsertAccessListWithMembers(teleport.accesslist.v1.UpsertAccessListWithMembersRequest) returns (teleport.accesslist.v1.UpsertAccessListWithMembersResponse); + */ + upsertAccessListWithMembers(input: UpsertAccessListWithMembersRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: UpsertAccessListWithMembersResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[14]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: UpsertAccessListWithMembersRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): UpsertAccessListWithMembersResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * ListAccessListReviews will list access list reviews for a particular access list. + * + * @generated from protobuf rpc: ListAccessListReviews(teleport.accesslist.v1.ListAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAccessListReviewsResponse); + */ + listAccessListReviews(input: ListAccessListReviewsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAccessListReviewsResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[15]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: ListAccessListReviewsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAccessListReviewsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * ListAllAccessListReviews will list access list reviews for all access lists. + * + * @generated from protobuf rpc: ListAllAccessListReviews(teleport.accesslist.v1.ListAllAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAllAccessListReviewsResponse); + */ + listAllAccessListReviews(input: ListAllAccessListReviewsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListAllAccessListReviewsResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[16]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: ListAllAccessListReviewsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListAllAccessListReviewsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * CreateAccessListReview will create a new review for an access list. It will also modify the original access list + * and its members depending on the details of the review. + * + * @generated from protobuf rpc: CreateAccessListReview(teleport.accesslist.v1.CreateAccessListReviewRequest) returns (teleport.accesslist.v1.CreateAccessListReviewResponse); + */ + createAccessListReview(input: CreateAccessListReviewRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: CreateAccessListReviewResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[17]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: CreateAccessListReviewRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): CreateAccessListReviewResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * DeleteAccessListReview will delete an access list review from the backend. + * + * @generated from protobuf rpc: DeleteAccessListReview(teleport.accesslist.v1.DeleteAccessListReviewRequest) returns (google.protobuf.Empty); + */ + deleteAccessListReview(input: DeleteAccessListReviewRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: Empty) => void), callback?: ((err: grpc.ServiceError | null, value?: Empty) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[18]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: DeleteAccessListReviewRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): Empty => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * AccessRequestPromote promotes an access request to an access list. + * + * @generated from protobuf rpc: AccessRequestPromote(teleport.accesslist.v1.AccessRequestPromoteRequest) returns (teleport.accesslist.v1.AccessRequestPromoteResponse); + */ + accessRequestPromote(input: AccessRequestPromoteRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: AccessRequestPromoteResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[19]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: AccessRequestPromoteRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): AccessRequestPromoteResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * GetSuggestedAccessLists returns suggested access lists for an access request. + * + * @generated from protobuf rpc: GetSuggestedAccessLists(teleport.accesslist.v1.GetSuggestedAccessListsRequest) returns (teleport.accesslist.v1.GetSuggestedAccessListsResponse); + */ + getSuggestedAccessLists(input: GetSuggestedAccessListsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: GetSuggestedAccessListsResponse) => void)): grpc.ClientUnaryCall { + const method = AccessListService.methods[20]; + return this.makeUnaryRequest(`/${AccessListService.typeName}/${method.name}`, (value: GetSuggestedAccessListsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): GetSuggestedAccessListsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } +} diff --git a/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.grpc-server.ts b/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.grpc-server.ts new file mode 100644 index 00000000000..43f42c2a2e9 --- /dev/null +++ b/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.grpc-server.ts @@ -0,0 +1,413 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/accesslist/v1/accesslist_service.proto" (package "teleport.accesslist.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Gravitational, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import { GetSuggestedAccessListsResponse } from "./accesslist_service_pb"; +import { GetSuggestedAccessListsRequest } from "./accesslist_service_pb"; +import { AccessRequestPromoteResponse } from "./accesslist_service_pb"; +import { AccessRequestPromoteRequest } from "./accesslist_service_pb"; +import { DeleteAccessListReviewRequest } from "./accesslist_service_pb"; +import { CreateAccessListReviewResponse } from "./accesslist_service_pb"; +import { CreateAccessListReviewRequest } from "./accesslist_service_pb"; +import { ListAllAccessListReviewsResponse } from "./accesslist_service_pb"; +import { ListAllAccessListReviewsRequest } from "./accesslist_service_pb"; +import { ListAccessListReviewsResponse } from "./accesslist_service_pb"; +import { ListAccessListReviewsRequest } from "./accesslist_service_pb"; +import { UpsertAccessListWithMembersResponse } from "./accesslist_service_pb"; +import { UpsertAccessListWithMembersRequest } from "./accesslist_service_pb"; +import { DeleteAllAccessListMembersRequest } from "./accesslist_service_pb"; +import { DeleteAllAccessListMembersForAccessListRequest } from "./accesslist_service_pb"; +import { DeleteAccessListMemberRequest } from "./accesslist_service_pb"; +import { UpsertAccessListMemberRequest } from "./accesslist_service_pb"; +import { Member } from "./accesslist_pb"; +import { GetAccessListMemberRequest } from "./accesslist_service_pb"; +import { ListAllAccessListMembersResponse } from "./accesslist_service_pb"; +import { ListAllAccessListMembersRequest } from "./accesslist_service_pb"; +import { ListAccessListMembersResponse } from "./accesslist_service_pb"; +import { ListAccessListMembersRequest } from "./accesslist_service_pb"; +import { GetAccessListsToReviewResponse } from "./accesslist_service_pb"; +import { GetAccessListsToReviewRequest } from "./accesslist_service_pb"; +import { DeleteAllAccessListsRequest } from "./accesslist_service_pb"; +import { Empty } from "../../../google/protobuf/empty_pb"; +import { DeleteAccessListRequest } from "./accesslist_service_pb"; +import { UpsertAccessListRequest } from "./accesslist_service_pb"; +import { AccessList } from "./accesslist_pb"; +import { GetAccessListRequest } from "./accesslist_service_pb"; +import { ListAccessListsResponse } from "./accesslist_service_pb"; +import { ListAccessListsRequest } from "./accesslist_service_pb"; +import { GetAccessListsResponse } from "./accesslist_service_pb"; +import { GetAccessListsRequest } from "./accesslist_service_pb"; +import type * as grpc from "@grpc/grpc-js"; +/** + * AccessListService provides CRUD methods for Access List resources. + * + * @generated from protobuf service teleport.accesslist.v1.AccessListService + */ +export interface IAccessListService extends grpc.UntypedServiceImplementation { + /** + * GetAccessLists returns a list of all access lists. + * + * @generated from protobuf rpc: GetAccessLists(teleport.accesslist.v1.GetAccessListsRequest) returns (teleport.accesslist.v1.GetAccessListsResponse); + */ + getAccessLists: grpc.handleUnaryCall; + /** + * ListAccessLists returns a paginated list of all access lists. + * + * @generated from protobuf rpc: ListAccessLists(teleport.accesslist.v1.ListAccessListsRequest) returns (teleport.accesslist.v1.ListAccessListsResponse); + */ + listAccessLists: grpc.handleUnaryCall; + /** + * GetAccessList returns the specified access list resource. + * + * @generated from protobuf rpc: GetAccessList(teleport.accesslist.v1.GetAccessListRequest) returns (teleport.accesslist.v1.AccessList); + */ + getAccessList: grpc.handleUnaryCall; + /** + * UpsertAccessList creates or updates an access list resource. + * + * @generated from protobuf rpc: UpsertAccessList(teleport.accesslist.v1.UpsertAccessListRequest) returns (teleport.accesslist.v1.AccessList); + */ + upsertAccessList: grpc.handleUnaryCall; + /** + * DeleteAccessList hard deletes the specified access list resource. + * + * @generated from protobuf rpc: DeleteAccessList(teleport.accesslist.v1.DeleteAccessListRequest) returns (google.protobuf.Empty); + */ + deleteAccessList: grpc.handleUnaryCall; + /** + * DeleteAllAccessLists hard deletes all access lists. + * + * @generated from protobuf rpc: DeleteAllAccessLists(teleport.accesslist.v1.DeleteAllAccessListsRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessLists: grpc.handleUnaryCall; + /** + * GetAccessListsToReview will return access lists that need to be reviewed by the current user. + * + * @generated from protobuf rpc: GetAccessListsToReview(teleport.accesslist.v1.GetAccessListsToReviewRequest) returns (teleport.accesslist.v1.GetAccessListsToReviewResponse); + */ + getAccessListsToReview: grpc.handleUnaryCall; + /** + * ListAccessListMembers returns a paginated list of all access list members. + * + * @generated from protobuf rpc: ListAccessListMembers(teleport.accesslist.v1.ListAccessListMembersRequest) returns (teleport.accesslist.v1.ListAccessListMembersResponse); + */ + listAccessListMembers: grpc.handleUnaryCall; + /** + * ListAllAccessListMembers returns a paginated list of all access list members for all access lists. + * + * @generated from protobuf rpc: ListAllAccessListMembers(teleport.accesslist.v1.ListAllAccessListMembersRequest) returns (teleport.accesslist.v1.ListAllAccessListMembersResponse); + */ + listAllAccessListMembers: grpc.handleUnaryCall; + /** + * GetAccessListMember returns the specified access list member resource. + * + * @generated from protobuf rpc: GetAccessListMember(teleport.accesslist.v1.GetAccessListMemberRequest) returns (teleport.accesslist.v1.Member); + */ + getAccessListMember: grpc.handleUnaryCall; + /** + * UpsertAccessListMember creates or updates an access list member resource. + * + * @generated from protobuf rpc: UpsertAccessListMember(teleport.accesslist.v1.UpsertAccessListMemberRequest) returns (teleport.accesslist.v1.Member); + */ + upsertAccessListMember: grpc.handleUnaryCall; + /** + * DeleteAccessListMember hard deletes the specified access list member resource. + * + * @generated from protobuf rpc: DeleteAccessListMember(teleport.accesslist.v1.DeleteAccessListMemberRequest) returns (google.protobuf.Empty); + */ + deleteAccessListMember: grpc.handleUnaryCall; + /** + * DeleteAllAccessListMembers hard deletes all access list members for an access list. + * + * @generated from protobuf rpc: DeleteAllAccessListMembersForAccessList(teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessListMembersForAccessList: grpc.handleUnaryCall; + /** + * DeleteAllAccessListMembers hard deletes all access list members for an access list. + * + * @generated from protobuf rpc: DeleteAllAccessListMembers(teleport.accesslist.v1.DeleteAllAccessListMembersRequest) returns (google.protobuf.Empty); + */ + deleteAllAccessListMembers: grpc.handleUnaryCall; + /** + * UpsertAccessListWithMembers creates or updates an access list with members. + * + * @generated from protobuf rpc: UpsertAccessListWithMembers(teleport.accesslist.v1.UpsertAccessListWithMembersRequest) returns (teleport.accesslist.v1.UpsertAccessListWithMembersResponse); + */ + upsertAccessListWithMembers: grpc.handleUnaryCall; + /** + * ListAccessListReviews will list access list reviews for a particular access list. + * + * @generated from protobuf rpc: ListAccessListReviews(teleport.accesslist.v1.ListAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAccessListReviewsResponse); + */ + listAccessListReviews: grpc.handleUnaryCall; + /** + * ListAllAccessListReviews will list access list reviews for all access lists. + * + * @generated from protobuf rpc: ListAllAccessListReviews(teleport.accesslist.v1.ListAllAccessListReviewsRequest) returns (teleport.accesslist.v1.ListAllAccessListReviewsResponse); + */ + listAllAccessListReviews: grpc.handleUnaryCall; + /** + * CreateAccessListReview will create a new review for an access list. It will also modify the original access list + * and its members depending on the details of the review. + * + * @generated from protobuf rpc: CreateAccessListReview(teleport.accesslist.v1.CreateAccessListReviewRequest) returns (teleport.accesslist.v1.CreateAccessListReviewResponse); + */ + createAccessListReview: grpc.handleUnaryCall; + /** + * DeleteAccessListReview will delete an access list review from the backend. + * + * @generated from protobuf rpc: DeleteAccessListReview(teleport.accesslist.v1.DeleteAccessListReviewRequest) returns (google.protobuf.Empty); + */ + deleteAccessListReview: grpc.handleUnaryCall; + /** + * AccessRequestPromote promotes an access request to an access list. + * + * @generated from protobuf rpc: AccessRequestPromote(teleport.accesslist.v1.AccessRequestPromoteRequest) returns (teleport.accesslist.v1.AccessRequestPromoteResponse); + */ + accessRequestPromote: grpc.handleUnaryCall; + /** + * GetSuggestedAccessLists returns suggested access lists for an access request. + * + * @generated from protobuf rpc: GetSuggestedAccessLists(teleport.accesslist.v1.GetSuggestedAccessListsRequest) returns (teleport.accesslist.v1.GetSuggestedAccessListsResponse); + */ + getSuggestedAccessLists: grpc.handleUnaryCall; +} +/** + * @grpc/grpc-js definition for the protobuf service teleport.accesslist.v1.AccessListService. + * + * Usage: Implement the interface IAccessListService and add to a grpc server. + * + * ```typescript + * const server = new grpc.Server(); + * const service: IAccessListService = ... + * server.addService(accessListServiceDefinition, service); + * ``` + */ +export const accessListServiceDefinition: grpc.ServiceDefinition = { + getAccessLists: { + path: "/teleport.accesslist.v1.AccessListService/GetAccessLists", + originalName: "GetAccessLists", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => GetAccessListsResponse.fromBinary(bytes), + requestDeserialize: bytes => GetAccessListsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(GetAccessListsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(GetAccessListsRequest.toBinary(value)) + }, + listAccessLists: { + path: "/teleport.accesslist.v1.AccessListService/ListAccessLists", + originalName: "ListAccessLists", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => ListAccessListsResponse.fromBinary(bytes), + requestDeserialize: bytes => ListAccessListsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(ListAccessListsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(ListAccessListsRequest.toBinary(value)) + }, + getAccessList: { + path: "/teleport.accesslist.v1.AccessListService/GetAccessList", + originalName: "GetAccessList", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => AccessList.fromBinary(bytes), + requestDeserialize: bytes => GetAccessListRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(AccessList.toBinary(value)), + requestSerialize: value => Buffer.from(GetAccessListRequest.toBinary(value)) + }, + upsertAccessList: { + path: "/teleport.accesslist.v1.AccessListService/UpsertAccessList", + originalName: "UpsertAccessList", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => AccessList.fromBinary(bytes), + requestDeserialize: bytes => UpsertAccessListRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(AccessList.toBinary(value)), + requestSerialize: value => Buffer.from(UpsertAccessListRequest.toBinary(value)) + }, + deleteAccessList: { + path: "/teleport.accesslist.v1.AccessListService/DeleteAccessList", + originalName: "DeleteAccessList", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Empty.fromBinary(bytes), + requestDeserialize: bytes => DeleteAccessListRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Empty.toBinary(value)), + requestSerialize: value => Buffer.from(DeleteAccessListRequest.toBinary(value)) + }, + deleteAllAccessLists: { + path: "/teleport.accesslist.v1.AccessListService/DeleteAllAccessLists", + originalName: "DeleteAllAccessLists", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Empty.fromBinary(bytes), + requestDeserialize: bytes => DeleteAllAccessListsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Empty.toBinary(value)), + requestSerialize: value => Buffer.from(DeleteAllAccessListsRequest.toBinary(value)) + }, + getAccessListsToReview: { + path: "/teleport.accesslist.v1.AccessListService/GetAccessListsToReview", + originalName: "GetAccessListsToReview", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => GetAccessListsToReviewResponse.fromBinary(bytes), + requestDeserialize: bytes => GetAccessListsToReviewRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(GetAccessListsToReviewResponse.toBinary(value)), + requestSerialize: value => Buffer.from(GetAccessListsToReviewRequest.toBinary(value)) + }, + listAccessListMembers: { + path: "/teleport.accesslist.v1.AccessListService/ListAccessListMembers", + originalName: "ListAccessListMembers", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => ListAccessListMembersResponse.fromBinary(bytes), + requestDeserialize: bytes => ListAccessListMembersRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(ListAccessListMembersResponse.toBinary(value)), + requestSerialize: value => Buffer.from(ListAccessListMembersRequest.toBinary(value)) + }, + listAllAccessListMembers: { + path: "/teleport.accesslist.v1.AccessListService/ListAllAccessListMembers", + originalName: "ListAllAccessListMembers", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => ListAllAccessListMembersResponse.fromBinary(bytes), + requestDeserialize: bytes => ListAllAccessListMembersRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(ListAllAccessListMembersResponse.toBinary(value)), + requestSerialize: value => Buffer.from(ListAllAccessListMembersRequest.toBinary(value)) + }, + getAccessListMember: { + path: "/teleport.accesslist.v1.AccessListService/GetAccessListMember", + originalName: "GetAccessListMember", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Member.fromBinary(bytes), + requestDeserialize: bytes => GetAccessListMemberRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Member.toBinary(value)), + requestSerialize: value => Buffer.from(GetAccessListMemberRequest.toBinary(value)) + }, + upsertAccessListMember: { + path: "/teleport.accesslist.v1.AccessListService/UpsertAccessListMember", + originalName: "UpsertAccessListMember", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Member.fromBinary(bytes), + requestDeserialize: bytes => UpsertAccessListMemberRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Member.toBinary(value)), + requestSerialize: value => Buffer.from(UpsertAccessListMemberRequest.toBinary(value)) + }, + deleteAccessListMember: { + path: "/teleport.accesslist.v1.AccessListService/DeleteAccessListMember", + originalName: "DeleteAccessListMember", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Empty.fromBinary(bytes), + requestDeserialize: bytes => DeleteAccessListMemberRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Empty.toBinary(value)), + requestSerialize: value => Buffer.from(DeleteAccessListMemberRequest.toBinary(value)) + }, + deleteAllAccessListMembersForAccessList: { + path: "/teleport.accesslist.v1.AccessListService/DeleteAllAccessListMembersForAccessList", + originalName: "DeleteAllAccessListMembersForAccessList", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Empty.fromBinary(bytes), + requestDeserialize: bytes => DeleteAllAccessListMembersForAccessListRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Empty.toBinary(value)), + requestSerialize: value => Buffer.from(DeleteAllAccessListMembersForAccessListRequest.toBinary(value)) + }, + deleteAllAccessListMembers: { + path: "/teleport.accesslist.v1.AccessListService/DeleteAllAccessListMembers", + originalName: "DeleteAllAccessListMembers", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Empty.fromBinary(bytes), + requestDeserialize: bytes => DeleteAllAccessListMembersRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Empty.toBinary(value)), + requestSerialize: value => Buffer.from(DeleteAllAccessListMembersRequest.toBinary(value)) + }, + upsertAccessListWithMembers: { + path: "/teleport.accesslist.v1.AccessListService/UpsertAccessListWithMembers", + originalName: "UpsertAccessListWithMembers", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => UpsertAccessListWithMembersResponse.fromBinary(bytes), + requestDeserialize: bytes => UpsertAccessListWithMembersRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(UpsertAccessListWithMembersResponse.toBinary(value)), + requestSerialize: value => Buffer.from(UpsertAccessListWithMembersRequest.toBinary(value)) + }, + listAccessListReviews: { + path: "/teleport.accesslist.v1.AccessListService/ListAccessListReviews", + originalName: "ListAccessListReviews", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => ListAccessListReviewsResponse.fromBinary(bytes), + requestDeserialize: bytes => ListAccessListReviewsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(ListAccessListReviewsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(ListAccessListReviewsRequest.toBinary(value)) + }, + listAllAccessListReviews: { + path: "/teleport.accesslist.v1.AccessListService/ListAllAccessListReviews", + originalName: "ListAllAccessListReviews", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => ListAllAccessListReviewsResponse.fromBinary(bytes), + requestDeserialize: bytes => ListAllAccessListReviewsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(ListAllAccessListReviewsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(ListAllAccessListReviewsRequest.toBinary(value)) + }, + createAccessListReview: { + path: "/teleport.accesslist.v1.AccessListService/CreateAccessListReview", + originalName: "CreateAccessListReview", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => CreateAccessListReviewResponse.fromBinary(bytes), + requestDeserialize: bytes => CreateAccessListReviewRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(CreateAccessListReviewResponse.toBinary(value)), + requestSerialize: value => Buffer.from(CreateAccessListReviewRequest.toBinary(value)) + }, + deleteAccessListReview: { + path: "/teleport.accesslist.v1.AccessListService/DeleteAccessListReview", + originalName: "DeleteAccessListReview", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => Empty.fromBinary(bytes), + requestDeserialize: bytes => DeleteAccessListReviewRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(Empty.toBinary(value)), + requestSerialize: value => Buffer.from(DeleteAccessListReviewRequest.toBinary(value)) + }, + accessRequestPromote: { + path: "/teleport.accesslist.v1.AccessListService/AccessRequestPromote", + originalName: "AccessRequestPromote", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => AccessRequestPromoteResponse.fromBinary(bytes), + requestDeserialize: bytes => AccessRequestPromoteRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(AccessRequestPromoteResponse.toBinary(value)), + requestSerialize: value => Buffer.from(AccessRequestPromoteRequest.toBinary(value)) + }, + getSuggestedAccessLists: { + path: "/teleport.accesslist.v1.AccessListService/GetSuggestedAccessLists", + originalName: "GetSuggestedAccessLists", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => GetSuggestedAccessListsResponse.fromBinary(bytes), + requestDeserialize: bytes => GetSuggestedAccessListsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(GetSuggestedAccessListsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(GetSuggestedAccessListsRequest.toBinary(value)) + } +}; diff --git a/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.ts b/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.ts new file mode 100644 index 00000000000..1bd059afd01 --- /dev/null +++ b/gen/proto/ts/teleport/accesslist/v1/accesslist_service_pb.ts @@ -0,0 +1,2141 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/accesslist/v1/accesslist_service.proto" (package "teleport.accesslist.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Gravitational, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import { Empty } from "../../../google/protobuf/empty_pb"; +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { AccessRequestV3 } from "../../legacy/types/types_pb"; +import { Timestamp } from "../../../google/protobuf/timestamp_pb"; +import { Review } from "./accesslist_pb"; +import { Member } from "./accesslist_pb"; +import { AccessList } from "./accesslist_pb"; +/** + * GetAccessListsRequest is the request for getting all access lists. + * + * @generated from protobuf message teleport.accesslist.v1.GetAccessListsRequest + */ +export interface GetAccessListsRequest { +} +/** + * GetAccessListsResponse is the response for getting all access lists. + * + * @generated from protobuf message teleport.accesslist.v1.GetAccessListsResponse + */ +export interface GetAccessListsResponse { + /** + * access_lists is the list of access lists. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.AccessList access_lists = 1; + */ + accessLists: AccessList[]; +} +/** + * ListAccessListsRequest is the request for getting paginated access lists. + * + * @generated from protobuf message teleport.accesslist.v1.ListAccessListsRequest + */ +export interface ListAccessListsRequest { + /** + * page_size is the size of the page to request. + * + * @generated from protobuf field: int32 page_size = 1; + */ + pageSize: number; + /** + * next_token is the page token. + * + * @generated from protobuf field: string next_token = 2; + */ + nextToken: string; +} +/** + * ListAccessListsResponse is the response for getting paginated access lists. + * + * @generated from protobuf message teleport.accesslist.v1.ListAccessListsResponse + */ +export interface ListAccessListsResponse { + /** + * access_lists is the list of access lists. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.AccessList access_lists = 1; + */ + accessLists: AccessList[]; + /** + * next_token is the next page token. + * + * @generated from protobuf field: string next_token = 2; + */ + nextToken: string; +} +/** + * GetAccessListRequest is the request for retrieving an access list. + * + * @generated from protobuf message teleport.accesslist.v1.GetAccessListRequest + */ +export interface GetAccessListRequest { + /** + * name is the name of the access list to retrieve. + * + * @generated from protobuf field: string name = 1; + */ + name: string; +} +/** + * UpsertAccessListRequest is the request for upserting an access list. + * + * @generated from protobuf message teleport.accesslist.v1.UpsertAccessListRequest + */ +export interface UpsertAccessListRequest { + /** + * access_list is the access list to upsert. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessList access_list = 1; + */ + accessList?: AccessList; +} +/** + * DeleteAccessListRequest is the request for deleting an access list. + * + * @generated from protobuf message teleport.accesslist.v1.DeleteAccessListRequest + */ +export interface DeleteAccessListRequest { + /** + * name is the name of the access list to delete. + * + * @generated from protobuf field: string name = 1; + */ + name: string; +} +/** + * DeleteAllAccessListsRequest is the request for deleting all access lists. + * + * @generated from protobuf message teleport.accesslist.v1.DeleteAllAccessListsRequest + */ +export interface DeleteAllAccessListsRequest { +} +/** + * GetAccessListsToReviewRequest is the request for getting access lists that the current user needs to review. + * + * @generated from protobuf message teleport.accesslist.v1.GetAccessListsToReviewRequest + */ +export interface GetAccessListsToReviewRequest { +} +/** + * GetAccessListsToReviewResponse is the response for getting access lists that the current user needs to review. + * + * @generated from protobuf message teleport.accesslist.v1.GetAccessListsToReviewResponse + */ +export interface GetAccessListsToReviewResponse { + /** + * @generated from protobuf field: repeated teleport.accesslist.v1.AccessList access_lists = 1; + */ + accessLists: AccessList[]; +} +/** + * ListAccessListMembersRequest is the request for getting paginated access list members. + * + * @generated from protobuf message teleport.accesslist.v1.ListAccessListMembersRequest + */ +export interface ListAccessListMembersRequest { + /** + * page_size is the size of the page to request. + * + * @generated from protobuf field: int32 page_size = 1; + */ + pageSize: number; + /** + * page_token is the page token. + * + * @generated from protobuf field: string page_token = 2; + */ + pageToken: string; + /** + * access_list is the name of the access list that the member belongs to. + * + * @generated from protobuf field: string access_list = 3; + */ + accessList: string; +} +/** + * ListAccessListMembersResponse is the response for getting paginated access list members. + * + * @generated from protobuf message teleport.accesslist.v1.ListAccessListMembersResponse + */ +export interface ListAccessListMembersResponse { + /** + * members is the list of access list members. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.Member members = 1; + */ + members: Member[]; + /** + * next_page_token is the next page token. + * + * @generated from protobuf field: string next_page_token = 2; + */ + nextPageToken: string; +} +/** + * ListAllAccessListMembersRequest is the request for getting paginated access list members for all access lists. + * + * @generated from protobuf message teleport.accesslist.v1.ListAllAccessListMembersRequest + */ +export interface ListAllAccessListMembersRequest { + /** + * page_size is the size of the page to request. + * + * @generated from protobuf field: int32 page_size = 1; + */ + pageSize: number; + /** + * page_token is the page token. + * + * @generated from protobuf field: string page_token = 2; + */ + pageToken: string; +} +/** + * ListAllAccessListMembersResponse is the response for getting paginated access list members for all access lists. + * + * @generated from protobuf message teleport.accesslist.v1.ListAllAccessListMembersResponse + */ +export interface ListAllAccessListMembersResponse { + /** + * members is the list of access list members. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.Member members = 1; + */ + members: Member[]; + /** + * next_page_token is the next page token. + * + * @generated from protobuf field: string next_page_token = 2; + */ + nextPageToken: string; +} +/** + * UpsertAccessListWithMembers is the request for upserting an access list with members. + * + * @generated from protobuf message teleport.accesslist.v1.UpsertAccessListWithMembersRequest + */ +export interface UpsertAccessListWithMembersRequest { + /** + * access_list is the access list to upsert. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessList access_list = 1; + */ + accessList?: AccessList; + /** + * members is the list of access list members. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.Member members = 2; + */ + members: Member[]; +} +/** + * UpsertAccessListWithMembersResponse is the response for upserting an access list with members. + * + * @generated from protobuf message teleport.accesslist.v1.UpsertAccessListWithMembersResponse + */ +export interface UpsertAccessListWithMembersResponse { + /** + * access_list is the access list that was upserted. + * + * @generated from protobuf field: teleport.accesslist.v1.AccessList access_list = 1; + */ + accessList?: AccessList; + /** + * members is the list of access list members that were upserted. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.Member members = 2; + */ + members: Member[]; +} +/** + * GetAccessListMemberRequest is the request for retrieving an access list member. + * + * @generated from protobuf message teleport.accesslist.v1.GetAccessListMemberRequest + */ +export interface GetAccessListMemberRequest { + /** + * access_list is the name of the access list that the member belongs to. + * + * @generated from protobuf field: string access_list = 1; + */ + accessList: string; + /** + * member_name is the name of the user that belongs to the access list. + * + * @generated from protobuf field: string member_name = 2; + */ + memberName: string; +} +/** + * UpsertAccessListMemberRequest is the request for upserting an access list member. + * + * @generated from protobuf message teleport.accesslist.v1.UpsertAccessListMemberRequest + */ +export interface UpsertAccessListMemberRequest { + /** + * member is the access list member to upsert. + * + * @generated from protobuf field: teleport.accesslist.v1.Member member = 4; + */ + member?: Member; +} +/** + * DeleteAccessListMemberRequest is the request for deleting a member from an access list. + * + * @generated from protobuf message teleport.accesslist.v1.DeleteAccessListMemberRequest + */ +export interface DeleteAccessListMemberRequest { + /** + * access_list is the name of access list. + * + * @generated from protobuf field: string access_list = 1; + */ + accessList: string; + /** + * member_name is the name of the user to delete. + * + * @generated from protobuf field: string member_name = 3; + */ + memberName: string; +} +/** + * DeleteAllAccessListMembersForAccessListRequest is the request for deleting all members from an access list. + * + * @generated from protobuf message teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest + */ +export interface DeleteAllAccessListMembersForAccessListRequest { + /** + * access_list is the name of access list. + * + * @generated from protobuf field: string access_list = 1; + */ + accessList: string; +} +/** + * DeleteAllAccessListMembersRequest is the request for all access list members in the backend. + * + * @generated from protobuf message teleport.accesslist.v1.DeleteAllAccessListMembersRequest + */ +export interface DeleteAllAccessListMembersRequest { +} +/** + * ListAccessListReviewsRequest is the request for getting paginated access list reviews for a particular access list. + * + * @generated from protobuf message teleport.accesslist.v1.ListAccessListReviewsRequest + */ +export interface ListAccessListReviewsRequest { + /** + * access_list is the name of the access list that we're listing reviews for. + * + * @generated from protobuf field: string access_list = 1; + */ + accessList: string; + /** + * page_size is the size of the page to request. + * + * @generated from protobuf field: int32 page_size = 2; + */ + pageSize: number; + /** + * next_token is the page token. + * + * @generated from protobuf field: string next_token = 3; + */ + nextToken: string; +} +/** + * ListAccessListReviewsResponse is the response for getting paginated access list reviews for a particular access list. + * + * @generated from protobuf message teleport.accesslist.v1.ListAccessListReviewsResponse + */ +export interface ListAccessListReviewsResponse { + /** + * reviews is the list of access list reviews. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.Review reviews = 1; + */ + reviews: Review[]; + /** + * next_token is the next page token. + * + * @generated from protobuf field: string next_token = 2; + */ + nextToken: string; +} +/** + * ListAllAccessListReviewsRequest is the request for getting paginated access list reviews for all access lists. + * + * @generated from protobuf message teleport.accesslist.v1.ListAllAccessListReviewsRequest + */ +export interface ListAllAccessListReviewsRequest { + /** + * page_size is the size of the page to request. + * + * @generated from protobuf field: int32 page_size = 1; + */ + pageSize: number; + /** + * next_token is the page token. + * + * @generated from protobuf field: string next_token = 2; + */ + nextToken: string; +} +/** + * ListAllAccessListReviewsResponse is the response for getting paginated access list reviews for all access lists. + * + * @generated from protobuf message teleport.accesslist.v1.ListAllAccessListReviewsResponse + */ +export interface ListAllAccessListReviewsResponse { + /** + * reviews is the list of access list reviews. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.Review reviews = 1; + */ + reviews: Review[]; + /** + * next_token is the next page token. + * + * @generated from protobuf field: string next_token = 2; + */ + nextToken: string; +} +/** + * CreateAccessListReviewRequest is the request for creating an access list review. + * + * @generated from protobuf message teleport.accesslist.v1.CreateAccessListReviewRequest + */ +export interface CreateAccessListReviewRequest { + /** + * review is the actual review to create. + * + * @generated from protobuf field: teleport.accesslist.v1.Review review = 1; + */ + review?: Review; +} +/** + * CreateAccessListReviewResponse is the response for creating an access list review. + * + * @generated from protobuf message teleport.accesslist.v1.CreateAccessListReviewResponse + */ +export interface CreateAccessListReviewResponse { + /** + * review_name is the name of the review that was just created. + * + * @generated from protobuf field: string review_name = 1; + */ + reviewName: string; + /** + * next_audit_date is when the next audit should be done by. + * + * @generated from protobuf field: google.protobuf.Timestamp next_audit_date = 2; + */ + nextAuditDate?: Timestamp; +} +/** + * DeleteAccessListReviewRequest is the request for deleting an access list review. + * + * @generated from protobuf message teleport.accesslist.v1.DeleteAccessListReviewRequest + */ +export interface DeleteAccessListReviewRequest { + /** + * review_name is the name of the review to delete. + * + * @generated from protobuf field: string review_name = 1; + */ + reviewName: string; + /** + * access_list_name is the name of the access list to delete the review from. + * + * @generated from protobuf field: string access_list_name = 2; + */ + accessListName: string; +} +/** + * AccessRequestPromoteRequest is the request for promoting an access request to an access list. + * + * @generated from protobuf message teleport.accesslist.v1.AccessRequestPromoteRequest + */ +export interface AccessRequestPromoteRequest { + /** + * RequestID is the unique ID of the request to be promoted. + * + * @generated from protobuf field: string request_id = 1; + */ + requestId: string; + /** + * AccessListName is the name of the access list to promote the request to. + * + * @generated from protobuf field: string access_list_name = 2; + */ + accessListName: string; + /** + * Reason is the access request review reason. + * + * @generated from protobuf field: string reason = 3; + */ + reason: string; +} +/** + * AccessRequestPromoteResponse is the response for promoting an access request to an access list. + * + * @generated from protobuf message teleport.accesslist.v1.AccessRequestPromoteResponse + */ +export interface AccessRequestPromoteResponse { + /** + * AccessRequest is the updated access request. + * + * @generated from protobuf field: types.AccessRequestV3 access_request = 1; + */ + accessRequest?: AccessRequestV3; +} +/** + * GetSuggestedAccessListsRequest is the request for suggested access lists for an access request. + * + * @generated from protobuf message teleport.accesslist.v1.GetSuggestedAccessListsRequest + */ +export interface GetSuggestedAccessListsRequest { + /** + * access_request_id is the unique ID of the request. + * + * @generated from protobuf field: string access_request_id = 1; + */ + accessRequestId: string; +} +/** + * GetSuggestedAccessListsResponse is the response for suggested access lists for an access request. + * + * @generated from protobuf message teleport.accesslist.v1.GetSuggestedAccessListsResponse + */ +export interface GetSuggestedAccessListsResponse { + /** + * access_lists is the list of suggested lists. + * + * @generated from protobuf field: repeated teleport.accesslist.v1.AccessList access_lists = 1; + */ + accessLists: AccessList[]; +} +// @generated message type with reflection information, may provide speed optimized methods +class GetAccessListsRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetAccessListsRequest", []); + } + create(value?: PartialMessage): GetAccessListsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAccessListsRequest): GetAccessListsRequest { + return target ?? this.create(); + } + internalBinaryWrite(message: GetAccessListsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetAccessListsRequest + */ +export const GetAccessListsRequest = new GetAccessListsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetAccessListsResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetAccessListsResponse", [ + { no: 1, name: "access_lists", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AccessList } + ]); + } + create(value?: PartialMessage): GetAccessListsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessLists = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAccessListsResponse): GetAccessListsResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.AccessList access_lists */ 1: + message.accessLists.push(AccessList.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetAccessListsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.AccessList access_lists = 1; */ + for (let i = 0; i < message.accessLists.length; i++) + AccessList.internalBinaryWrite(message.accessLists[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetAccessListsResponse + */ +export const GetAccessListsResponse = new GetAccessListsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAccessListsRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAccessListsRequest", [ + { no: 1, name: "page_size", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "next_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAccessListsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.pageSize = 0; + message.nextToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessListsRequest): ListAccessListsRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int32 page_size */ 1: + message.pageSize = reader.int32(); + break; + case /* string next_token */ 2: + message.nextToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAccessListsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int32 page_size = 1; */ + if (message.pageSize !== 0) + writer.tag(1, WireType.Varint).int32(message.pageSize); + /* string next_token = 2; */ + if (message.nextToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.nextToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAccessListsRequest + */ +export const ListAccessListsRequest = new ListAccessListsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAccessListsResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAccessListsResponse", [ + { no: 1, name: "access_lists", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AccessList }, + { no: 2, name: "next_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAccessListsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessLists = []; + message.nextToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessListsResponse): ListAccessListsResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.AccessList access_lists */ 1: + message.accessLists.push(AccessList.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* string next_token */ 2: + message.nextToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAccessListsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.AccessList access_lists = 1; */ + for (let i = 0; i < message.accessLists.length; i++) + AccessList.internalBinaryWrite(message.accessLists[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string next_token = 2; */ + if (message.nextToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.nextToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAccessListsResponse + */ +export const ListAccessListsResponse = new ListAccessListsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetAccessListRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetAccessListRequest", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): GetAccessListRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAccessListRequest): GetAccessListRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetAccessListRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.name); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetAccessListRequest + */ +export const GetAccessListRequest = new GetAccessListRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UpsertAccessListRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.UpsertAccessListRequest", [ + { no: 1, name: "access_list", kind: "message", T: () => AccessList } + ]); + } + create(value?: PartialMessage): UpsertAccessListRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpsertAccessListRequest): UpsertAccessListRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.accesslist.v1.AccessList access_list */ 1: + message.accessList = AccessList.internalBinaryRead(reader, reader.uint32(), options, message.accessList); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UpsertAccessListRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.accesslist.v1.AccessList access_list = 1; */ + if (message.accessList) + AccessList.internalBinaryWrite(message.accessList, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.UpsertAccessListRequest + */ +export const UpsertAccessListRequest = new UpsertAccessListRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteAccessListRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.DeleteAccessListRequest", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DeleteAccessListRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAccessListRequest): DeleteAccessListRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteAccessListRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.name); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.DeleteAccessListRequest + */ +export const DeleteAccessListRequest = new DeleteAccessListRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteAllAccessListsRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.DeleteAllAccessListsRequest", []); + } + create(value?: PartialMessage): DeleteAllAccessListsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAllAccessListsRequest): DeleteAllAccessListsRequest { + return target ?? this.create(); + } + internalBinaryWrite(message: DeleteAllAccessListsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.DeleteAllAccessListsRequest + */ +export const DeleteAllAccessListsRequest = new DeleteAllAccessListsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetAccessListsToReviewRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetAccessListsToReviewRequest", []); + } + create(value?: PartialMessage): GetAccessListsToReviewRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAccessListsToReviewRequest): GetAccessListsToReviewRequest { + return target ?? this.create(); + } + internalBinaryWrite(message: GetAccessListsToReviewRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetAccessListsToReviewRequest + */ +export const GetAccessListsToReviewRequest = new GetAccessListsToReviewRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetAccessListsToReviewResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetAccessListsToReviewResponse", [ + { no: 1, name: "access_lists", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AccessList } + ]); + } + create(value?: PartialMessage): GetAccessListsToReviewResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessLists = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAccessListsToReviewResponse): GetAccessListsToReviewResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.AccessList access_lists */ 1: + message.accessLists.push(AccessList.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetAccessListsToReviewResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.AccessList access_lists = 1; */ + for (let i = 0; i < message.accessLists.length; i++) + AccessList.internalBinaryWrite(message.accessLists[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetAccessListsToReviewResponse + */ +export const GetAccessListsToReviewResponse = new GetAccessListsToReviewResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAccessListMembersRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAccessListMembersRequest", [ + { no: 1, name: "page_size", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "page_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "access_list", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAccessListMembersRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.pageSize = 0; + message.pageToken = ""; + message.accessList = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessListMembersRequest): ListAccessListMembersRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int32 page_size */ 1: + message.pageSize = reader.int32(); + break; + case /* string page_token */ 2: + message.pageToken = reader.string(); + break; + case /* string access_list */ 3: + message.accessList = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAccessListMembersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int32 page_size = 1; */ + if (message.pageSize !== 0) + writer.tag(1, WireType.Varint).int32(message.pageSize); + /* string page_token = 2; */ + if (message.pageToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.pageToken); + /* string access_list = 3; */ + if (message.accessList !== "") + writer.tag(3, WireType.LengthDelimited).string(message.accessList); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAccessListMembersRequest + */ +export const ListAccessListMembersRequest = new ListAccessListMembersRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAccessListMembersResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAccessListMembersResponse", [ + { no: 1, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Member }, + { no: 2, name: "next_page_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAccessListMembersResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.members = []; + message.nextPageToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessListMembersResponse): ListAccessListMembersResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.Member members */ 1: + message.members.push(Member.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* string next_page_token */ 2: + message.nextPageToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAccessListMembersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.Member members = 1; */ + for (let i = 0; i < message.members.length; i++) + Member.internalBinaryWrite(message.members[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string next_page_token = 2; */ + if (message.nextPageToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.nextPageToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAccessListMembersResponse + */ +export const ListAccessListMembersResponse = new ListAccessListMembersResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAllAccessListMembersRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAllAccessListMembersRequest", [ + { no: 1, name: "page_size", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "page_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAllAccessListMembersRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.pageSize = 0; + message.pageToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAllAccessListMembersRequest): ListAllAccessListMembersRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int32 page_size */ 1: + message.pageSize = reader.int32(); + break; + case /* string page_token */ 2: + message.pageToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAllAccessListMembersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int32 page_size = 1; */ + if (message.pageSize !== 0) + writer.tag(1, WireType.Varint).int32(message.pageSize); + /* string page_token = 2; */ + if (message.pageToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.pageToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAllAccessListMembersRequest + */ +export const ListAllAccessListMembersRequest = new ListAllAccessListMembersRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAllAccessListMembersResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAllAccessListMembersResponse", [ + { no: 1, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Member }, + { no: 2, name: "next_page_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAllAccessListMembersResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.members = []; + message.nextPageToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAllAccessListMembersResponse): ListAllAccessListMembersResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.Member members */ 1: + message.members.push(Member.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* string next_page_token */ 2: + message.nextPageToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAllAccessListMembersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.Member members = 1; */ + for (let i = 0; i < message.members.length; i++) + Member.internalBinaryWrite(message.members[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string next_page_token = 2; */ + if (message.nextPageToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.nextPageToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAllAccessListMembersResponse + */ +export const ListAllAccessListMembersResponse = new ListAllAccessListMembersResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UpsertAccessListWithMembersRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.UpsertAccessListWithMembersRequest", [ + { no: 1, name: "access_list", kind: "message", T: () => AccessList }, + { no: 2, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Member } + ]); + } + create(value?: PartialMessage): UpsertAccessListWithMembersRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.members = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpsertAccessListWithMembersRequest): UpsertAccessListWithMembersRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.accesslist.v1.AccessList access_list */ 1: + message.accessList = AccessList.internalBinaryRead(reader, reader.uint32(), options, message.accessList); + break; + case /* repeated teleport.accesslist.v1.Member members */ 2: + message.members.push(Member.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UpsertAccessListWithMembersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.accesslist.v1.AccessList access_list = 1; */ + if (message.accessList) + AccessList.internalBinaryWrite(message.accessList, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* repeated teleport.accesslist.v1.Member members = 2; */ + for (let i = 0; i < message.members.length; i++) + Member.internalBinaryWrite(message.members[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.UpsertAccessListWithMembersRequest + */ +export const UpsertAccessListWithMembersRequest = new UpsertAccessListWithMembersRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UpsertAccessListWithMembersResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.UpsertAccessListWithMembersResponse", [ + { no: 1, name: "access_list", kind: "message", T: () => AccessList }, + { no: 2, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Member } + ]); + } + create(value?: PartialMessage): UpsertAccessListWithMembersResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.members = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpsertAccessListWithMembersResponse): UpsertAccessListWithMembersResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.accesslist.v1.AccessList access_list */ 1: + message.accessList = AccessList.internalBinaryRead(reader, reader.uint32(), options, message.accessList); + break; + case /* repeated teleport.accesslist.v1.Member members */ 2: + message.members.push(Member.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UpsertAccessListWithMembersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.accesslist.v1.AccessList access_list = 1; */ + if (message.accessList) + AccessList.internalBinaryWrite(message.accessList, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* repeated teleport.accesslist.v1.Member members = 2; */ + for (let i = 0; i < message.members.length; i++) + Member.internalBinaryWrite(message.members[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.UpsertAccessListWithMembersResponse + */ +export const UpsertAccessListWithMembersResponse = new UpsertAccessListWithMembersResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetAccessListMemberRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetAccessListMemberRequest", [ + { no: 1, name: "access_list", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "member_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): GetAccessListMemberRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessList = ""; + message.memberName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAccessListMemberRequest): GetAccessListMemberRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string access_list */ 1: + message.accessList = reader.string(); + break; + case /* string member_name */ 2: + message.memberName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetAccessListMemberRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string access_list = 1; */ + if (message.accessList !== "") + writer.tag(1, WireType.LengthDelimited).string(message.accessList); + /* string member_name = 2; */ + if (message.memberName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.memberName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetAccessListMemberRequest + */ +export const GetAccessListMemberRequest = new GetAccessListMemberRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UpsertAccessListMemberRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.UpsertAccessListMemberRequest", [ + { no: 4, name: "member", kind: "message", T: () => Member } + ]); + } + create(value?: PartialMessage): UpsertAccessListMemberRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpsertAccessListMemberRequest): UpsertAccessListMemberRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.accesslist.v1.Member member */ 4: + message.member = Member.internalBinaryRead(reader, reader.uint32(), options, message.member); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UpsertAccessListMemberRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.accesslist.v1.Member member = 4; */ + if (message.member) + Member.internalBinaryWrite(message.member, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.UpsertAccessListMemberRequest + */ +export const UpsertAccessListMemberRequest = new UpsertAccessListMemberRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteAccessListMemberRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.DeleteAccessListMemberRequest", [ + { no: 1, name: "access_list", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "member_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DeleteAccessListMemberRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessList = ""; + message.memberName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAccessListMemberRequest): DeleteAccessListMemberRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string access_list */ 1: + message.accessList = reader.string(); + break; + case /* string member_name */ 3: + message.memberName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteAccessListMemberRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string access_list = 1; */ + if (message.accessList !== "") + writer.tag(1, WireType.LengthDelimited).string(message.accessList); + /* string member_name = 3; */ + if (message.memberName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.memberName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.DeleteAccessListMemberRequest + */ +export const DeleteAccessListMemberRequest = new DeleteAccessListMemberRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteAllAccessListMembersForAccessListRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest", [ + { no: 1, name: "access_list", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DeleteAllAccessListMembersForAccessListRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessList = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAllAccessListMembersForAccessListRequest): DeleteAllAccessListMembersForAccessListRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string access_list */ 1: + message.accessList = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteAllAccessListMembersForAccessListRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string access_list = 1; */ + if (message.accessList !== "") + writer.tag(1, WireType.LengthDelimited).string(message.accessList); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.DeleteAllAccessListMembersForAccessListRequest + */ +export const DeleteAllAccessListMembersForAccessListRequest = new DeleteAllAccessListMembersForAccessListRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteAllAccessListMembersRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.DeleteAllAccessListMembersRequest", []); + } + create(value?: PartialMessage): DeleteAllAccessListMembersRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAllAccessListMembersRequest): DeleteAllAccessListMembersRequest { + return target ?? this.create(); + } + internalBinaryWrite(message: DeleteAllAccessListMembersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.DeleteAllAccessListMembersRequest + */ +export const DeleteAllAccessListMembersRequest = new DeleteAllAccessListMembersRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAccessListReviewsRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAccessListReviewsRequest", [ + { no: 1, name: "access_list", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "page_size", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "next_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAccessListReviewsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessList = ""; + message.pageSize = 0; + message.nextToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessListReviewsRequest): ListAccessListReviewsRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string access_list */ 1: + message.accessList = reader.string(); + break; + case /* int32 page_size */ 2: + message.pageSize = reader.int32(); + break; + case /* string next_token */ 3: + message.nextToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAccessListReviewsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string access_list = 1; */ + if (message.accessList !== "") + writer.tag(1, WireType.LengthDelimited).string(message.accessList); + /* int32 page_size = 2; */ + if (message.pageSize !== 0) + writer.tag(2, WireType.Varint).int32(message.pageSize); + /* string next_token = 3; */ + if (message.nextToken !== "") + writer.tag(3, WireType.LengthDelimited).string(message.nextToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAccessListReviewsRequest + */ +export const ListAccessListReviewsRequest = new ListAccessListReviewsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAccessListReviewsResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAccessListReviewsResponse", [ + { no: 1, name: "reviews", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Review }, + { no: 2, name: "next_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAccessListReviewsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reviews = []; + message.nextToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessListReviewsResponse): ListAccessListReviewsResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.Review reviews */ 1: + message.reviews.push(Review.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* string next_token */ 2: + message.nextToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAccessListReviewsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.Review reviews = 1; */ + for (let i = 0; i < message.reviews.length; i++) + Review.internalBinaryWrite(message.reviews[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string next_token = 2; */ + if (message.nextToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.nextToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAccessListReviewsResponse + */ +export const ListAccessListReviewsResponse = new ListAccessListReviewsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAllAccessListReviewsRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAllAccessListReviewsRequest", [ + { no: 1, name: "page_size", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "next_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAllAccessListReviewsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.pageSize = 0; + message.nextToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAllAccessListReviewsRequest): ListAllAccessListReviewsRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int32 page_size */ 1: + message.pageSize = reader.int32(); + break; + case /* string next_token */ 2: + message.nextToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAllAccessListReviewsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int32 page_size = 1; */ + if (message.pageSize !== 0) + writer.tag(1, WireType.Varint).int32(message.pageSize); + /* string next_token = 2; */ + if (message.nextToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.nextToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAllAccessListReviewsRequest + */ +export const ListAllAccessListReviewsRequest = new ListAllAccessListReviewsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListAllAccessListReviewsResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.ListAllAccessListReviewsResponse", [ + { no: 1, name: "reviews", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Review }, + { no: 2, name: "next_token", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListAllAccessListReviewsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reviews = []; + message.nextToken = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAllAccessListReviewsResponse): ListAllAccessListReviewsResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.Review reviews */ 1: + message.reviews.push(Review.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* string next_token */ 2: + message.nextToken = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListAllAccessListReviewsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.Review reviews = 1; */ + for (let i = 0; i < message.reviews.length; i++) + Review.internalBinaryWrite(message.reviews[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string next_token = 2; */ + if (message.nextToken !== "") + writer.tag(2, WireType.LengthDelimited).string(message.nextToken); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.ListAllAccessListReviewsResponse + */ +export const ListAllAccessListReviewsResponse = new ListAllAccessListReviewsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CreateAccessListReviewRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.CreateAccessListReviewRequest", [ + { no: 1, name: "review", kind: "message", T: () => Review } + ]); + } + create(value?: PartialMessage): CreateAccessListReviewRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateAccessListReviewRequest): CreateAccessListReviewRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.accesslist.v1.Review review */ 1: + message.review = Review.internalBinaryRead(reader, reader.uint32(), options, message.review); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: CreateAccessListReviewRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.accesslist.v1.Review review = 1; */ + if (message.review) + Review.internalBinaryWrite(message.review, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.CreateAccessListReviewRequest + */ +export const CreateAccessListReviewRequest = new CreateAccessListReviewRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CreateAccessListReviewResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.CreateAccessListReviewResponse", [ + { no: 1, name: "review_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "next_audit_date", kind: "message", T: () => Timestamp } + ]); + } + create(value?: PartialMessage): CreateAccessListReviewResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reviewName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateAccessListReviewResponse): CreateAccessListReviewResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string review_name */ 1: + message.reviewName = reader.string(); + break; + case /* google.protobuf.Timestamp next_audit_date */ 2: + message.nextAuditDate = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.nextAuditDate); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: CreateAccessListReviewResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string review_name = 1; */ + if (message.reviewName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.reviewName); + /* google.protobuf.Timestamp next_audit_date = 2; */ + if (message.nextAuditDate) + Timestamp.internalBinaryWrite(message.nextAuditDate, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.CreateAccessListReviewResponse + */ +export const CreateAccessListReviewResponse = new CreateAccessListReviewResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DeleteAccessListReviewRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.DeleteAccessListReviewRequest", [ + { no: 1, name: "review_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "access_list_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DeleteAccessListReviewRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.reviewName = ""; + message.accessListName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAccessListReviewRequest): DeleteAccessListReviewRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string review_name */ 1: + message.reviewName = reader.string(); + break; + case /* string access_list_name */ 2: + message.accessListName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DeleteAccessListReviewRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string review_name = 1; */ + if (message.reviewName !== "") + writer.tag(1, WireType.LengthDelimited).string(message.reviewName); + /* string access_list_name = 2; */ + if (message.accessListName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.accessListName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.DeleteAccessListReviewRequest + */ +export const DeleteAccessListReviewRequest = new DeleteAccessListReviewRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessRequestPromoteRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessRequestPromoteRequest", [ + { no: 1, name: "request_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "access_list_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AccessRequestPromoteRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.requestId = ""; + message.accessListName = ""; + message.reason = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessRequestPromoteRequest): AccessRequestPromoteRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string request_id */ 1: + message.requestId = reader.string(); + break; + case /* string access_list_name */ 2: + message.accessListName = reader.string(); + break; + case /* string reason */ 3: + message.reason = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessRequestPromoteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string request_id = 1; */ + if (message.requestId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.requestId); + /* string access_list_name = 2; */ + if (message.accessListName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.accessListName); + /* string reason = 3; */ + if (message.reason !== "") + writer.tag(3, WireType.LengthDelimited).string(message.reason); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessRequestPromoteRequest + */ +export const AccessRequestPromoteRequest = new AccessRequestPromoteRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessRequestPromoteResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.AccessRequestPromoteResponse", [ + { no: 1, name: "access_request", kind: "message", T: () => AccessRequestV3 } + ]); + } + create(value?: PartialMessage): AccessRequestPromoteResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessRequestPromoteResponse): AccessRequestPromoteResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* types.AccessRequestV3 access_request */ 1: + message.accessRequest = AccessRequestV3.internalBinaryRead(reader, reader.uint32(), options, message.accessRequest); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessRequestPromoteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* types.AccessRequestV3 access_request = 1; */ + if (message.accessRequest) + AccessRequestV3.internalBinaryWrite(message.accessRequest, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.AccessRequestPromoteResponse + */ +export const AccessRequestPromoteResponse = new AccessRequestPromoteResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetSuggestedAccessListsRequest$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetSuggestedAccessListsRequest", [ + { no: 1, name: "access_request_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): GetSuggestedAccessListsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessRequestId = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSuggestedAccessListsRequest): GetSuggestedAccessListsRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string access_request_id */ 1: + message.accessRequestId = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetSuggestedAccessListsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string access_request_id = 1; */ + if (message.accessRequestId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.accessRequestId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetSuggestedAccessListsRequest + */ +export const GetSuggestedAccessListsRequest = new GetSuggestedAccessListsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetSuggestedAccessListsResponse$Type extends MessageType { + constructor() { + super("teleport.accesslist.v1.GetSuggestedAccessListsResponse", [ + { no: 1, name: "access_lists", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AccessList } + ]); + } + create(value?: PartialMessage): GetSuggestedAccessListsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.accessLists = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSuggestedAccessListsResponse): GetSuggestedAccessListsResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated teleport.accesslist.v1.AccessList access_lists */ 1: + message.accessLists.push(AccessList.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GetSuggestedAccessListsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated teleport.accesslist.v1.AccessList access_lists = 1; */ + for (let i = 0; i < message.accessLists.length; i++) + AccessList.internalBinaryWrite(message.accessLists[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.accesslist.v1.GetSuggestedAccessListsResponse + */ +export const GetSuggestedAccessListsResponse = new GetSuggestedAccessListsResponse$Type(); +/** + * @generated ServiceType for protobuf service teleport.accesslist.v1.AccessListService + */ +export const AccessListService = new ServiceType("teleport.accesslist.v1.AccessListService", [ + { name: "GetAccessLists", options: {}, I: GetAccessListsRequest, O: GetAccessListsResponse }, + { name: "ListAccessLists", options: {}, I: ListAccessListsRequest, O: ListAccessListsResponse }, + { name: "GetAccessList", options: {}, I: GetAccessListRequest, O: AccessList }, + { name: "UpsertAccessList", options: {}, I: UpsertAccessListRequest, O: AccessList }, + { name: "DeleteAccessList", options: {}, I: DeleteAccessListRequest, O: Empty }, + { name: "DeleteAllAccessLists", options: {}, I: DeleteAllAccessListsRequest, O: Empty }, + { name: "GetAccessListsToReview", options: {}, I: GetAccessListsToReviewRequest, O: GetAccessListsToReviewResponse }, + { name: "ListAccessListMembers", options: {}, I: ListAccessListMembersRequest, O: ListAccessListMembersResponse }, + { name: "ListAllAccessListMembers", options: {}, I: ListAllAccessListMembersRequest, O: ListAllAccessListMembersResponse }, + { name: "GetAccessListMember", options: {}, I: GetAccessListMemberRequest, O: Member }, + { name: "UpsertAccessListMember", options: {}, I: UpsertAccessListMemberRequest, O: Member }, + { name: "DeleteAccessListMember", options: {}, I: DeleteAccessListMemberRequest, O: Empty }, + { name: "DeleteAllAccessListMembersForAccessList", options: {}, I: DeleteAllAccessListMembersForAccessListRequest, O: Empty }, + { name: "DeleteAllAccessListMembers", options: {}, I: DeleteAllAccessListMembersRequest, O: Empty }, + { name: "UpsertAccessListWithMembers", options: {}, I: UpsertAccessListWithMembersRequest, O: UpsertAccessListWithMembersResponse }, + { name: "ListAccessListReviews", options: {}, I: ListAccessListReviewsRequest, O: ListAccessListReviewsResponse }, + { name: "ListAllAccessListReviews", options: {}, I: ListAllAccessListReviewsRequest, O: ListAllAccessListReviewsResponse }, + { name: "CreateAccessListReview", options: {}, I: CreateAccessListReviewRequest, O: CreateAccessListReviewResponse }, + { name: "DeleteAccessListReview", options: {}, I: DeleteAccessListReviewRequest, O: Empty }, + { name: "AccessRequestPromote", options: {}, I: AccessRequestPromoteRequest, O: AccessRequestPromoteResponse }, + { name: "GetSuggestedAccessLists", options: {}, I: GetSuggestedAccessListsRequest, O: GetSuggestedAccessListsResponse } +]); diff --git a/gen/proto/ts/teleport/header/v1/metadata_pb.ts b/gen/proto/ts/teleport/header/v1/metadata_pb.ts new file mode 100644 index 00000000000..a6efa06e168 --- /dev/null +++ b/gen/proto/ts/teleport/header/v1/metadata_pb.ts @@ -0,0 +1,197 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/header/v1/metadata.proto" (package "teleport.header.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Gravitational, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Timestamp } from "../../../google/protobuf/timestamp_pb"; +/** + * Metadata is resource metadata. + * + * @generated from protobuf message teleport.header.v1.Metadata + */ +export interface Metadata { + /** + * name is an object name. + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * namespace is object namespace. The field should be called "namespace" + * when it returns in Teleport 2.4. + * + * @generated from protobuf field: string namespace = 2; + */ + namespace: string; + /** + * description is object description. + * + * @generated from protobuf field: string description = 3; + */ + description: string; + /** + * labels is a set of labels. + * + * @generated from protobuf field: map labels = 5; + */ + labels: { + [key: string]: string; + }; + /** + * expires is a global expiry time header can be set on any resource in the + * system. + * + * @generated from protobuf field: google.protobuf.Timestamp expires = 6; + */ + expires?: Timestamp; + /** + * ID is a record ID + * Deprecated: Use revision instead. + * + * @deprecated + * @generated from protobuf field: int64 id = 7 [deprecated = true]; + */ + id: number; + /** + * revision is an opaque identifier which tracks the versions of a resource + * over time. Clients should ignore and not alter its value but must return + * the revision in any updates of a resource. + * + * @generated from protobuf field: string revision = 8; + */ + revision: string; +} +// @generated message type with reflection information, may provide speed optimized methods +class Metadata$Type extends MessageType { + constructor() { + super("teleport.header.v1.Metadata", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "labels", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }, + { no: 6, name: "expires", kind: "message", T: () => Timestamp }, + { no: 7, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }, + { no: 8, name: "revision", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): Metadata { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = ""; + message.namespace = ""; + message.description = ""; + message.labels = {}; + message.id = 0; + message.revision = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Metadata): Metadata { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* string namespace */ 2: + message.namespace = reader.string(); + break; + case /* string description */ 3: + message.description = reader.string(); + break; + case /* map labels */ 5: + this.binaryReadMap5(message.labels, reader, options); + break; + case /* google.protobuf.Timestamp expires */ 6: + message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires); + break; + case /* int64 id = 7 [deprecated = true];*/ 7: + message.id = reader.int64().toNumber(); + break; + case /* string revision */ 8: + message.revision = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + private binaryReadMap5(map: Metadata["labels"], reader: IBinaryReader, options: BinaryReadOptions): void { + let len = reader.uint32(), end = reader.pos + len, key: keyof Metadata["labels"] | undefined, val: Metadata["labels"][any] | undefined; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case 1: + key = reader.string(); + break; + case 2: + val = reader.string(); + break; + default: throw new globalThis.Error("unknown map entry field for field teleport.header.v1.Metadata.labels"); + } + } + map[key ?? ""] = val ?? ""; + } + internalBinaryWrite(message: Metadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* string namespace = 2; */ + if (message.namespace !== "") + writer.tag(2, WireType.LengthDelimited).string(message.namespace); + /* string description = 3; */ + if (message.description !== "") + writer.tag(3, WireType.LengthDelimited).string(message.description); + /* map labels = 5; */ + for (let k of globalThis.Object.keys(message.labels)) + writer.tag(5, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.labels[k]).join(); + /* google.protobuf.Timestamp expires = 6; */ + if (message.expires) + Timestamp.internalBinaryWrite(message.expires, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* int64 id = 7 [deprecated = true]; */ + if (message.id !== 0) + writer.tag(7, WireType.Varint).int64(message.id); + /* string revision = 8; */ + if (message.revision !== "") + writer.tag(8, WireType.LengthDelimited).string(message.revision); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.header.v1.Metadata + */ +export const Metadata = new Metadata$Type(); diff --git a/gen/proto/ts/teleport/header/v1/resourceheader_pb.ts b/gen/proto/ts/teleport/header/v1/resourceheader_pb.ts new file mode 100644 index 00000000000..72b493317d1 --- /dev/null +++ b/gen/proto/ts/teleport/header/v1/resourceheader_pb.ts @@ -0,0 +1,134 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/header/v1/resourceheader.proto" (package "teleport.header.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// Copyright 2023 Gravitational, Inc +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Metadata } from "./metadata_pb"; +/** + * ResourceHeader is a shared resource header. + * + * @generated from protobuf message teleport.header.v1.ResourceHeader + */ +export interface ResourceHeader { + /** + * kind is a resource kind. + * + * @generated from protobuf field: string kind = 1; + */ + kind: string; + /** + * sub_kind is an optional resource sub kind, used in some resources. + * + * @generated from protobuf field: string sub_kind = 2; + */ + subKind: string; + /** + * Version is the API version used to create the resource. It must be + * specified. Based on this version, Teleport will apply different defaults on + * resource creation or deletion. It must be an integer prefixed by "v". + * For example: `v1` + * + * @generated from protobuf field: string version = 3; + */ + version: string; + /** + * metadata is resource metadata. + * + * @generated from protobuf field: teleport.header.v1.Metadata metadata = 4; + */ + metadata?: Metadata; +} +// @generated message type with reflection information, may provide speed optimized methods +class ResourceHeader$Type extends MessageType { + constructor() { + super("teleport.header.v1.ResourceHeader", [ + { no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "sub_kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "metadata", kind: "message", T: () => Metadata } + ]); + } + create(value?: PartialMessage): ResourceHeader { + const message = globalThis.Object.create((this.messagePrototype!)); + message.kind = ""; + message.subKind = ""; + message.version = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceHeader): ResourceHeader { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string kind */ 1: + message.kind = reader.string(); + break; + case /* string sub_kind */ 2: + message.subKind = reader.string(); + break; + case /* string version */ 3: + message.version = reader.string(); + break; + case /* teleport.header.v1.Metadata metadata */ 4: + message.metadata = Metadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourceHeader, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string kind = 1; */ + if (message.kind !== "") + writer.tag(1, WireType.LengthDelimited).string(message.kind); + /* string sub_kind = 2; */ + if (message.subKind !== "") + writer.tag(2, WireType.LengthDelimited).string(message.subKind); + /* string version = 3; */ + if (message.version !== "") + writer.tag(3, WireType.LengthDelimited).string(message.version); + /* teleport.header.v1.Metadata metadata = 4; */ + if (message.metadata) + Metadata.internalBinaryWrite(message.metadata, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.header.v1.ResourceHeader + */ +export const ResourceHeader = new ResourceHeader$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/access_request_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/access_request_pb.ts new file mode 100644 index 00000000000..6fd4cce5d0e --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/access_request_pb.ts @@ -0,0 +1,609 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/access_request.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Timestamp } from "../../../../google/protobuf/timestamp_pb"; +/** + * @generated from protobuf message teleport.lib.teleterm.v1.AccessRequest + */ +export interface AccessRequest { + /** + * @generated from protobuf field: string id = 1; + */ + id: string; + /** + * the request state of Access Request. option of PENDING, APPROVED, DENIED, PROMOTED, NONE + * + * @generated from protobuf field: string state = 2; + */ + state: string; + /** + * @generated from protobuf field: string resolve_reason = 3; + */ + resolveReason: string; + /** + * @generated from protobuf field: string request_reason = 4; + */ + requestReason: string; + /** + * user is the user who submitted the Access Request + * + * @generated from protobuf field: string user = 5; + */ + user: string; + /** + * a list of roles requested in the AccessRequest + * + * @generated from protobuf field: repeated string roles = 6; + */ + roles: string[]; + /** + * @generated from protobuf field: google.protobuf.Timestamp created = 7; + */ + created?: Timestamp; + /** + * @generated from protobuf field: google.protobuf.Timestamp expires = 8; + */ + expires?: Timestamp; + /** + * @generated from protobuf field: repeated teleport.lib.teleterm.v1.AccessRequestReview reviews = 9; + */ + reviews: AccessRequestReview[]; + /** + * @generated from protobuf field: repeated string suggested_reviewers = 10; + */ + suggestedReviewers: string[]; + /** + * thresholds specifies minimum amount of approvers or deniers. Defaults to 'default' + * + * @generated from protobuf field: repeated string threshold_names = 11; + */ + thresholdNames: string[]; + /** + * TODO(avatus) remove the resource_ids field once the changes to rely on resources instead is merged + * a list of resourceIDs requested in the AccessRequest + * + * @generated from protobuf field: repeated teleport.lib.teleterm.v1.ResourceID resource_ids = 12; + */ + resourceIds: ResourceID[]; + /** + * @generated from protobuf field: repeated teleport.lib.teleterm.v1.Resource resources = 13; + */ + resources: Resource[]; + /** + * promoted_access_list_title is the title of the access + * list that this access request was promoted to. + * + * @generated from protobuf field: string promoted_access_list_title = 14; + */ + promotedAccessListTitle: string; +} +/** + * @generated from protobuf message teleport.lib.teleterm.v1.AccessRequestReview + */ +export interface AccessRequestReview { + /** + * author is the creator of the AccessRequestReview. + * + * @generated from protobuf field: string author = 1; + */ + author: string; + /** + * list of roles approved + * + * @generated from protobuf field: repeated string roles = 2; + */ + roles: string[]; + /** + * the state of the review, either APPROVED or DENIED + * + * @generated from protobuf field: string state = 3; + */ + state: string; + /** + * reason is why the request was approved or denied + * + * @generated from protobuf field: string reason = 4; + */ + reason: string; + /** + * @generated from protobuf field: google.protobuf.Timestamp created = 5; + */ + created?: Timestamp; + /** + * promoted_access_list_title is the title of the access + * list that the access request was promoted to. + * + * @generated from protobuf field: string promoted_access_list_title = 6; + */ + promotedAccessListTitle: string; +} +/** + * @generated from protobuf message teleport.lib.teleterm.v1.ResourceID + */ +export interface ResourceID { + /** + * @generated from protobuf field: string kind = 1; + */ + kind: string; + /** + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * @generated from protobuf field: string cluster_name = 3; + */ + clusterName: string; + /** + * @generated from protobuf field: string sub_resource_name = 4; + */ + subResourceName: string; +} +/** + * @generated from protobuf message teleport.lib.teleterm.v1.ResourceDetails + */ +export interface ResourceDetails { + /** + * @generated from protobuf field: string hostname = 1; + */ + hostname: string; + /** + * @generated from protobuf field: string friendly_name = 2; + */ + friendlyName: string; +} +/** + * @generated from protobuf message teleport.lib.teleterm.v1.Resource + */ +export interface Resource { + /** + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceID id = 1; + */ + id?: ResourceID; + /** + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceDetails details = 2; + */ + details?: ResourceDetails; +} +// @generated message type with reflection information, may provide speed optimized methods +class AccessRequest$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.AccessRequest", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "resolve_reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "request_reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "created", kind: "message", T: () => Timestamp }, + { no: 8, name: "expires", kind: "message", T: () => Timestamp }, + { no: 9, name: "reviews", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AccessRequestReview }, + { no: 10, name: "suggested_reviewers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 11, name: "threshold_names", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 12, name: "resource_ids", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResourceID }, + { no: 13, name: "resources", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Resource }, + { no: 14, name: "promoted_access_list_title", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AccessRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.id = ""; + message.state = ""; + message.resolveReason = ""; + message.requestReason = ""; + message.user = ""; + message.roles = []; + message.reviews = []; + message.suggestedReviewers = []; + message.thresholdNames = []; + message.resourceIds = []; + message.resources = []; + message.promotedAccessListTitle = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessRequest): AccessRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string id */ 1: + message.id = reader.string(); + break; + case /* string state */ 2: + message.state = reader.string(); + break; + case /* string resolve_reason */ 3: + message.resolveReason = reader.string(); + break; + case /* string request_reason */ 4: + message.requestReason = reader.string(); + break; + case /* string user */ 5: + message.user = reader.string(); + break; + case /* repeated string roles */ 6: + message.roles.push(reader.string()); + break; + case /* google.protobuf.Timestamp created */ 7: + message.created = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.created); + break; + case /* google.protobuf.Timestamp expires */ 8: + message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires); + break; + case /* repeated teleport.lib.teleterm.v1.AccessRequestReview reviews */ 9: + message.reviews.push(AccessRequestReview.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated string suggested_reviewers */ 10: + message.suggestedReviewers.push(reader.string()); + break; + case /* repeated string threshold_names */ 11: + message.thresholdNames.push(reader.string()); + break; + case /* repeated teleport.lib.teleterm.v1.ResourceID resource_ids */ 12: + message.resourceIds.push(ResourceID.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated teleport.lib.teleterm.v1.Resource resources */ 13: + message.resources.push(Resource.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* string promoted_access_list_title */ 14: + message.promotedAccessListTitle = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string id = 1; */ + if (message.id !== "") + writer.tag(1, WireType.LengthDelimited).string(message.id); + /* string state = 2; */ + if (message.state !== "") + writer.tag(2, WireType.LengthDelimited).string(message.state); + /* string resolve_reason = 3; */ + if (message.resolveReason !== "") + writer.tag(3, WireType.LengthDelimited).string(message.resolveReason); + /* string request_reason = 4; */ + if (message.requestReason !== "") + writer.tag(4, WireType.LengthDelimited).string(message.requestReason); + /* string user = 5; */ + if (message.user !== "") + writer.tag(5, WireType.LengthDelimited).string(message.user); + /* repeated string roles = 6; */ + for (let i = 0; i < message.roles.length; i++) + writer.tag(6, WireType.LengthDelimited).string(message.roles[i]); + /* google.protobuf.Timestamp created = 7; */ + if (message.created) + Timestamp.internalBinaryWrite(message.created, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* google.protobuf.Timestamp expires = 8; */ + if (message.expires) + Timestamp.internalBinaryWrite(message.expires, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* repeated teleport.lib.teleterm.v1.AccessRequestReview reviews = 9; */ + for (let i = 0; i < message.reviews.length; i++) + AccessRequestReview.internalBinaryWrite(message.reviews[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* repeated string suggested_reviewers = 10; */ + for (let i = 0; i < message.suggestedReviewers.length; i++) + writer.tag(10, WireType.LengthDelimited).string(message.suggestedReviewers[i]); + /* repeated string threshold_names = 11; */ + for (let i = 0; i < message.thresholdNames.length; i++) + writer.tag(11, WireType.LengthDelimited).string(message.thresholdNames[i]); + /* repeated teleport.lib.teleterm.v1.ResourceID resource_ids = 12; */ + for (let i = 0; i < message.resourceIds.length; i++) + ResourceID.internalBinaryWrite(message.resourceIds[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + /* repeated teleport.lib.teleterm.v1.Resource resources = 13; */ + for (let i = 0; i < message.resources.length; i++) + Resource.internalBinaryWrite(message.resources[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join(); + /* string promoted_access_list_title = 14; */ + if (message.promotedAccessListTitle !== "") + writer.tag(14, WireType.LengthDelimited).string(message.promotedAccessListTitle); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.AccessRequest + */ +export const AccessRequest = new AccessRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AccessRequestReview$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.AccessRequestReview", [ + { no: 1, name: "author", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "created", kind: "message", T: () => Timestamp }, + { no: 6, name: "promoted_access_list_title", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AccessRequestReview { + const message = globalThis.Object.create((this.messagePrototype!)); + message.author = ""; + message.roles = []; + message.state = ""; + message.reason = ""; + message.promotedAccessListTitle = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccessRequestReview): AccessRequestReview { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string author */ 1: + message.author = reader.string(); + break; + case /* repeated string roles */ 2: + message.roles.push(reader.string()); + break; + case /* string state */ 3: + message.state = reader.string(); + break; + case /* string reason */ 4: + message.reason = reader.string(); + break; + case /* google.protobuf.Timestamp created */ 5: + message.created = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.created); + break; + case /* string promoted_access_list_title */ 6: + message.promotedAccessListTitle = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AccessRequestReview, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string author = 1; */ + if (message.author !== "") + writer.tag(1, WireType.LengthDelimited).string(message.author); + /* repeated string roles = 2; */ + for (let i = 0; i < message.roles.length; i++) + writer.tag(2, WireType.LengthDelimited).string(message.roles[i]); + /* string state = 3; */ + if (message.state !== "") + writer.tag(3, WireType.LengthDelimited).string(message.state); + /* string reason = 4; */ + if (message.reason !== "") + writer.tag(4, WireType.LengthDelimited).string(message.reason); + /* google.protobuf.Timestamp created = 5; */ + if (message.created) + Timestamp.internalBinaryWrite(message.created, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* string promoted_access_list_title = 6; */ + if (message.promotedAccessListTitle !== "") + writer.tag(6, WireType.LengthDelimited).string(message.promotedAccessListTitle); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.AccessRequestReview + */ +export const AccessRequestReview = new AccessRequestReview$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResourceID$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.ResourceID", [ + { no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "cluster_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "sub_resource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ResourceID { + const message = globalThis.Object.create((this.messagePrototype!)); + message.kind = ""; + message.name = ""; + message.clusterName = ""; + message.subResourceName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceID): ResourceID { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string kind */ 1: + message.kind = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* string cluster_name */ 3: + message.clusterName = reader.string(); + break; + case /* string sub_resource_name */ 4: + message.subResourceName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourceID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string kind = 1; */ + if (message.kind !== "") + writer.tag(1, WireType.LengthDelimited).string(message.kind); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* string cluster_name = 3; */ + if (message.clusterName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.clusterName); + /* string sub_resource_name = 4; */ + if (message.subResourceName !== "") + writer.tag(4, WireType.LengthDelimited).string(message.subResourceName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.ResourceID + */ +export const ResourceID = new ResourceID$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResourceDetails$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.ResourceDetails", [ + { no: 1, name: "hostname", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "friendly_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ResourceDetails { + const message = globalThis.Object.create((this.messagePrototype!)); + message.hostname = ""; + message.friendlyName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceDetails): ResourceDetails { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string hostname */ 1: + message.hostname = reader.string(); + break; + case /* string friendly_name */ 2: + message.friendlyName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourceDetails, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string hostname = 1; */ + if (message.hostname !== "") + writer.tag(1, WireType.LengthDelimited).string(message.hostname); + /* string friendly_name = 2; */ + if (message.friendlyName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.friendlyName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.ResourceDetails + */ +export const ResourceDetails = new ResourceDetails$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Resource$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.Resource", [ + { no: 1, name: "id", kind: "message", T: () => ResourceID }, + { no: 2, name: "details", kind: "message", T: () => ResourceDetails } + ]); + } + create(value?: PartialMessage): Resource { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Resource): Resource { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.lib.teleterm.v1.ResourceID id */ 1: + message.id = ResourceID.internalBinaryRead(reader, reader.uint32(), options, message.id); + break; + case /* teleport.lib.teleterm.v1.ResourceDetails details */ 2: + message.details = ResourceDetails.internalBinaryRead(reader, reader.uint32(), options, message.details); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Resource, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.lib.teleterm.v1.ResourceID id = 1; */ + if (message.id) + ResourceID.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceDetails details = 2; */ + if (message.details) + ResourceDetails.internalBinaryWrite(message.details, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.Resource + */ +export const Resource = new Resource$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/app_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/app_pb.ts new file mode 100644 index 00000000000..0b3a5fd2b31 --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/app_pb.ts @@ -0,0 +1,205 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/app.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2024 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Label } from "./label_pb"; +/** + * App describes an app resource. + * + * @generated from protobuf message teleport.lib.teleterm.v1.App + */ +export interface App { + /** + * uri is the cluster resource URI. + * + * @generated from protobuf field: string uri = 1; + */ + uri: string; + /** + * name is the name of the app. + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * endpoint_uri is the app connection endpoint. + * + * @generated from protobuf field: string endpoint_uri = 3; + */ + endpointUri: string; + /** + * desc is the app description. + * + * @generated from protobuf field: string desc = 4; + */ + desc: string; + /** + * aws_console is true if this app is AWS management console. + * + * @generated from protobuf field: bool aws_console = 5; + */ + awsConsole: boolean; + /** + * public_addr is the public address the application is accessible at. + * + * @generated from protobuf field: string public_addr = 6; + */ + publicAddr: string; + /** + * friendly_name is a user readable name of the app. + * + * @generated from protobuf field: string friendly_name = 7; + */ + friendlyName: string; + /** + * saml_app is true if the application is a SAML Application (Service Provider). + * + * @generated from protobuf field: bool saml_app = 8; + */ + samlApp: boolean; + /** + * labels is a list of labels for the app. + * + * @generated from protobuf field: repeated teleport.lib.teleterm.v1.Label labels = 9; + */ + labels: Label[]; +} +// @generated message type with reflection information, may provide speed optimized methods +class App$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.App", [ + { no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "endpoint_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "desc", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "aws_console", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "public_addr", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "friendly_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "saml_app", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "labels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Label } + ]); + } + create(value?: PartialMessage): App { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uri = ""; + message.name = ""; + message.endpointUri = ""; + message.desc = ""; + message.awsConsole = false; + message.publicAddr = ""; + message.friendlyName = ""; + message.samlApp = false; + message.labels = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: App): App { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string uri */ 1: + message.uri = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* string endpoint_uri */ 3: + message.endpointUri = reader.string(); + break; + case /* string desc */ 4: + message.desc = reader.string(); + break; + case /* bool aws_console */ 5: + message.awsConsole = reader.bool(); + break; + case /* string public_addr */ 6: + message.publicAddr = reader.string(); + break; + case /* string friendly_name */ 7: + message.friendlyName = reader.string(); + break; + case /* bool saml_app */ 8: + message.samlApp = reader.bool(); + break; + case /* repeated teleport.lib.teleterm.v1.Label labels */ 9: + message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: App, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string uri = 1; */ + if (message.uri !== "") + writer.tag(1, WireType.LengthDelimited).string(message.uri); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* string endpoint_uri = 3; */ + if (message.endpointUri !== "") + writer.tag(3, WireType.LengthDelimited).string(message.endpointUri); + /* string desc = 4; */ + if (message.desc !== "") + writer.tag(4, WireType.LengthDelimited).string(message.desc); + /* bool aws_console = 5; */ + if (message.awsConsole !== false) + writer.tag(5, WireType.Varint).bool(message.awsConsole); + /* string public_addr = 6; */ + if (message.publicAddr !== "") + writer.tag(6, WireType.LengthDelimited).string(message.publicAddr); + /* string friendly_name = 7; */ + if (message.friendlyName !== "") + writer.tag(7, WireType.LengthDelimited).string(message.friendlyName); + /* bool saml_app = 8; */ + if (message.samlApp !== false) + writer.tag(8, WireType.Varint).bool(message.samlApp); + /* repeated teleport.lib.teleterm.v1.Label labels = 9; */ + for (let i = 0; i < message.labels.length; i++) + Label.internalBinaryWrite(message.labels[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.App + */ +export const App = new App$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/auth_settings_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/auth_settings_pb.ts new file mode 100644 index 00000000000..b1ee9810bdd --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/auth_settings_pb.ts @@ -0,0 +1,281 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/auth_settings.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * AuthSettings contains the form of authentication the auth server supports. + * + * @generated from protobuf message teleport.lib.teleterm.v1.AuthSettings + */ +export interface AuthSettings { + /** + * local_auth_enabled is a flag that enables local authentication + * + * @generated from protobuf field: bool local_auth_enabled = 1; + */ + localAuthEnabled: boolean; + /** + * second_factor is the type of second factor to use in authentication. + * + * @generated from protobuf field: string second_factor = 2; + */ + secondFactor: string; + /** + * preferred_mfa is the prefered mfa for local logins + * + * @generated from protobuf field: string preferred_mfa = 3; + */ + preferredMfa: string; + /** + * auth_providers contains a list of auth providers + * + * @generated from protobuf field: repeated teleport.lib.teleterm.v1.AuthProvider auth_providers = 4; + */ + authProviders: AuthProvider[]; + /** + * has_message_of_the_day is a flag indicating that the cluster has MOTD + * banner text that must be retrieved, displayed and acknowledged by + * the user. + * + * @generated from protobuf field: bool has_message_of_the_day = 5; + */ + hasMessageOfTheDay: boolean; + /** + * auth_type is the authentication type e.g. "local", "github", "saml", "oidc" + * + * @generated from protobuf field: string auth_type = 6; + */ + authType: string; + /** + * allow_passwordless is true if passwordless logins are allowed. + * + * @generated from protobuf field: bool allow_passwordless = 7; + */ + allowPasswordless: boolean; + /** + * local_connector_name is the name of the local connector. + * + * @generated from protobuf field: string local_connector_name = 8; + */ + localConnectorName: string; +} +/** + * AuthProvider describes a way of authentication that is supported by the server. Auth provider is + * referred to as "auth connector" on the backend. + * + * @generated from protobuf message teleport.lib.teleterm.v1.AuthProvider + */ +export interface AuthProvider { + /** + * Type is the auth provider type (github|oidc|etc) + * + * @generated from protobuf field: string type = 1; + */ + type: string; + /** + * Name is the internal name of the connector. + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * Display is the display name for the connector. + * + * @generated from protobuf field: string display_name = 3; + */ + displayName: string; +} +// @generated message type with reflection information, may provide speed optimized methods +class AuthSettings$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.AuthSettings", [ + { no: 1, name: "local_auth_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "second_factor", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "preferred_mfa", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "auth_providers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AuthProvider }, + { no: 5, name: "has_message_of_the_day", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "auth_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "allow_passwordless", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 8, name: "local_connector_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AuthSettings { + const message = globalThis.Object.create((this.messagePrototype!)); + message.localAuthEnabled = false; + message.secondFactor = ""; + message.preferredMfa = ""; + message.authProviders = []; + message.hasMessageOfTheDay = false; + message.authType = ""; + message.allowPasswordless = false; + message.localConnectorName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthSettings): AuthSettings { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool local_auth_enabled */ 1: + message.localAuthEnabled = reader.bool(); + break; + case /* string second_factor */ 2: + message.secondFactor = reader.string(); + break; + case /* string preferred_mfa */ 3: + message.preferredMfa = reader.string(); + break; + case /* repeated teleport.lib.teleterm.v1.AuthProvider auth_providers */ 4: + message.authProviders.push(AuthProvider.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* bool has_message_of_the_day */ 5: + message.hasMessageOfTheDay = reader.bool(); + break; + case /* string auth_type */ 6: + message.authType = reader.string(); + break; + case /* bool allow_passwordless */ 7: + message.allowPasswordless = reader.bool(); + break; + case /* string local_connector_name */ 8: + message.localConnectorName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AuthSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bool local_auth_enabled = 1; */ + if (message.localAuthEnabled !== false) + writer.tag(1, WireType.Varint).bool(message.localAuthEnabled); + /* string second_factor = 2; */ + if (message.secondFactor !== "") + writer.tag(2, WireType.LengthDelimited).string(message.secondFactor); + /* string preferred_mfa = 3; */ + if (message.preferredMfa !== "") + writer.tag(3, WireType.LengthDelimited).string(message.preferredMfa); + /* repeated teleport.lib.teleterm.v1.AuthProvider auth_providers = 4; */ + for (let i = 0; i < message.authProviders.length; i++) + AuthProvider.internalBinaryWrite(message.authProviders[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* bool has_message_of_the_day = 5; */ + if (message.hasMessageOfTheDay !== false) + writer.tag(5, WireType.Varint).bool(message.hasMessageOfTheDay); + /* string auth_type = 6; */ + if (message.authType !== "") + writer.tag(6, WireType.LengthDelimited).string(message.authType); + /* bool allow_passwordless = 7; */ + if (message.allowPasswordless !== false) + writer.tag(7, WireType.Varint).bool(message.allowPasswordless); + /* string local_connector_name = 8; */ + if (message.localConnectorName !== "") + writer.tag(8, WireType.LengthDelimited).string(message.localConnectorName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.AuthSettings + */ +export const AuthSettings = new AuthSettings$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AuthProvider$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.AuthProvider", [ + { no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): AuthProvider { + const message = globalThis.Object.create((this.messagePrototype!)); + message.type = ""; + message.name = ""; + message.displayName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AuthProvider): AuthProvider { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string type */ 1: + message.type = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* string display_name */ 3: + message.displayName = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: AuthProvider, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string type = 1; */ + if (message.type !== "") + writer.tag(1, WireType.LengthDelimited).string(message.type); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* string display_name = 3; */ + if (message.displayName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.displayName); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.AuthProvider + */ +export const AuthProvider = new AuthProvider$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/cluster_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/cluster_pb.ts new file mode 100644 index 00000000000..d8b71be8879 --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/cluster_pb.ts @@ -0,0 +1,803 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/cluster.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * Cluster describes cluster fields + * + * @generated from protobuf message teleport.lib.teleterm.v1.Cluster + */ +export interface Cluster { + /** + * uri is the cluster resource URI + * + * @generated from protobuf field: string uri = 1; + */ + uri: string; + /** + * name is used throughout the Teleport Connect codebase as the cluster name. + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * proxy address (only for root clusters) + * + * @generated from protobuf field: string proxy_host = 3; + */ + proxyHost: string; + /** + * connected indicates if connection to the cluster can be established, that is if we have a + * cert for the cluster that hasn't expired + * + * @generated from protobuf field: bool connected = 4; + */ + connected: boolean; + /** + * leaf indicates if this is a leaf cluster + * + * @generated from protobuf field: bool leaf = 5; + */ + leaf: boolean; + /** + * User is the cluster access control list of the logged-in user + * + * @generated from protobuf field: teleport.lib.teleterm.v1.LoggedInUser logged_in_user = 7; + */ + loggedInUser?: LoggedInUser; + /** + * features describes the auth servers features. + * Only present when detailed information is queried from the auth server. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.Features features = 8; + */ + features?: Features; + /** + * auth_cluster_id is the unique cluster ID that is set once + * during the first auth server startup. + * Only present when detailed information is queried from the auth server. + * + * @generated from protobuf field: string auth_cluster_id = 9; + */ + authClusterId: string; + /** + * ProxyVersion is the cluster proxy's service version. + * Only present when detailed information is queried from the proxy server. + * + * @generated from protobuf field: string proxy_version = 10; + */ + proxyVersion: string; +} +/** + * LoggedInUser describes a logged-in user + * + * @generated from protobuf message teleport.lib.teleterm.v1.LoggedInUser + */ +export interface LoggedInUser { + /** + * name is the user name + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * roles is the user roles + * + * @generated from protobuf field: repeated string roles = 2; + */ + roles: string[]; + /** + * ssh_logins is the user ssh logins + * + * @generated from protobuf field: repeated string ssh_logins = 3; + */ + sshLogins: string[]; + /** + * acl is the user acl + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ACL acl = 4; + */ + acl?: ACL; + /** + * active_requests is an array of request-id strings of active requests + * + * @generated from protobuf field: repeated string active_requests = 5; + */ + activeRequests: string[]; + /** + * suggested_reviewers for the given user. + * Only present when detailed information is queried from the auth server. + * + * @generated from protobuf field: repeated string suggested_reviewers = 6; + */ + suggestedReviewers: string[]; + /** + * requestable_roles for the given user. + * Only present when detailed information is queried from the auth server. + * + * @generated from protobuf field: repeated string requestable_roles = 7; + */ + requestableRoles: string[]; + /** + * @generated from protobuf field: teleport.lib.teleterm.v1.LoggedInUser.UserType user_type = 8; + */ + userType: LoggedInUser_UserType; +} +/** + * UserType indicates whether the user was created through an SSO provider or in Teleport itself. + * Only present when detailed information is queried from the auth server. + * + * @generated from protobuf enum teleport.lib.teleterm.v1.LoggedInUser.UserType + */ +export enum LoggedInUser_UserType { + /** + * @generated from protobuf enum value: USER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + /** + * @generated from protobuf enum value: USER_TYPE_LOCAL = 1; + */ + LOCAL = 1, + /** + * @generated from protobuf enum value: USER_TYPE_SSO = 2; + */ + SSO = 2 +} +/** + * ACL is the access control list of the user + * + * @generated from protobuf message teleport.lib.teleterm.v1.ACL + */ +export interface ACL { + /** + * auth_connectors defines access to auth.connectors + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess auth_connectors = 2; + */ + authConnectors?: ResourceAccess; + /** + * Roles defines access to roles + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess roles = 3; + */ + roles?: ResourceAccess; + /** + * Users defines access to users. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess users = 4; + */ + users?: ResourceAccess; + /** + * trusted_clusters defines access to trusted clusters + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess trusted_clusters = 5; + */ + trustedClusters?: ResourceAccess; + /** + * Events defines access to audit logs + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess events = 6; + */ + events?: ResourceAccess; + /** + * Tokens defines access to tokens. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess tokens = 7; + */ + tokens?: ResourceAccess; + /** + * Servers defines access to servers. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess servers = 8; + */ + servers?: ResourceAccess; + /** + * apps defines access to application servers + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess apps = 9; + */ + apps?: ResourceAccess; + /** + * dbs defines access to database servers. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess dbs = 10; + */ + dbs?: ResourceAccess; + /** + * kubeservers defines access to kubernetes servers. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess kubeservers = 11; + */ + kubeservers?: ResourceAccess; + /** + * access_requests defines access to access requests + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess access_requests = 12; + */ + accessRequests?: ResourceAccess; + /** + * recorded_sessions defines access to recorded sessions. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess recorded_sessions = 13; + */ + recordedSessions?: ResourceAccess; + /** + * active_sessions defines access to active sessions. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.ResourceAccess active_sessions = 14; + */ + activeSessions?: ResourceAccess; +} +/** + * ResourceAccess describes access verbs + * + * @generated from protobuf message teleport.lib.teleterm.v1.ResourceAccess + */ +export interface ResourceAccess { + /** + * list determines "list" access + * + * @generated from protobuf field: bool list = 1; + */ + list: boolean; + /** + * read determines "read" access + * + * @generated from protobuf field: bool read = 2; + */ + read: boolean; + /** + * edit determines "edit" access + * + * @generated from protobuf field: bool edit = 3; + */ + edit: boolean; + /** + * create determines "create" access + * + * @generated from protobuf field: bool create = 4; + */ + create: boolean; + /** + * delete determines "delete" access + * + * @generated from protobuf field: bool delete = 5; + */ + delete: boolean; + /** + * use determines "use" access + * + * @generated from protobuf field: bool use = 6; + */ + use: boolean; +} +/** + * Features describes the auth servers features + * + * @generated from protobuf message teleport.lib.teleterm.v1.Features + */ +export interface Features { + /** + * advanced_access_workflows enables search-based access requests + * + * @generated from protobuf field: bool advanced_access_workflows = 1; + */ + advancedAccessWorkflows: boolean; + /** + * is_usage_based_billing determines if the cloud user subscription is usage-based (pay-as-you-go). + * + * @generated from protobuf field: bool is_usage_based_billing = 2; + */ + isUsageBasedBilling: boolean; +} +// @generated message type with reflection information, may provide speed optimized methods +class Cluster$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.Cluster", [ + { no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "proxy_host", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "connected", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "leaf", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "logged_in_user", kind: "message", T: () => LoggedInUser }, + { no: 8, name: "features", kind: "message", T: () => Features }, + { no: 9, name: "auth_cluster_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "proxy_version", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): Cluster { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uri = ""; + message.name = ""; + message.proxyHost = ""; + message.connected = false; + message.leaf = false; + message.authClusterId = ""; + message.proxyVersion = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Cluster): Cluster { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string uri */ 1: + message.uri = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* string proxy_host */ 3: + message.proxyHost = reader.string(); + break; + case /* bool connected */ 4: + message.connected = reader.bool(); + break; + case /* bool leaf */ 5: + message.leaf = reader.bool(); + break; + case /* teleport.lib.teleterm.v1.LoggedInUser logged_in_user */ 7: + message.loggedInUser = LoggedInUser.internalBinaryRead(reader, reader.uint32(), options, message.loggedInUser); + break; + case /* teleport.lib.teleterm.v1.Features features */ 8: + message.features = Features.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* string auth_cluster_id */ 9: + message.authClusterId = reader.string(); + break; + case /* string proxy_version */ 10: + message.proxyVersion = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Cluster, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string uri = 1; */ + if (message.uri !== "") + writer.tag(1, WireType.LengthDelimited).string(message.uri); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* string proxy_host = 3; */ + if (message.proxyHost !== "") + writer.tag(3, WireType.LengthDelimited).string(message.proxyHost); + /* bool connected = 4; */ + if (message.connected !== false) + writer.tag(4, WireType.Varint).bool(message.connected); + /* bool leaf = 5; */ + if (message.leaf !== false) + writer.tag(5, WireType.Varint).bool(message.leaf); + /* teleport.lib.teleterm.v1.LoggedInUser logged_in_user = 7; */ + if (message.loggedInUser) + LoggedInUser.internalBinaryWrite(message.loggedInUser, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.Features features = 8; */ + if (message.features) + Features.internalBinaryWrite(message.features, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* string auth_cluster_id = 9; */ + if (message.authClusterId !== "") + writer.tag(9, WireType.LengthDelimited).string(message.authClusterId); + /* string proxy_version = 10; */ + if (message.proxyVersion !== "") + writer.tag(10, WireType.LengthDelimited).string(message.proxyVersion); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.Cluster + */ +export const Cluster = new Cluster$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class LoggedInUser$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.LoggedInUser", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "ssh_logins", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "acl", kind: "message", T: () => ACL }, + { no: 5, name: "active_requests", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "suggested_reviewers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "requestable_roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "user_type", kind: "enum", T: () => ["teleport.lib.teleterm.v1.LoggedInUser.UserType", LoggedInUser_UserType, "USER_TYPE_"] } + ]); + } + create(value?: PartialMessage): LoggedInUser { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = ""; + message.roles = []; + message.sshLogins = []; + message.activeRequests = []; + message.suggestedReviewers = []; + message.requestableRoles = []; + message.userType = 0; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LoggedInUser): LoggedInUser { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name */ 1: + message.name = reader.string(); + break; + case /* repeated string roles */ 2: + message.roles.push(reader.string()); + break; + case /* repeated string ssh_logins */ 3: + message.sshLogins.push(reader.string()); + break; + case /* teleport.lib.teleterm.v1.ACL acl */ 4: + message.acl = ACL.internalBinaryRead(reader, reader.uint32(), options, message.acl); + break; + case /* repeated string active_requests */ 5: + message.activeRequests.push(reader.string()); + break; + case /* repeated string suggested_reviewers */ 6: + message.suggestedReviewers.push(reader.string()); + break; + case /* repeated string requestable_roles */ 7: + message.requestableRoles.push(reader.string()); + break; + case /* teleport.lib.teleterm.v1.LoggedInUser.UserType user_type */ 8: + message.userType = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: LoggedInUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name = 1; */ + if (message.name !== "") + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* repeated string roles = 2; */ + for (let i = 0; i < message.roles.length; i++) + writer.tag(2, WireType.LengthDelimited).string(message.roles[i]); + /* repeated string ssh_logins = 3; */ + for (let i = 0; i < message.sshLogins.length; i++) + writer.tag(3, WireType.LengthDelimited).string(message.sshLogins[i]); + /* teleport.lib.teleterm.v1.ACL acl = 4; */ + if (message.acl) + ACL.internalBinaryWrite(message.acl, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated string active_requests = 5; */ + for (let i = 0; i < message.activeRequests.length; i++) + writer.tag(5, WireType.LengthDelimited).string(message.activeRequests[i]); + /* repeated string suggested_reviewers = 6; */ + for (let i = 0; i < message.suggestedReviewers.length; i++) + writer.tag(6, WireType.LengthDelimited).string(message.suggestedReviewers[i]); + /* repeated string requestable_roles = 7; */ + for (let i = 0; i < message.requestableRoles.length; i++) + writer.tag(7, WireType.LengthDelimited).string(message.requestableRoles[i]); + /* teleport.lib.teleterm.v1.LoggedInUser.UserType user_type = 8; */ + if (message.userType !== 0) + writer.tag(8, WireType.Varint).int32(message.userType); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.LoggedInUser + */ +export const LoggedInUser = new LoggedInUser$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ACL$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.ACL", [ + { no: 2, name: "auth_connectors", kind: "message", T: () => ResourceAccess }, + { no: 3, name: "roles", kind: "message", T: () => ResourceAccess }, + { no: 4, name: "users", kind: "message", T: () => ResourceAccess }, + { no: 5, name: "trusted_clusters", kind: "message", T: () => ResourceAccess }, + { no: 6, name: "events", kind: "message", T: () => ResourceAccess }, + { no: 7, name: "tokens", kind: "message", T: () => ResourceAccess }, + { no: 8, name: "servers", kind: "message", T: () => ResourceAccess }, + { no: 9, name: "apps", kind: "message", T: () => ResourceAccess }, + { no: 10, name: "dbs", kind: "message", T: () => ResourceAccess }, + { no: 11, name: "kubeservers", kind: "message", T: () => ResourceAccess }, + { no: 12, name: "access_requests", kind: "message", T: () => ResourceAccess }, + { no: 13, name: "recorded_sessions", kind: "message", T: () => ResourceAccess }, + { no: 14, name: "active_sessions", kind: "message", T: () => ResourceAccess } + ]); + } + create(value?: PartialMessage): ACL { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ACL): ACL { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* teleport.lib.teleterm.v1.ResourceAccess auth_connectors */ 2: + message.authConnectors = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.authConnectors); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess roles */ 3: + message.roles = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.roles); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess users */ 4: + message.users = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.users); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess trusted_clusters */ 5: + message.trustedClusters = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.trustedClusters); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess events */ 6: + message.events = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.events); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess tokens */ 7: + message.tokens = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.tokens); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess servers */ 8: + message.servers = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.servers); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess apps */ 9: + message.apps = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.apps); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess dbs */ 10: + message.dbs = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.dbs); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess kubeservers */ 11: + message.kubeservers = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.kubeservers); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess access_requests */ 12: + message.accessRequests = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.accessRequests); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess recorded_sessions */ 13: + message.recordedSessions = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.recordedSessions); + break; + case /* teleport.lib.teleterm.v1.ResourceAccess active_sessions */ 14: + message.activeSessions = ResourceAccess.internalBinaryRead(reader, reader.uint32(), options, message.activeSessions); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ACL, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* teleport.lib.teleterm.v1.ResourceAccess auth_connectors = 2; */ + if (message.authConnectors) + ResourceAccess.internalBinaryWrite(message.authConnectors, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess roles = 3; */ + if (message.roles) + ResourceAccess.internalBinaryWrite(message.roles, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess users = 4; */ + if (message.users) + ResourceAccess.internalBinaryWrite(message.users, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess trusted_clusters = 5; */ + if (message.trustedClusters) + ResourceAccess.internalBinaryWrite(message.trustedClusters, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess events = 6; */ + if (message.events) + ResourceAccess.internalBinaryWrite(message.events, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess tokens = 7; */ + if (message.tokens) + ResourceAccess.internalBinaryWrite(message.tokens, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess servers = 8; */ + if (message.servers) + ResourceAccess.internalBinaryWrite(message.servers, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess apps = 9; */ + if (message.apps) + ResourceAccess.internalBinaryWrite(message.apps, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess dbs = 10; */ + if (message.dbs) + ResourceAccess.internalBinaryWrite(message.dbs, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess kubeservers = 11; */ + if (message.kubeservers) + ResourceAccess.internalBinaryWrite(message.kubeservers, writer.tag(11, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess access_requests = 12; */ + if (message.accessRequests) + ResourceAccess.internalBinaryWrite(message.accessRequests, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess recorded_sessions = 13; */ + if (message.recordedSessions) + ResourceAccess.internalBinaryWrite(message.recordedSessions, writer.tag(13, WireType.LengthDelimited).fork(), options).join(); + /* teleport.lib.teleterm.v1.ResourceAccess active_sessions = 14; */ + if (message.activeSessions) + ResourceAccess.internalBinaryWrite(message.activeSessions, writer.tag(14, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.ACL + */ +export const ACL = new ACL$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResourceAccess$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.ResourceAccess", [ + { no: 1, name: "list", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "read", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "edit", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "create", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "delete", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "use", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): ResourceAccess { + const message = globalThis.Object.create((this.messagePrototype!)); + message.list = false; + message.read = false; + message.edit = false; + message.create = false; + message.delete = false; + message.use = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceAccess): ResourceAccess { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool list */ 1: + message.list = reader.bool(); + break; + case /* bool read */ 2: + message.read = reader.bool(); + break; + case /* bool edit */ 3: + message.edit = reader.bool(); + break; + case /* bool create */ 4: + message.create = reader.bool(); + break; + case /* bool delete */ 5: + message.delete = reader.bool(); + break; + case /* bool use */ 6: + message.use = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ResourceAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bool list = 1; */ + if (message.list !== false) + writer.tag(1, WireType.Varint).bool(message.list); + /* bool read = 2; */ + if (message.read !== false) + writer.tag(2, WireType.Varint).bool(message.read); + /* bool edit = 3; */ + if (message.edit !== false) + writer.tag(3, WireType.Varint).bool(message.edit); + /* bool create = 4; */ + if (message.create !== false) + writer.tag(4, WireType.Varint).bool(message.create); + /* bool delete = 5; */ + if (message.delete !== false) + writer.tag(5, WireType.Varint).bool(message.delete); + /* bool use = 6; */ + if (message.use !== false) + writer.tag(6, WireType.Varint).bool(message.use); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.ResourceAccess + */ +export const ResourceAccess = new ResourceAccess$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Features$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.Features", [ + { no: 1, name: "advanced_access_workflows", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "is_usage_based_billing", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): Features { + const message = globalThis.Object.create((this.messagePrototype!)); + message.advancedAccessWorkflows = false; + message.isUsageBasedBilling = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Features): Features { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bool advanced_access_workflows */ 1: + message.advancedAccessWorkflows = reader.bool(); + break; + case /* bool is_usage_based_billing */ 2: + message.isUsageBasedBilling = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Features, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bool advanced_access_workflows = 1; */ + if (message.advancedAccessWorkflows !== false) + writer.tag(1, WireType.Varint).bool(message.advancedAccessWorkflows); + /* bool is_usage_based_billing = 2; */ + if (message.isUsageBasedBilling !== false) + writer.tag(2, WireType.Varint).bool(message.isUsageBasedBilling); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.Features + */ +export const Features = new Features$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/database_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/database_pb.ts new file mode 100644 index 00000000000..c2867d4b84e --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/database_pb.ts @@ -0,0 +1,191 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/database.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Label } from "./label_pb"; +/** + * Database describes a database + * + * @generated from protobuf message teleport.lib.teleterm.v1.Database + */ +export interface Database { + /** + * uri is the cluster resource URI + * + * @generated from protobuf field: string uri = 1; + */ + uri: string; + /** + * name is the name of the database + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * desc is the database description + * + * @generated from protobuf field: string desc = 3; + */ + desc: string; + /** + * protocol is the protocol used by the database + * + * @generated from protobuf field: string protocol = 4; + */ + protocol: string; + /** + * type is the database type, self-hosted or cloud-hosted. + * + * @generated from protobuf field: string type = 5; + */ + type: string; + /** + * hostname is this database hostname + * + * @generated from protobuf field: string hostname = 6; + */ + hostname: string; + /** + * addr is this database ip address + * + * @generated from protobuf field: string addr = 7; + */ + addr: string; + /** + * labels is a list of labels for this database + * + * @generated from protobuf field: repeated teleport.lib.teleterm.v1.Label labels = 8; + */ + labels: Label[]; +} +// @generated message type with reflection information, may provide speed optimized methods +class Database$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.Database", [ + { no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "desc", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "protocol", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "hostname", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "addr", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "labels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Label } + ]); + } + create(value?: PartialMessage): Database { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uri = ""; + message.name = ""; + message.desc = ""; + message.protocol = ""; + message.type = ""; + message.hostname = ""; + message.addr = ""; + message.labels = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Database): Database { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string uri */ 1: + message.uri = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* string desc */ 3: + message.desc = reader.string(); + break; + case /* string protocol */ 4: + message.protocol = reader.string(); + break; + case /* string type */ 5: + message.type = reader.string(); + break; + case /* string hostname */ 6: + message.hostname = reader.string(); + break; + case /* string addr */ 7: + message.addr = reader.string(); + break; + case /* repeated teleport.lib.teleterm.v1.Label labels */ 8: + message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Database, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string uri = 1; */ + if (message.uri !== "") + writer.tag(1, WireType.LengthDelimited).string(message.uri); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* string desc = 3; */ + if (message.desc !== "") + writer.tag(3, WireType.LengthDelimited).string(message.desc); + /* string protocol = 4; */ + if (message.protocol !== "") + writer.tag(4, WireType.LengthDelimited).string(message.protocol); + /* string type = 5; */ + if (message.type !== "") + writer.tag(5, WireType.LengthDelimited).string(message.type); + /* string hostname = 6; */ + if (message.hostname !== "") + writer.tag(6, WireType.LengthDelimited).string(message.hostname); + /* string addr = 7; */ + if (message.addr !== "") + writer.tag(7, WireType.LengthDelimited).string(message.addr); + /* repeated teleport.lib.teleterm.v1.Label labels = 8; */ + for (let i = 0; i < message.labels.length; i++) + Label.internalBinaryWrite(message.labels[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.Database + */ +export const Database = new Database$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/gateway_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/gateway_pb.ts new file mode 100644 index 00000000000..97548b54255 --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/gateway_pb.ts @@ -0,0 +1,317 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/gateway.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * Gateway is Teleterm's name for a connection to a resource like a database or a web app + * established through our ALPN proxy. + * + * The term "gateway" is used to avoid using the term "proxy" itself which could be confusing as + * "proxy" means a couple of different things depending on the context. But for Teleterm, a gateway + * is always an ALPN proxy connection. + * + * See RFD 39 for more info on ALPN. + * + * @generated from protobuf message teleport.lib.teleterm.v1.Gateway + */ +export interface Gateway { + /** + * uri is the gateway uri + * + * @generated from protobuf field: string uri = 1; + */ + uri: string; + /** + * target_name is the target resource name + * + * @generated from protobuf field: string target_name = 2; + */ + targetName: string; + /** + * target_uri is the target uri + * + * @generated from protobuf field: string target_uri = 3; + */ + targetUri: string; + /** + * target_user is the target user + * + * @generated from protobuf field: string target_user = 4; + */ + targetUser: string; + /** + * local_address is the gateway address on localhost + * + * @generated from protobuf field: string local_address = 5; + */ + localAddress: string; + /** + * local_port is the gateway address on localhost + * + * @generated from protobuf field: string local_port = 6; + */ + localPort: string; + /** + * protocol is the gateway protocol + * + * @generated from protobuf field: string protocol = 7; + */ + protocol: string; + /** + * target_subresource_name points at a subresource of the remote resource, for example a + * database name on a database server. + * + * @generated from protobuf field: string target_subresource_name = 9; + */ + targetSubresourceName: string; + /** + * gateway_cli_client represents a command that the user can execute to connect to the resource + * through the gateway. + * + * Instead of generating those commands in in the frontend code, they are returned from the tsh + * daemon. This means that the Database Access team can add support for a new protocol and + * Connect will support it right away with no extra changes. + * + * @generated from protobuf field: teleport.lib.teleterm.v1.GatewayCLICommand gateway_cli_command = 10; + */ + gatewayCliCommand?: GatewayCLICommand; +} +/** + * GatewayCLICommand represents a command that the user can execute to connect to the gateway + * resource. It is a direct translation of os.exec.Cmd. + * + * @generated from protobuf message teleport.lib.teleterm.v1.GatewayCLICommand + */ +export interface GatewayCLICommand { + /** + * @generated from protobuf field: string path = 1; + */ + path: string; + /** + * @generated from protobuf field: repeated string args = 2; + */ + args: string[]; + /** + * @generated from protobuf field: repeated string env = 3; + */ + env: string[]; + /** + * preview is used to show the user what command will be executed before they decide to run it. + * It's like os.exec.Cmd.String with two exceptions: + * + * 1) It is prepended with Cmd.Env. + * 2) The command name is relative and not absolute. + * + * @generated from protobuf field: string preview = 4; + */ + preview: string; +} +// @generated message type with reflection information, may provide speed optimized methods +class Gateway$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.Gateway", [ + { no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "target_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "target_uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "target_user", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "local_address", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "local_port", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "protocol", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 9, name: "target_subresource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "gateway_cli_command", kind: "message", T: () => GatewayCLICommand } + ]); + } + create(value?: PartialMessage): Gateway { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uri = ""; + message.targetName = ""; + message.targetUri = ""; + message.targetUser = ""; + message.localAddress = ""; + message.localPort = ""; + message.protocol = ""; + message.targetSubresourceName = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Gateway): Gateway { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string uri */ 1: + message.uri = reader.string(); + break; + case /* string target_name */ 2: + message.targetName = reader.string(); + break; + case /* string target_uri */ 3: + message.targetUri = reader.string(); + break; + case /* string target_user */ 4: + message.targetUser = reader.string(); + break; + case /* string local_address */ 5: + message.localAddress = reader.string(); + break; + case /* string local_port */ 6: + message.localPort = reader.string(); + break; + case /* string protocol */ 7: + message.protocol = reader.string(); + break; + case /* string target_subresource_name */ 9: + message.targetSubresourceName = reader.string(); + break; + case /* teleport.lib.teleterm.v1.GatewayCLICommand gateway_cli_command */ 10: + message.gatewayCliCommand = GatewayCLICommand.internalBinaryRead(reader, reader.uint32(), options, message.gatewayCliCommand); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Gateway, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string uri = 1; */ + if (message.uri !== "") + writer.tag(1, WireType.LengthDelimited).string(message.uri); + /* string target_name = 2; */ + if (message.targetName !== "") + writer.tag(2, WireType.LengthDelimited).string(message.targetName); + /* string target_uri = 3; */ + if (message.targetUri !== "") + writer.tag(3, WireType.LengthDelimited).string(message.targetUri); + /* string target_user = 4; */ + if (message.targetUser !== "") + writer.tag(4, WireType.LengthDelimited).string(message.targetUser); + /* string local_address = 5; */ + if (message.localAddress !== "") + writer.tag(5, WireType.LengthDelimited).string(message.localAddress); + /* string local_port = 6; */ + if (message.localPort !== "") + writer.tag(6, WireType.LengthDelimited).string(message.localPort); + /* string protocol = 7; */ + if (message.protocol !== "") + writer.tag(7, WireType.LengthDelimited).string(message.protocol); + /* string target_subresource_name = 9; */ + if (message.targetSubresourceName !== "") + writer.tag(9, WireType.LengthDelimited).string(message.targetSubresourceName); + /* teleport.lib.teleterm.v1.GatewayCLICommand gateway_cli_command = 10; */ + if (message.gatewayCliCommand) + GatewayCLICommand.internalBinaryWrite(message.gatewayCliCommand, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.Gateway + */ +export const Gateway = new Gateway$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GatewayCLICommand$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.GatewayCLICommand", [ + { no: 1, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "args", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "env", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "preview", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): GatewayCLICommand { + const message = globalThis.Object.create((this.messagePrototype!)); + message.path = ""; + message.args = []; + message.env = []; + message.preview = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GatewayCLICommand): GatewayCLICommand { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string path */ 1: + message.path = reader.string(); + break; + case /* repeated string args */ 2: + message.args.push(reader.string()); + break; + case /* repeated string env */ 3: + message.env.push(reader.string()); + break; + case /* string preview */ 4: + message.preview = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GatewayCLICommand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string path = 1; */ + if (message.path !== "") + writer.tag(1, WireType.LengthDelimited).string(message.path); + /* repeated string args = 2; */ + for (let i = 0; i < message.args.length; i++) + writer.tag(2, WireType.LengthDelimited).string(message.args[i]); + /* repeated string env = 3; */ + for (let i = 0; i < message.env.length; i++) + writer.tag(3, WireType.LengthDelimited).string(message.env[i]); + /* string preview = 4; */ + if (message.preview !== "") + writer.tag(4, WireType.LengthDelimited).string(message.preview); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.GatewayCLICommand + */ +export const GatewayCLICommand = new GatewayCLICommand$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/kube_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/kube_pb.ts new file mode 100644 index 00000000000..ccd336350c6 --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/kube_pb.ts @@ -0,0 +1,121 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/kube.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +import { Label } from "./label_pb"; +/** + * Kube describes connected Kubernetes cluster + * + * @generated from protobuf message teleport.lib.teleterm.v1.Kube + */ +export interface Kube { + /** + * uri is the kube resource URI + * + * @generated from protobuf field: string uri = 1; + */ + uri: string; + /** + * name is the kube name + * + * @generated from protobuf field: string name = 2; + */ + name: string; + /** + * labels is the kube labels + * + * @generated from protobuf field: repeated teleport.lib.teleterm.v1.Label labels = 3; + */ + labels: Label[]; +} +// @generated message type with reflection information, may provide speed optimized methods +class Kube$Type extends MessageType { + constructor() { + super("teleport.lib.teleterm.v1.Kube", [ + { no: 1, name: "uri", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "labels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Label } + ]); + } + create(value?: PartialMessage): Kube { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uri = ""; + message.name = ""; + message.labels = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Kube): Kube { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string uri */ 1: + message.uri = reader.string(); + break; + case /* string name */ 2: + message.name = reader.string(); + break; + case /* repeated teleport.lib.teleterm.v1.Label labels */ 3: + message.labels.push(Label.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Kube, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string uri = 1; */ + if (message.uri !== "") + writer.tag(1, WireType.LengthDelimited).string(message.uri); + /* string name = 2; */ + if (message.name !== "") + writer.tag(2, WireType.LengthDelimited).string(message.name); + /* repeated teleport.lib.teleterm.v1.Label labels = 3; */ + for (let i = 0; i < message.labels.length; i++) + Label.internalBinaryWrite(message.labels[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message teleport.lib.teleterm.v1.Kube + */ +export const Kube = new Kube$Type(); diff --git a/gen/proto/ts/teleport/lib/teleterm/v1/label_pb.ts b/gen/proto/ts/teleport/lib/teleterm/v1/label_pb.ts new file mode 100644 index 00000000000..8c41b3de777 --- /dev/null +++ b/gen/proto/ts/teleport/lib/teleterm/v1/label_pb.ts @@ -0,0 +1,106 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_number,eslint_disable,add_pb_suffix,client_grpc1,server_grpc1,ts_nocheck +// @generated from protobuf file "teleport/lib/teleterm/v1/label.proto" (package "teleport.lib.teleterm.v1", syntax proto3) +// tslint:disable +// @ts-nocheck +// +// +// Teleport +// Copyright (C) 2023 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * Label describes a label + * + * @generated from protobuf message teleport.lib.teleterm.v1.Label + */ +export interface Label { + /** + * name is this label name + * + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * value is this label value + * + * @generated from protobuf field: string value = 2; + */ + value: string; +} +// @generated message type with reflection information, may provide speed optimized methods +class Label$Type extends MessageType