From 4b9b36cb29c5d3769220a75f8a43131328ab62c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Cie=C5=9Blak?= Date: Wed, 28 Dec 2022 14:47:26 +0100 Subject: [PATCH] Import prehog protos instead of redefining events --- packages/teleterm/README.md | 1 + .../src/services/tshd/mapUsageEvent.ts | 171 +- .../tshd/prehog/v1alpha/connect_grpc_pb.d.ts | 42 + .../tshd/prehog/v1alpha/connect_grpc_pb.js | 60 + .../tshd/prehog/v1alpha/connect_pb.d.ts | 323 ++ .../tshd/prehog/v1alpha/connect_pb.js | 2189 +++++++++++++ .../tshd/prehog/v1alpha/teleport_grpc_pb.d.ts | 42 + .../tshd/prehog/v1alpha/teleport_grpc_pb.js | 60 + .../tshd/prehog/v1alpha/teleport_pb.d.ts | 433 +++ .../tshd/prehog/v1alpha/teleport_pb.js | 2909 +++++++++++++++++ packages/teleterm/src/services/tshd/types.ts | 6 + .../services/tshd/v1/access_request_pb.d.ts | 58 + .../src/services/tshd/v1/access_request_pb.js | 433 ++- .../src/services/tshd/v1/service_grpc_pb.js | 2 +- .../src/services/tshd/v1/usage_events_pb.d.ts | 369 +-- .../src/services/tshd/v1/usage_events_pb.js | 2539 +++----------- .../services/usageEvent/usageEventService.ts | 64 +- 17 files changed, 7139 insertions(+), 2562 deletions(-) create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.d.ts create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.js create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.d.ts create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.js create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.d.ts create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.js create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.d.ts create mode 100644 packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.js diff --git a/packages/teleterm/README.md b/packages/teleterm/README.md index 9e5823b14..722e5f4e1 100644 --- a/packages/teleterm/README.md +++ b/packages/teleterm/README.md @@ -117,6 +117,7 @@ lib/teleterm/api/protogen/ ```sh $ cd webapps $ rm -rf ./packages/teleterm/src/services/tshd/v1/ && cp -R ../teleport/lib/teleterm/api/protogen/js/v1 ./packages/teleterm/src/services/tshd/v1 +$ rm -rf ./packages/teleterm/src/services/tshd/prehog && cp -R ../teleport/lib/prehog/gen-js/prehog ./packages/teleterm/src/services/tshd/prehog ``` ### Generating shared process gRPC protobuf files diff --git a/packages/teleterm/src/services/tshd/mapUsageEvent.ts b/packages/teleterm/src/services/tshd/mapUsageEvent.ts index cf122001c..df1399823 100644 --- a/packages/teleterm/src/services/tshd/mapUsageEvent.ts +++ b/packages/teleterm/src/services/tshd/mapUsageEvent.ts @@ -1,99 +1,108 @@ import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; -import { - AccessRequestAssumeRoleEvent, - AccessRequestCreateEvent, - AccessRequestReviewEvent, - ClusterProperties, - ProtocolRunEvent, - ConnectUsageEventOneOf, - LoginEvent, - FileTransferRunEvent, - ReportEventRequest, - UserJobRoleUpdateEvent, -} from 'teleterm/services/tshd/v1/usage_events_pb'; +import * as api from 'teleterm/services/tshd/v1/usage_events_pb'; +import * as prehogApi from 'teleterm/services/tshd/prehog/v1alpha/connect_pb'; import * as types from './types'; -export function mapUsageEvent(event: types.ReportEventRequest) { - return new ReportEventRequest() - .setDistinctId(event.distinctId) - .setTimestamp(Timestamp.fromDate(event.timestamp)) - .setEvent(mapEventBody(event.event)); +export function mapUsageEvent( + req: types.ReportEventRequest +): api.ReportEventRequest { + const apiReq = new api.ReportEventRequest() + .setAuthClusterId(req.authClusterId) + .setDistinctId(req.distinctId) + .setTimestamp(Timestamp.fromDate(req.timestamp)); + + setEvent(apiReq, req); + + return apiReq; } -function mapEventBody( - event: ConnectUsageEventOneOf.AsObject -): ConnectUsageEventOneOf { - if (event.loginEvent) { - const { loginEvent } = event; - return new ConnectUsageEventOneOf().setLoginEvent( - new LoginEvent() - .setClusterProperties(mapClusterProperties(loginEvent)) - .setOs(loginEvent.os) - .setArch(loginEvent.arch) - .setOsVersion(loginEvent.osVersion) - .setConnectVersion(loginEvent.connectVersion) - ); - } - if (event.protocolRunEvent) { - const { protocolRunEvent } = event; - return new ConnectUsageEventOneOf().setProtocolRunEvent( - new ProtocolRunEvent() - .setClusterProperties(mapClusterProperties(protocolRunEvent)) - .setProtocol(protocolRunEvent.protocol) +function setEvent( + apiReq: api.ReportEventRequest, + req: types.ReportEventRequest +): void { + // Non-anonymized events. + + if (req.connectUserJobRoleUpdateEvent) { + const { connectUserJobRoleUpdateEvent: event } = req; + const apiEvent = new prehogApi.ConnectUserJobRoleUpdateEvent().setJobRole( + event.jobRole ); + + apiReq.setConnectUserJobRoleUpdateEvent(apiEvent); + return; } - if (event.accessRequestCreateEvent) { - const { accessRequestCreateEvent } = event; - return new ConnectUsageEventOneOf().setAccessRequestCreateEvent( - new AccessRequestCreateEvent() - .setClusterProperties(mapClusterProperties(accessRequestCreateEvent)) - .setKind(accessRequestCreateEvent.kind) - ); + + // Anonymized events. + + if (req.connectLogin) { + const { connectLogin: event } = req; + const apiEvent = new prehogApi.ConnectLoginEvent() + .setClusterName(event.clusterName) + .setUserName(event.userName) + .setOs(event.os) + .setArch(event.arch) + .setOsVersion(event.osVersion) + .setConnectVersion(event.connectVersion); + + apiReq.setConnectLogin(apiEvent); + return; } - if (event.accessRequestReviewEvent) { - const { accessRequestReviewEvent } = event; - return new ConnectUsageEventOneOf().setAccessRequestReviewEvent( - new AccessRequestReviewEvent().setClusterProperties( - mapClusterProperties(accessRequestReviewEvent) - ) - ); + + if (req.connectProtocolRun) { + const { connectProtocolRun: event } = req; + const apiEvent = new prehogApi.ConnectProtocolRunEvent() + .setClusterName(event.clusterName) + .setUserName(event.userName) + .setProtocol(event.protocol); + + apiReq.setConnectProtocolRun(apiEvent); + return; } - if (event.accessRequestAssumeRoleEvent) { - const { accessRequestAssumeRoleEvent } = event; - return new ConnectUsageEventOneOf().setAccessRequestAssumeRoleEvent( - new AccessRequestAssumeRoleEvent().setClusterProperties( - mapClusterProperties(accessRequestAssumeRoleEvent) - ) - ); + + if (req.connectAccessRequestCreate) { + const { connectAccessRequestCreate: event } = req; + const apiEvent = new prehogApi.ConnectAccessRequestCreateEvent() + .setClusterName(event.clusterName) + .setUserName(event.userName) + .setKind(event.kind); + + apiReq.setConnectAccessRequestCreate(apiEvent); + return; } - if (event.fileTransferRunEvent) { - const { fileTransferRunEvent } = event; - return new ConnectUsageEventOneOf().setFileTransferRunEvent( - new FileTransferRunEvent() - .setClusterProperties(mapClusterProperties(fileTransferRunEvent)) - .setDirection(fileTransferRunEvent.direction) - ); + + if (req.connectAccessRequestReview) { + const { connectAccessRequestReview: event } = req; + + const apiEvent = new prehogApi.ConnectAccessRequestReviewEvent() + .setClusterName(event.clusterName) + .setUserName(event.userName); + + apiReq.setConnectAccessRequestReview(apiEvent); + return; } - if (event.userJobRoleUpdateEvent) { - const { userJobRoleUpdateEvent } = event; - return new ConnectUsageEventOneOf().setUserJobRoleUpdateEvent( - new UserJobRoleUpdateEvent().setJobRole(userJobRoleUpdateEvent.jobRole) - ); + + if (req.connectAccessRequestAssumeRole) { + const { connectAccessRequestAssumeRole: event } = req; + const apiEvent = new prehogApi.ConnectAccessRequestAssumeRoleEvent() + .setClusterName(event.clusterName) + .setUserName(event.userName); + + apiReq.setConnectAccessRequestAssumeRole(apiEvent); + return; } - throw new Error(`Unrecognized event: ${JSON.stringify(event)}`); -} + if (req.connectFileTransferRunEvent) { + const { connectFileTransferRunEvent: event } = req; + const apiEvent = new prehogApi.ConnectFileTransferRunEvent() + .setClusterName(event.clusterName) + .setUserName(event.userName) + .setDirection(event.direction); -function mapClusterProperties(e: { - clusterProperties?: ClusterProperties.AsObject; -}): ClusterProperties { - if (!e.clusterProperties) { - throw new Error('Missing cluster metadata'); + apiReq.setConnectFileTransferRunEvent(apiEvent); + return; } - return new ClusterProperties() - .setAuthClusterId(e.clusterProperties.authClusterId) - .setClusterName(e.clusterProperties.clusterName) - .setUserName(e.clusterProperties.userName); + + throw new Error(`Unrecognized event: ${JSON.stringify(req)}`); } diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.d.ts b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.d.ts new file mode 100644 index 000000000..edf786140 --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.d.ts @@ -0,0 +1,42 @@ +// package: prehog.v1alpha +// file: prehog/v1alpha/connect.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "grpc"; +import * as prehog_v1alpha_connect_pb from "../../prehog/v1alpha/connect_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +interface IConnectReportingServiceService extends grpc.ServiceDefinition { + submitConnectEvent: IConnectReportingServiceService_ISubmitConnectEvent; +} + +interface IConnectReportingServiceService_ISubmitConnectEvent extends grpc.MethodDefinition { + path: "/prehog.v1alpha.ConnectReportingService/SubmitConnectEvent"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const ConnectReportingServiceService: IConnectReportingServiceService; + +export interface IConnectReportingServiceServer { + submitConnectEvent: grpc.handleUnaryCall; +} + +export interface IConnectReportingServiceClient { + submitConnectEvent(request: prehog_v1alpha_connect_pb.SubmitConnectEventRequest, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_connect_pb.SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; + submitConnectEvent(request: prehog_v1alpha_connect_pb.SubmitConnectEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_connect_pb.SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; + submitConnectEvent(request: prehog_v1alpha_connect_pb.SubmitConnectEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_connect_pb.SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; +} + +export class ConnectReportingServiceClient extends grpc.Client implements IConnectReportingServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public submitConnectEvent(request: prehog_v1alpha_connect_pb.SubmitConnectEventRequest, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_connect_pb.SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; + public submitConnectEvent(request: prehog_v1alpha_connect_pb.SubmitConnectEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_connect_pb.SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; + public submitConnectEvent(request: prehog_v1alpha_connect_pb.SubmitConnectEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_connect_pb.SubmitConnectEventResponse) => void): grpc.ClientUnaryCall; +} diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.js b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.js new file mode 100644 index 000000000..6b4d95fa2 --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_grpc_pb.js @@ -0,0 +1,60 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// Copyright 2022 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. +// +'use strict'; +var grpc = require('@grpc/grpc-js'); +var prehog_v1alpha_connect_pb = require('../../prehog/v1alpha/connect_pb.js'); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); + +function serialize_prehog_v1alpha_SubmitConnectEventRequest(arg) { + if (!(arg instanceof prehog_v1alpha_connect_pb.SubmitConnectEventRequest)) { + throw new Error('Expected argument of type prehog.v1alpha.SubmitConnectEventRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_prehog_v1alpha_SubmitConnectEventRequest(buffer_arg) { + return prehog_v1alpha_connect_pb.SubmitConnectEventRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_prehog_v1alpha_SubmitConnectEventResponse(arg) { + if (!(arg instanceof prehog_v1alpha_connect_pb.SubmitConnectEventResponse)) { + throw new Error('Expected argument of type prehog.v1alpha.SubmitConnectEventResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_prehog_v1alpha_SubmitConnectEventResponse(buffer_arg) { + return prehog_v1alpha_connect_pb.SubmitConnectEventResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var ConnectReportingServiceService = exports.ConnectReportingServiceService = { + submitConnectEvent: { + path: '/prehog.v1alpha.ConnectReportingService/SubmitConnectEvent', + requestStream: false, + responseStream: false, + requestType: prehog_v1alpha_connect_pb.SubmitConnectEventRequest, + responseType: prehog_v1alpha_connect_pb.SubmitConnectEventResponse, + requestSerialize: serialize_prehog_v1alpha_SubmitConnectEventRequest, + requestDeserialize: deserialize_prehog_v1alpha_SubmitConnectEventRequest, + responseSerialize: serialize_prehog_v1alpha_SubmitConnectEventResponse, + responseDeserialize: deserialize_prehog_v1alpha_SubmitConnectEventResponse, + }, +}; + +exports.ConnectReportingServiceClient = grpc.makeGenericClientConstructor(ConnectReportingServiceService); diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.d.ts b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.d.ts new file mode 100644 index 000000000..ec0b548ad --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.d.ts @@ -0,0 +1,323 @@ +// package: prehog.v1alpha +// file: prehog/v1alpha/connect.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class ConnectLoginEvent extends jspb.Message { + getClusterName(): string; + setClusterName(value: string): ConnectLoginEvent; + + getUserName(): string; + setUserName(value: string): ConnectLoginEvent; + + getArch(): string; + setArch(value: string): ConnectLoginEvent; + + getOs(): string; + setOs(value: string): ConnectLoginEvent; + + getOsVersion(): string; + setOsVersion(value: string): ConnectLoginEvent; + + getConnectVersion(): string; + setConnectVersion(value: string): ConnectLoginEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectLoginEvent.AsObject; + static toObject(includeInstance: boolean, msg: ConnectLoginEvent): ConnectLoginEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConnectLoginEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConnectLoginEvent; + static deserializeBinaryFromReader(message: ConnectLoginEvent, reader: jspb.BinaryReader): ConnectLoginEvent; +} + +export namespace ConnectLoginEvent { + export type AsObject = { + clusterName: string, + userName: string, + arch: string, + os: string, + osVersion: string, + connectVersion: string, + } +} + +export class ConnectProtocolRunEvent extends jspb.Message { + getClusterName(): string; + setClusterName(value: string): ConnectProtocolRunEvent; + + getUserName(): string; + setUserName(value: string): ConnectProtocolRunEvent; + + getProtocol(): string; + setProtocol(value: string): ConnectProtocolRunEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectProtocolRunEvent.AsObject; + static toObject(includeInstance: boolean, msg: ConnectProtocolRunEvent): ConnectProtocolRunEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConnectProtocolRunEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConnectProtocolRunEvent; + static deserializeBinaryFromReader(message: ConnectProtocolRunEvent, reader: jspb.BinaryReader): ConnectProtocolRunEvent; +} + +export namespace ConnectProtocolRunEvent { + export type AsObject = { + clusterName: string, + userName: string, + protocol: string, + } +} + +export class ConnectAccessRequestCreateEvent extends jspb.Message { + getClusterName(): string; + setClusterName(value: string): ConnectAccessRequestCreateEvent; + + getUserName(): string; + setUserName(value: string): ConnectAccessRequestCreateEvent; + + getKind(): string; + setKind(value: string): ConnectAccessRequestCreateEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectAccessRequestCreateEvent.AsObject; + static toObject(includeInstance: boolean, msg: ConnectAccessRequestCreateEvent): ConnectAccessRequestCreateEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConnectAccessRequestCreateEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConnectAccessRequestCreateEvent; + static deserializeBinaryFromReader(message: ConnectAccessRequestCreateEvent, reader: jspb.BinaryReader): ConnectAccessRequestCreateEvent; +} + +export namespace ConnectAccessRequestCreateEvent { + export type AsObject = { + clusterName: string, + userName: string, + kind: string, + } +} + +export class ConnectAccessRequestReviewEvent extends jspb.Message { + getClusterName(): string; + setClusterName(value: string): ConnectAccessRequestReviewEvent; + + getUserName(): string; + setUserName(value: string): ConnectAccessRequestReviewEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectAccessRequestReviewEvent.AsObject; + static toObject(includeInstance: boolean, msg: ConnectAccessRequestReviewEvent): ConnectAccessRequestReviewEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConnectAccessRequestReviewEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConnectAccessRequestReviewEvent; + static deserializeBinaryFromReader(message: ConnectAccessRequestReviewEvent, reader: jspb.BinaryReader): ConnectAccessRequestReviewEvent; +} + +export namespace ConnectAccessRequestReviewEvent { + export type AsObject = { + clusterName: string, + userName: string, + } +} + +export class ConnectAccessRequestAssumeRoleEvent extends jspb.Message { + getClusterName(): string; + setClusterName(value: string): ConnectAccessRequestAssumeRoleEvent; + + getUserName(): string; + setUserName(value: string): ConnectAccessRequestAssumeRoleEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectAccessRequestAssumeRoleEvent.AsObject; + static toObject(includeInstance: boolean, msg: ConnectAccessRequestAssumeRoleEvent): ConnectAccessRequestAssumeRoleEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConnectAccessRequestAssumeRoleEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConnectAccessRequestAssumeRoleEvent; + static deserializeBinaryFromReader(message: ConnectAccessRequestAssumeRoleEvent, reader: jspb.BinaryReader): ConnectAccessRequestAssumeRoleEvent; +} + +export namespace ConnectAccessRequestAssumeRoleEvent { + export type AsObject = { + clusterName: string, + userName: string, + } +} + +export class ConnectFileTransferRunEvent extends jspb.Message { + getClusterName(): string; + setClusterName(value: string): ConnectFileTransferRunEvent; + + getUserName(): string; + setUserName(value: string): ConnectFileTransferRunEvent; + + getDirection(): string; + setDirection(value: string): ConnectFileTransferRunEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectFileTransferRunEvent.AsObject; + static toObject(includeInstance: boolean, msg: ConnectFileTransferRunEvent): ConnectFileTransferRunEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConnectFileTransferRunEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConnectFileTransferRunEvent; + static deserializeBinaryFromReader(message: ConnectFileTransferRunEvent, reader: jspb.BinaryReader): ConnectFileTransferRunEvent; +} + +export namespace ConnectFileTransferRunEvent { + export type AsObject = { + clusterName: string, + userName: string, + direction: string, + } +} + +export class ConnectUserJobRoleUpdateEvent extends jspb.Message { + getJobRole(): string; + setJobRole(value: string): ConnectUserJobRoleUpdateEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectUserJobRoleUpdateEvent.AsObject; + static toObject(includeInstance: boolean, msg: ConnectUserJobRoleUpdateEvent): ConnectUserJobRoleUpdateEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConnectUserJobRoleUpdateEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConnectUserJobRoleUpdateEvent; + static deserializeBinaryFromReader(message: ConnectUserJobRoleUpdateEvent, reader: jspb.BinaryReader): ConnectUserJobRoleUpdateEvent; +} + +export namespace ConnectUserJobRoleUpdateEvent { + export type AsObject = { + jobRole: string, + } +} + +export class SubmitConnectEventRequest extends jspb.Message { + getDistinctId(): string; + setDistinctId(value: string): SubmitConnectEventRequest; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): SubmitConnectEventRequest; + + + hasConnectLogin(): boolean; + clearConnectLogin(): void; + getConnectLogin(): ConnectLoginEvent | undefined; + setConnectLogin(value?: ConnectLoginEvent): SubmitConnectEventRequest; + + + hasConnectProtocolRun(): boolean; + clearConnectProtocolRun(): void; + getConnectProtocolRun(): ConnectProtocolRunEvent | undefined; + setConnectProtocolRun(value?: ConnectProtocolRunEvent): SubmitConnectEventRequest; + + + hasConnectAccessRequestCreate(): boolean; + clearConnectAccessRequestCreate(): void; + getConnectAccessRequestCreate(): ConnectAccessRequestCreateEvent | undefined; + setConnectAccessRequestCreate(value?: ConnectAccessRequestCreateEvent): SubmitConnectEventRequest; + + + hasConnectAccessRequestReview(): boolean; + clearConnectAccessRequestReview(): void; + getConnectAccessRequestReview(): ConnectAccessRequestReviewEvent | undefined; + setConnectAccessRequestReview(value?: ConnectAccessRequestReviewEvent): SubmitConnectEventRequest; + + + hasConnectAccessRequestAssumeRole(): boolean; + clearConnectAccessRequestAssumeRole(): void; + getConnectAccessRequestAssumeRole(): ConnectAccessRequestAssumeRoleEvent | undefined; + setConnectAccessRequestAssumeRole(value?: ConnectAccessRequestAssumeRoleEvent): SubmitConnectEventRequest; + + + hasConnectFileTransferRunEvent(): boolean; + clearConnectFileTransferRunEvent(): void; + getConnectFileTransferRunEvent(): ConnectFileTransferRunEvent | undefined; + setConnectFileTransferRunEvent(value?: ConnectFileTransferRunEvent): SubmitConnectEventRequest; + + + hasConnectUserJobRoleUpdateEvent(): boolean; + clearConnectUserJobRoleUpdateEvent(): void; + getConnectUserJobRoleUpdateEvent(): ConnectUserJobRoleUpdateEvent | undefined; + setConnectUserJobRoleUpdateEvent(value?: ConnectUserJobRoleUpdateEvent): SubmitConnectEventRequest; + + + getEventCase(): SubmitConnectEventRequest.EventCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubmitConnectEventRequest.AsObject; + static toObject(includeInstance: boolean, msg: SubmitConnectEventRequest): SubmitConnectEventRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubmitConnectEventRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubmitConnectEventRequest; + static deserializeBinaryFromReader(message: SubmitConnectEventRequest, reader: jspb.BinaryReader): SubmitConnectEventRequest; +} + +export namespace SubmitConnectEventRequest { + export type AsObject = { + distinctId: string, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + connectLogin?: ConnectLoginEvent.AsObject, + connectProtocolRun?: ConnectProtocolRunEvent.AsObject, + connectAccessRequestCreate?: ConnectAccessRequestCreateEvent.AsObject, + connectAccessRequestReview?: ConnectAccessRequestReviewEvent.AsObject, + connectAccessRequestAssumeRole?: ConnectAccessRequestAssumeRoleEvent.AsObject, + connectFileTransferRunEvent?: ConnectFileTransferRunEvent.AsObject, + connectUserJobRoleUpdateEvent?: ConnectUserJobRoleUpdateEvent.AsObject, + } + + export enum EventCase { + EVENT_NOT_SET = 0, + + CONNECT_LOGIN = 3, + + CONNECT_PROTOCOL_RUN = 4, + + CONNECT_ACCESS_REQUEST_CREATE = 5, + + CONNECT_ACCESS_REQUEST_REVIEW = 6, + + CONNECT_ACCESS_REQUEST_ASSUME_ROLE = 7, + + CONNECT_FILE_TRANSFER_RUN_EVENT = 8, + + CONNECT_USER_JOB_ROLE_UPDATE_EVENT = 9, + + } + +} + +export class SubmitConnectEventResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubmitConnectEventResponse.AsObject; + static toObject(includeInstance: boolean, msg: SubmitConnectEventResponse): SubmitConnectEventResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubmitConnectEventResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubmitConnectEventResponse; + static deserializeBinaryFromReader(message: SubmitConnectEventResponse, reader: jspb.BinaryReader): SubmitConnectEventResponse; +} + +export namespace SubmitConnectEventResponse { + export type AsObject = { + } +} diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.js b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.js new file mode 100644 index 000000000..4b2752f8f --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/connect_pb.js @@ -0,0 +1,2189 @@ +// source: prehog/v1alpha/connect.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.ConnectAccessRequestCreateEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.ConnectAccessRequestReviewEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.ConnectFileTransferRunEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.ConnectLoginEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.ConnectProtocolRunEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SubmitConnectEventRequest', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SubmitConnectEventRequest.EventCase', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SubmitConnectEventResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ConnectLoginEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ConnectLoginEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ConnectLoginEvent.displayName = 'proto.prehog.v1alpha.ConnectLoginEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ConnectProtocolRunEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ConnectProtocolRunEvent.displayName = 'proto.prehog.v1alpha.ConnectProtocolRunEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ConnectAccessRequestCreateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.displayName = 'proto.prehog.v1alpha.ConnectAccessRequestCreateEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ConnectAccessRequestReviewEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.displayName = 'proto.prehog.v1alpha.ConnectAccessRequestReviewEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.displayName = 'proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ConnectFileTransferRunEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ConnectFileTransferRunEvent.displayName = 'proto.prehog.v1alpha.ConnectFileTransferRunEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.displayName = 'proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.SubmitConnectEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_); +}; +goog.inherits(proto.prehog.v1alpha.SubmitConnectEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.SubmitConnectEventRequest.displayName = 'proto.prehog.v1alpha.SubmitConnectEventRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.SubmitConnectEventResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.SubmitConnectEventResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.SubmitConnectEventResponse.displayName = 'proto.prehog.v1alpha.SubmitConnectEventResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ConnectLoginEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ConnectLoginEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectLoginEvent.toObject = function(includeInstance, msg) { + var f, obj = { + clusterName: jspb.Message.getFieldWithDefault(msg, 1, ""), + userName: jspb.Message.getFieldWithDefault(msg, 2, ""), + arch: jspb.Message.getFieldWithDefault(msg, 3, ""), + os: jspb.Message.getFieldWithDefault(msg, 4, ""), + osVersion: jspb.Message.getFieldWithDefault(msg, 5, ""), + connectVersion: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} + */ +proto.prehog.v1alpha.ConnectLoginEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ConnectLoginEvent; + return proto.prehog.v1alpha.ConnectLoginEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ConnectLoginEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} + */ +proto.prehog.v1alpha.ConnectLoginEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClusterName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setArch(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOs(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOsVersion(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ConnectLoginEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ConnectLoginEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectLoginEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClusterName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArch(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOs(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOsVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getConnectVersion(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string cluster_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.getClusterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} returns this + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.setClusterName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string user_name = 2; + * @return {string} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} returns this + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string arch = 3; + * @return {string} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.getArch = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} returns this + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.setArch = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string os = 4; + * @return {string} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.getOs = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} returns this + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.setOs = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string os_version = 5; + * @return {string} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.getOsVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} returns this + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.setOsVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string connect_version = 6; + * @return {string} + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.getConnectVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectLoginEvent} returns this + */ +proto.prehog.v1alpha.ConnectLoginEvent.prototype.setConnectVersion = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ConnectProtocolRunEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ConnectProtocolRunEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.toObject = function(includeInstance, msg) { + var f, obj = { + clusterName: jspb.Message.getFieldWithDefault(msg, 1, ""), + userName: jspb.Message.getFieldWithDefault(msg, 2, ""), + protocol: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ConnectProtocolRunEvent} + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ConnectProtocolRunEvent; + return proto.prehog.v1alpha.ConnectProtocolRunEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ConnectProtocolRunEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ConnectProtocolRunEvent} + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClusterName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProtocol(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ConnectProtocolRunEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ConnectProtocolRunEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClusterName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProtocol(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string cluster_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.getClusterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectProtocolRunEvent} returns this + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.setClusterName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string user_name = 2; + * @return {string} + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectProtocolRunEvent} returns this + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string protocol = 3; + * @return {string} + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.getProtocol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectProtocolRunEvent} returns this + */ +proto.prehog.v1alpha.ConnectProtocolRunEvent.prototype.setProtocol = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + clusterName: jspb.Message.getFieldWithDefault(msg, 1, ""), + userName: jspb.Message.getFieldWithDefault(msg, 2, ""), + kind: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ConnectAccessRequestCreateEvent; + return proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClusterName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setKind(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClusterName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getKind(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string cluster_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.getClusterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} returns this + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.setClusterName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string user_name = 2; + * @return {string} + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} returns this + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string kind = 3; + * @return {string} + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.getKind = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} returns this + */ +proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.prototype.setKind = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.toObject = function(includeInstance, msg) { + var f, obj = { + clusterName: jspb.Message.getFieldWithDefault(msg, 1, ""), + userName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ConnectAccessRequestReviewEvent; + return proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClusterName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClusterName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string cluster_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.prototype.getClusterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} returns this + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.prototype.setClusterName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string user_name = 2; + * @return {string} + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} returns this + */ +proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.toObject = function(includeInstance, msg) { + var f, obj = { + clusterName: jspb.Message.getFieldWithDefault(msg, 1, ""), + userName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent; + return proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClusterName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClusterName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string cluster_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.prototype.getClusterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} returns this + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.prototype.setClusterName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string user_name = 2; + * @return {string} + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} returns this + */ +proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ConnectFileTransferRunEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.toObject = function(includeInstance, msg) { + var f, obj = { + clusterName: jspb.Message.getFieldWithDefault(msg, 1, ""), + userName: jspb.Message.getFieldWithDefault(msg, 2, ""), + direction: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ConnectFileTransferRunEvent; + return proto.prehog.v1alpha.ConnectFileTransferRunEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClusterName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDirection(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ConnectFileTransferRunEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClusterName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDirection(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string cluster_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.getClusterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} returns this + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.setClusterName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string user_name = 2; + * @return {string} + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} returns this + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string direction = 3; + * @return {string} + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.getDirection = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectFileTransferRunEvent} returns this + */ +proto.prehog.v1alpha.ConnectFileTransferRunEvent.prototype.setDirection = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + jobRole: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent; + return proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJobRole(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJobRole(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string job_role = 1; + * @return {string} + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.prototype.getJobRole = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} returns this + */ +proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.prototype.setJobRole = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_ = [[3,4,5,6,7,8,9]]; + +/** + * @enum {number} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.EventCase = { + EVENT_NOT_SET: 0, + CONNECT_LOGIN: 3, + CONNECT_PROTOCOL_RUN: 4, + CONNECT_ACCESS_REQUEST_CREATE: 5, + CONNECT_ACCESS_REQUEST_REVIEW: 6, + CONNECT_ACCESS_REQUEST_ASSUME_ROLE: 7, + CONNECT_FILE_TRANSFER_RUN_EVENT: 8, + CONNECT_USER_JOB_ROLE_UPDATE_EVENT: 9 +}; + +/** + * @return {proto.prehog.v1alpha.SubmitConnectEventRequest.EventCase} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getEventCase = function() { + return /** @type {proto.prehog.v1alpha.SubmitConnectEventRequest.EventCase} */(jspb.Message.computeOneofCase(this, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.SubmitConnectEventRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.SubmitConnectEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + distinctId: jspb.Message.getFieldWithDefault(msg, 1, ""), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + connectLogin: (f = msg.getConnectLogin()) && proto.prehog.v1alpha.ConnectLoginEvent.toObject(includeInstance, f), + connectProtocolRun: (f = msg.getConnectProtocolRun()) && proto.prehog.v1alpha.ConnectProtocolRunEvent.toObject(includeInstance, f), + connectAccessRequestCreate: (f = msg.getConnectAccessRequestCreate()) && proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.toObject(includeInstance, f), + connectAccessRequestReview: (f = msg.getConnectAccessRequestReview()) && proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.toObject(includeInstance, f), + connectAccessRequestAssumeRole: (f = msg.getConnectAccessRequestAssumeRole()) && proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.toObject(includeInstance, f), + connectFileTransferRunEvent: (f = msg.getConnectFileTransferRunEvent()) && proto.prehog.v1alpha.ConnectFileTransferRunEvent.toObject(includeInstance, f), + connectUserJobRoleUpdateEvent: (f = msg.getConnectUserJobRoleUpdateEvent()) && proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.SubmitConnectEventRequest; + return proto.prehog.v1alpha.SubmitConnectEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.SubmitConnectEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDistinctId(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 3: + var value = new proto.prehog.v1alpha.ConnectLoginEvent; + reader.readMessage(value,proto.prehog.v1alpha.ConnectLoginEvent.deserializeBinaryFromReader); + msg.setConnectLogin(value); + break; + case 4: + var value = new proto.prehog.v1alpha.ConnectProtocolRunEvent; + reader.readMessage(value,proto.prehog.v1alpha.ConnectProtocolRunEvent.deserializeBinaryFromReader); + msg.setConnectProtocolRun(value); + break; + case 5: + var value = new proto.prehog.v1alpha.ConnectAccessRequestCreateEvent; + reader.readMessage(value,proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.deserializeBinaryFromReader); + msg.setConnectAccessRequestCreate(value); + break; + case 6: + var value = new proto.prehog.v1alpha.ConnectAccessRequestReviewEvent; + reader.readMessage(value,proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.deserializeBinaryFromReader); + msg.setConnectAccessRequestReview(value); + break; + case 7: + var value = new proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent; + reader.readMessage(value,proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.deserializeBinaryFromReader); + msg.setConnectAccessRequestAssumeRole(value); + break; + case 8: + var value = new proto.prehog.v1alpha.ConnectFileTransferRunEvent; + reader.readMessage(value,proto.prehog.v1alpha.ConnectFileTransferRunEvent.deserializeBinaryFromReader); + msg.setConnectFileTransferRunEvent(value); + break; + case 9: + var value = new proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent; + reader.readMessage(value,proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.deserializeBinaryFromReader); + msg.setConnectUserJobRoleUpdateEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.SubmitConnectEventRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.SubmitConnectEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDistinctId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getConnectLogin(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.prehog.v1alpha.ConnectLoginEvent.serializeBinaryToWriter + ); + } + f = message.getConnectProtocolRun(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.prehog.v1alpha.ConnectProtocolRunEvent.serializeBinaryToWriter + ); + } + f = message.getConnectAccessRequestCreate(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.prehog.v1alpha.ConnectAccessRequestCreateEvent.serializeBinaryToWriter + ); + } + f = message.getConnectAccessRequestReview(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.prehog.v1alpha.ConnectAccessRequestReviewEvent.serializeBinaryToWriter + ); + } + f = message.getConnectAccessRequestAssumeRole(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent.serializeBinaryToWriter + ); + } + f = message.getConnectFileTransferRunEvent(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.prehog.v1alpha.ConnectFileTransferRunEvent.serializeBinaryToWriter + ); + } + f = message.getConnectUserJobRoleUpdateEvent(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string distinct_id = 1; + * @return {string} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getDistinctId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setDistinctId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ConnectLoginEvent connect_login = 3; + * @return {?proto.prehog.v1alpha.ConnectLoginEvent} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getConnectLogin = function() { + return /** @type{?proto.prehog.v1alpha.ConnectLoginEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ConnectLoginEvent, 3)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectLoginEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setConnectLogin = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearConnectLogin = function() { + return this.setConnectLogin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasConnectLogin = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ConnectProtocolRunEvent connect_protocol_run = 4; + * @return {?proto.prehog.v1alpha.ConnectProtocolRunEvent} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getConnectProtocolRun = function() { + return /** @type{?proto.prehog.v1alpha.ConnectProtocolRunEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ConnectProtocolRunEvent, 4)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectProtocolRunEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setConnectProtocolRun = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearConnectProtocolRun = function() { + return this.setConnectProtocolRun(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasConnectProtocolRun = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ConnectAccessRequestCreateEvent connect_access_request_create = 5; + * @return {?proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getConnectAccessRequestCreate = function() { + return /** @type{?proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ConnectAccessRequestCreateEvent, 5)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectAccessRequestCreateEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setConnectAccessRequestCreate = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearConnectAccessRequestCreate = function() { + return this.setConnectAccessRequestCreate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasConnectAccessRequestCreate = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ConnectAccessRequestReviewEvent connect_access_request_review = 6; + * @return {?proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getConnectAccessRequestReview = function() { + return /** @type{?proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ConnectAccessRequestReviewEvent, 6)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectAccessRequestReviewEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setConnectAccessRequestReview = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearConnectAccessRequestReview = function() { + return this.setConnectAccessRequestReview(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasConnectAccessRequestReview = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ConnectAccessRequestAssumeRoleEvent connect_access_request_assume_role = 7; + * @return {?proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getConnectAccessRequestAssumeRole = function() { + return /** @type{?proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent, 7)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setConnectAccessRequestAssumeRole = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearConnectAccessRequestAssumeRole = function() { + return this.setConnectAccessRequestAssumeRole(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasConnectAccessRequestAssumeRole = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional ConnectFileTransferRunEvent connect_file_transfer_run_event = 8; + * @return {?proto.prehog.v1alpha.ConnectFileTransferRunEvent} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getConnectFileTransferRunEvent = function() { + return /** @type{?proto.prehog.v1alpha.ConnectFileTransferRunEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ConnectFileTransferRunEvent, 8)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectFileTransferRunEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setConnectFileTransferRunEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearConnectFileTransferRunEvent = function() { + return this.setConnectFileTransferRunEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasConnectFileTransferRunEvent = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional ConnectUserJobRoleUpdateEvent connect_user_job_role_update_event = 9; + * @return {?proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.getConnectUserJobRoleUpdateEvent = function() { + return /** @type{?proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent, 9)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.setConnectUserJobRoleUpdateEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.prehog.v1alpha.SubmitConnectEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitConnectEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.clearConnectUserJobRoleUpdateEvent = function() { + return this.setConnectUserJobRoleUpdateEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitConnectEventRequest.prototype.hasConnectUserJobRoleUpdateEvent = function() { + return jspb.Message.getField(this, 9) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.SubmitConnectEventResponse.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.SubmitConnectEventResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.SubmitConnectEventResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitConnectEventResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.SubmitConnectEventResponse} + */ +proto.prehog.v1alpha.SubmitConnectEventResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.SubmitConnectEventResponse; + return proto.prehog.v1alpha.SubmitConnectEventResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.SubmitConnectEventResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.SubmitConnectEventResponse} + */ +proto.prehog.v1alpha.SubmitConnectEventResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.SubmitConnectEventResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.SubmitConnectEventResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.SubmitConnectEventResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitConnectEventResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.prehog.v1alpha); diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.d.ts b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.d.ts new file mode 100644 index 000000000..8dac89c19 --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.d.ts @@ -0,0 +1,42 @@ +// package: prehog.v1alpha +// file: prehog/v1alpha/teleport.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "grpc"; +import * as prehog_v1alpha_teleport_pb from "../../prehog/v1alpha/teleport_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +interface ITeleportReportingServiceService extends grpc.ServiceDefinition { + submitEvent: ITeleportReportingServiceService_ISubmitEvent; +} + +interface ITeleportReportingServiceService_ISubmitEvent extends grpc.MethodDefinition { + path: "/prehog.v1alpha.TeleportReportingService/SubmitEvent"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const TeleportReportingServiceService: ITeleportReportingServiceService; + +export interface ITeleportReportingServiceServer { + submitEvent: grpc.handleUnaryCall; +} + +export interface ITeleportReportingServiceClient { + submitEvent(request: prehog_v1alpha_teleport_pb.SubmitEventRequest, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_teleport_pb.SubmitEventResponse) => void): grpc.ClientUnaryCall; + submitEvent(request: prehog_v1alpha_teleport_pb.SubmitEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_teleport_pb.SubmitEventResponse) => void): grpc.ClientUnaryCall; + submitEvent(request: prehog_v1alpha_teleport_pb.SubmitEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_teleport_pb.SubmitEventResponse) => void): grpc.ClientUnaryCall; +} + +export class TeleportReportingServiceClient extends grpc.Client implements ITeleportReportingServiceClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public submitEvent(request: prehog_v1alpha_teleport_pb.SubmitEventRequest, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_teleport_pb.SubmitEventResponse) => void): grpc.ClientUnaryCall; + public submitEvent(request: prehog_v1alpha_teleport_pb.SubmitEventRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_teleport_pb.SubmitEventResponse) => void): grpc.ClientUnaryCall; + public submitEvent(request: prehog_v1alpha_teleport_pb.SubmitEventRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: prehog_v1alpha_teleport_pb.SubmitEventResponse) => void): grpc.ClientUnaryCall; +} diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.js b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.js new file mode 100644 index 000000000..bec30f631 --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_grpc_pb.js @@ -0,0 +1,60 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// Copyright 2022 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. +// +'use strict'; +var grpc = require('@grpc/grpc-js'); +var prehog_v1alpha_teleport_pb = require('../../prehog/v1alpha/teleport_pb.js'); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); + +function serialize_prehog_v1alpha_SubmitEventRequest(arg) { + if (!(arg instanceof prehog_v1alpha_teleport_pb.SubmitEventRequest)) { + throw new Error('Expected argument of type prehog.v1alpha.SubmitEventRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_prehog_v1alpha_SubmitEventRequest(buffer_arg) { + return prehog_v1alpha_teleport_pb.SubmitEventRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_prehog_v1alpha_SubmitEventResponse(arg) { + if (!(arg instanceof prehog_v1alpha_teleport_pb.SubmitEventResponse)) { + throw new Error('Expected argument of type prehog.v1alpha.SubmitEventResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_prehog_v1alpha_SubmitEventResponse(buffer_arg) { + return prehog_v1alpha_teleport_pb.SubmitEventResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var TeleportReportingServiceService = exports.TeleportReportingServiceService = { + submitEvent: { + path: '/prehog.v1alpha.TeleportReportingService/SubmitEvent', + requestStream: false, + responseStream: false, + requestType: prehog_v1alpha_teleport_pb.SubmitEventRequest, + responseType: prehog_v1alpha_teleport_pb.SubmitEventResponse, + requestSerialize: serialize_prehog_v1alpha_SubmitEventRequest, + requestDeserialize: deserialize_prehog_v1alpha_SubmitEventRequest, + responseSerialize: serialize_prehog_v1alpha_SubmitEventResponse, + responseDeserialize: deserialize_prehog_v1alpha_SubmitEventResponse, + }, +}; + +exports.TeleportReportingServiceClient = grpc.makeGenericClientConstructor(TeleportReportingServiceService); diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.d.ts b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.d.ts new file mode 100644 index 000000000..5f354bfbf --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.d.ts @@ -0,0 +1,433 @@ +// package: prehog.v1alpha +// file: prehog/v1alpha/teleport.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class UserLoginEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UserLoginEvent; + + getConnectorType(): string; + setConnectorType(value: string): UserLoginEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UserLoginEvent.AsObject; + static toObject(includeInstance: boolean, msg: UserLoginEvent): UserLoginEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UserLoginEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UserLoginEvent; + static deserializeBinaryFromReader(message: UserLoginEvent, reader: jspb.BinaryReader): UserLoginEvent; +} + +export namespace UserLoginEvent { + export type AsObject = { + userName: string, + connectorType: string, + } +} + +export class SSOCreateEvent extends jspb.Message { + getConnectorType(): string; + setConnectorType(value: string): SSOCreateEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SSOCreateEvent.AsObject; + static toObject(includeInstance: boolean, msg: SSOCreateEvent): SSOCreateEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SSOCreateEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SSOCreateEvent; + static deserializeBinaryFromReader(message: SSOCreateEvent, reader: jspb.BinaryReader): SSOCreateEvent; +} + +export namespace SSOCreateEvent { + export type AsObject = { + connectorType: string, + } +} + +export class ResourceCreateEvent extends jspb.Message { + getResourceType(): string; + setResourceType(value: string): ResourceCreateEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceCreateEvent.AsObject; + static toObject(includeInstance: boolean, msg: ResourceCreateEvent): ResourceCreateEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceCreateEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceCreateEvent; + static deserializeBinaryFromReader(message: ResourceCreateEvent, reader: jspb.BinaryReader): ResourceCreateEvent; +} + +export namespace ResourceCreateEvent { + export type AsObject = { + resourceType: string, + } +} + +export class SessionStartEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): SessionStartEvent; + + getSessionType(): string; + setSessionType(value: string): SessionStartEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SessionStartEvent.AsObject; + static toObject(includeInstance: boolean, msg: SessionStartEvent): SessionStartEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SessionStartEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SessionStartEvent; + static deserializeBinaryFromReader(message: SessionStartEvent, reader: jspb.BinaryReader): SessionStartEvent; +} + +export namespace SessionStartEvent { + export type AsObject = { + userName: string, + sessionType: string, + } +} + +export class UIBannerClickEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIBannerClickEvent; + + getAlert(): string; + setAlert(value: string): UIBannerClickEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIBannerClickEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIBannerClickEvent): UIBannerClickEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIBannerClickEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIBannerClickEvent; + static deserializeBinaryFromReader(message: UIBannerClickEvent, reader: jspb.BinaryReader): UIBannerClickEvent; +} + +export namespace UIBannerClickEvent { + export type AsObject = { + userName: string, + alert: string, + } +} + +export class UIOnboardGetStartedClickEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIOnboardGetStartedClickEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIOnboardGetStartedClickEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIOnboardGetStartedClickEvent): UIOnboardGetStartedClickEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIOnboardGetStartedClickEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIOnboardGetStartedClickEvent; + static deserializeBinaryFromReader(message: UIOnboardGetStartedClickEvent, reader: jspb.BinaryReader): UIOnboardGetStartedClickEvent; +} + +export namespace UIOnboardGetStartedClickEvent { + export type AsObject = { + userName: string, + } +} + +export class UIOnboardCompleteGoToDashboardClickEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIOnboardCompleteGoToDashboardClickEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIOnboardCompleteGoToDashboardClickEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIOnboardCompleteGoToDashboardClickEvent): UIOnboardCompleteGoToDashboardClickEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIOnboardCompleteGoToDashboardClickEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIOnboardCompleteGoToDashboardClickEvent; + static deserializeBinaryFromReader(message: UIOnboardCompleteGoToDashboardClickEvent, reader: jspb.BinaryReader): UIOnboardCompleteGoToDashboardClickEvent; +} + +export namespace UIOnboardCompleteGoToDashboardClickEvent { + export type AsObject = { + userName: string, + } +} + +export class UIOnboardAddFirstResourceClickEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIOnboardAddFirstResourceClickEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIOnboardAddFirstResourceClickEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIOnboardAddFirstResourceClickEvent): UIOnboardAddFirstResourceClickEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIOnboardAddFirstResourceClickEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIOnboardAddFirstResourceClickEvent; + static deserializeBinaryFromReader(message: UIOnboardAddFirstResourceClickEvent, reader: jspb.BinaryReader): UIOnboardAddFirstResourceClickEvent; +} + +export namespace UIOnboardAddFirstResourceClickEvent { + export type AsObject = { + userName: string, + } +} + +export class UIOnboardAddFirstResourceLaterClickEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIOnboardAddFirstResourceLaterClickEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIOnboardAddFirstResourceLaterClickEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIOnboardAddFirstResourceLaterClickEvent): UIOnboardAddFirstResourceLaterClickEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIOnboardAddFirstResourceLaterClickEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIOnboardAddFirstResourceLaterClickEvent; + static deserializeBinaryFromReader(message: UIOnboardAddFirstResourceLaterClickEvent, reader: jspb.BinaryReader): UIOnboardAddFirstResourceLaterClickEvent; +} + +export namespace UIOnboardAddFirstResourceLaterClickEvent { + export type AsObject = { + userName: string, + } +} + +export class UIOnboardSetCredentialSubmitEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIOnboardSetCredentialSubmitEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIOnboardSetCredentialSubmitEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIOnboardSetCredentialSubmitEvent): UIOnboardSetCredentialSubmitEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIOnboardSetCredentialSubmitEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIOnboardSetCredentialSubmitEvent; + static deserializeBinaryFromReader(message: UIOnboardSetCredentialSubmitEvent, reader: jspb.BinaryReader): UIOnboardSetCredentialSubmitEvent; +} + +export namespace UIOnboardSetCredentialSubmitEvent { + export type AsObject = { + userName: string, + } +} + +export class UIOnboardRegisterChallengeSubmitEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIOnboardRegisterChallengeSubmitEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIOnboardRegisterChallengeSubmitEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIOnboardRegisterChallengeSubmitEvent): UIOnboardRegisterChallengeSubmitEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIOnboardRegisterChallengeSubmitEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIOnboardRegisterChallengeSubmitEvent; + static deserializeBinaryFromReader(message: UIOnboardRegisterChallengeSubmitEvent, reader: jspb.BinaryReader): UIOnboardRegisterChallengeSubmitEvent; +} + +export namespace UIOnboardRegisterChallengeSubmitEvent { + export type AsObject = { + userName: string, + } +} + +export class UIRecoveryCodesContinueClickEvent extends jspb.Message { + getUserName(): string; + setUserName(value: string): UIRecoveryCodesContinueClickEvent; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UIRecoveryCodesContinueClickEvent.AsObject; + static toObject(includeInstance: boolean, msg: UIRecoveryCodesContinueClickEvent): UIRecoveryCodesContinueClickEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UIRecoveryCodesContinueClickEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UIRecoveryCodesContinueClickEvent; + static deserializeBinaryFromReader(message: UIRecoveryCodesContinueClickEvent, reader: jspb.BinaryReader): UIRecoveryCodesContinueClickEvent; +} + +export namespace UIRecoveryCodesContinueClickEvent { + export type AsObject = { + userName: string, + } +} + +export class SubmitEventRequest extends jspb.Message { + getClusterName(): string; + setClusterName(value: string): SubmitEventRequest; + + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): SubmitEventRequest; + + + hasUserLogin(): boolean; + clearUserLogin(): void; + getUserLogin(): UserLoginEvent | undefined; + setUserLogin(value?: UserLoginEvent): SubmitEventRequest; + + + hasSsoCreate(): boolean; + clearSsoCreate(): void; + getSsoCreate(): SSOCreateEvent | undefined; + setSsoCreate(value?: SSOCreateEvent): SubmitEventRequest; + + + hasResourceCreate(): boolean; + clearResourceCreate(): void; + getResourceCreate(): ResourceCreateEvent | undefined; + setResourceCreate(value?: ResourceCreateEvent): SubmitEventRequest; + + + hasSessionStart(): boolean; + clearSessionStart(): void; + getSessionStart(): SessionStartEvent | undefined; + setSessionStart(value?: SessionStartEvent): SubmitEventRequest; + + + hasUiBannerClick(): boolean; + clearUiBannerClick(): void; + getUiBannerClick(): UIBannerClickEvent | undefined; + setUiBannerClick(value?: UIBannerClickEvent): SubmitEventRequest; + + + hasUiOnboardGetStartedClick(): boolean; + clearUiOnboardGetStartedClick(): void; + getUiOnboardGetStartedClick(): UIOnboardGetStartedClickEvent | undefined; + setUiOnboardGetStartedClick(value?: UIOnboardGetStartedClickEvent): SubmitEventRequest; + + + hasUiOnboardCompleteGoToDashboardClick(): boolean; + clearUiOnboardCompleteGoToDashboardClick(): void; + getUiOnboardCompleteGoToDashboardClick(): UIOnboardCompleteGoToDashboardClickEvent | undefined; + setUiOnboardCompleteGoToDashboardClick(value?: UIOnboardCompleteGoToDashboardClickEvent): SubmitEventRequest; + + + hasUiOnboardAddFirstResourceClick(): boolean; + clearUiOnboardAddFirstResourceClick(): void; + getUiOnboardAddFirstResourceClick(): UIOnboardAddFirstResourceClickEvent | undefined; + setUiOnboardAddFirstResourceClick(value?: UIOnboardAddFirstResourceClickEvent): SubmitEventRequest; + + + hasUiOnboardAddFirstResourceLaterClick(): boolean; + clearUiOnboardAddFirstResourceLaterClick(): void; + getUiOnboardAddFirstResourceLaterClick(): UIOnboardAddFirstResourceLaterClickEvent | undefined; + setUiOnboardAddFirstResourceLaterClick(value?: UIOnboardAddFirstResourceLaterClickEvent): SubmitEventRequest; + + + hasUiOnboardSetCredentialSubmit(): boolean; + clearUiOnboardSetCredentialSubmit(): void; + getUiOnboardSetCredentialSubmit(): UIOnboardSetCredentialSubmitEvent | undefined; + setUiOnboardSetCredentialSubmit(value?: UIOnboardSetCredentialSubmitEvent): SubmitEventRequest; + + + hasUiOnboardRegisterChallengeSubmit(): boolean; + clearUiOnboardRegisterChallengeSubmit(): void; + getUiOnboardRegisterChallengeSubmit(): UIOnboardRegisterChallengeSubmitEvent | undefined; + setUiOnboardRegisterChallengeSubmit(value?: UIOnboardRegisterChallengeSubmitEvent): SubmitEventRequest; + + + hasUiRecoveryCodesContinueClick(): boolean; + clearUiRecoveryCodesContinueClick(): void; + getUiRecoveryCodesContinueClick(): UIRecoveryCodesContinueClickEvent | undefined; + setUiRecoveryCodesContinueClick(value?: UIRecoveryCodesContinueClickEvent): SubmitEventRequest; + + + getEventCase(): SubmitEventRequest.EventCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubmitEventRequest.AsObject; + static toObject(includeInstance: boolean, msg: SubmitEventRequest): SubmitEventRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubmitEventRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubmitEventRequest; + static deserializeBinaryFromReader(message: SubmitEventRequest, reader: jspb.BinaryReader): SubmitEventRequest; +} + +export namespace SubmitEventRequest { + export type AsObject = { + clusterName: string, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + userLogin?: UserLoginEvent.AsObject, + ssoCreate?: SSOCreateEvent.AsObject, + resourceCreate?: ResourceCreateEvent.AsObject, + sessionStart?: SessionStartEvent.AsObject, + uiBannerClick?: UIBannerClickEvent.AsObject, + uiOnboardGetStartedClick?: UIOnboardGetStartedClickEvent.AsObject, + uiOnboardCompleteGoToDashboardClick?: UIOnboardCompleteGoToDashboardClickEvent.AsObject, + uiOnboardAddFirstResourceClick?: UIOnboardAddFirstResourceClickEvent.AsObject, + uiOnboardAddFirstResourceLaterClick?: UIOnboardAddFirstResourceLaterClickEvent.AsObject, + uiOnboardSetCredentialSubmit?: UIOnboardSetCredentialSubmitEvent.AsObject, + uiOnboardRegisterChallengeSubmit?: UIOnboardRegisterChallengeSubmitEvent.AsObject, + uiRecoveryCodesContinueClick?: UIRecoveryCodesContinueClickEvent.AsObject, + } + + export enum EventCase { + EVENT_NOT_SET = 0, + + USER_LOGIN = 3, + + SSO_CREATE = 4, + + RESOURCE_CREATE = 5, + + SESSION_START = 6, + + UI_BANNER_CLICK = 7, + + UI_ONBOARD_GET_STARTED_CLICK = 8, + + UI_ONBOARD_COMPLETE_GO_TO_DASHBOARD_CLICK = 9, + + UI_ONBOARD_ADD_FIRST_RESOURCE_CLICK = 10, + + UI_ONBOARD_ADD_FIRST_RESOURCE_LATER_CLICK = 11, + + UI_ONBOARD_SET_CREDENTIAL_SUBMIT = 12, + + UI_ONBOARD_REGISTER_CHALLENGE_SUBMIT = 13, + + UI_RECOVERY_CODES_CONTINUE_CLICK = 14, + + } + +} + +export class SubmitEventResponse extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubmitEventResponse.AsObject; + static toObject(includeInstance: boolean, msg: SubmitEventResponse): SubmitEventResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubmitEventResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubmitEventResponse; + static deserializeBinaryFromReader(message: SubmitEventResponse, reader: jspb.BinaryReader): SubmitEventResponse; +} + +export namespace SubmitEventResponse { + export type AsObject = { + } +} diff --git a/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.js b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.js new file mode 100644 index 000000000..c750fb101 --- /dev/null +++ b/packages/teleterm/src/services/tshd/prehog/v1alpha/teleport_pb.js @@ -0,0 +1,2909 @@ +// source: prehog/v1alpha/teleport.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.prehog.v1alpha.ResourceCreateEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SSOCreateEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SessionStartEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SubmitEventRequest', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SubmitEventRequest.EventCase', null, global); +goog.exportSymbol('proto.prehog.v1alpha.SubmitEventResponse', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIBannerClickEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIOnboardGetStartedClickEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent', null, global); +goog.exportSymbol('proto.prehog.v1alpha.UserLoginEvent', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UserLoginEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UserLoginEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UserLoginEvent.displayName = 'proto.prehog.v1alpha.UserLoginEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.SSOCreateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.SSOCreateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.SSOCreateEvent.displayName = 'proto.prehog.v1alpha.SSOCreateEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.ResourceCreateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.ResourceCreateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.ResourceCreateEvent.displayName = 'proto.prehog.v1alpha.ResourceCreateEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.SessionStartEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.SessionStartEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.SessionStartEvent.displayName = 'proto.prehog.v1alpha.SessionStartEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIBannerClickEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIBannerClickEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIBannerClickEvent.displayName = 'proto.prehog.v1alpha.UIBannerClickEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIOnboardGetStartedClickEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.displayName = 'proto.prehog.v1alpha.UIOnboardGetStartedClickEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.displayName = 'proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.displayName = 'proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.displayName = 'proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.displayName = 'proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.displayName = 'proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.displayName = 'proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.SubmitEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_); +}; +goog.inherits(proto.prehog.v1alpha.SubmitEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.SubmitEventRequest.displayName = 'proto.prehog.v1alpha.SubmitEventRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.prehog.v1alpha.SubmitEventResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.prehog.v1alpha.SubmitEventResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.prehog.v1alpha.SubmitEventResponse.displayName = 'proto.prehog.v1alpha.SubmitEventResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UserLoginEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UserLoginEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UserLoginEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UserLoginEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, ""), + connectorType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UserLoginEvent} + */ +proto.prehog.v1alpha.UserLoginEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UserLoginEvent; + return proto.prehog.v1alpha.UserLoginEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UserLoginEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UserLoginEvent} + */ +proto.prehog.v1alpha.UserLoginEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectorType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UserLoginEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UserLoginEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UserLoginEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UserLoginEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConnectorType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UserLoginEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UserLoginEvent} returns this + */ +proto.prehog.v1alpha.UserLoginEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string connector_type = 2; + * @return {string} + */ +proto.prehog.v1alpha.UserLoginEvent.prototype.getConnectorType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UserLoginEvent} returns this + */ +proto.prehog.v1alpha.UserLoginEvent.prototype.setConnectorType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.SSOCreateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.SSOCreateEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.SSOCreateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SSOCreateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + connectorType: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.SSOCreateEvent} + */ +proto.prehog.v1alpha.SSOCreateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.SSOCreateEvent; + return proto.prehog.v1alpha.SSOCreateEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.SSOCreateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.SSOCreateEvent} + */ +proto.prehog.v1alpha.SSOCreateEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setConnectorType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.SSOCreateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.SSOCreateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.SSOCreateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SSOCreateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectorType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string connector_type = 1; + * @return {string} + */ +proto.prehog.v1alpha.SSOCreateEvent.prototype.getConnectorType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.SSOCreateEvent} returns this + */ +proto.prehog.v1alpha.SSOCreateEvent.prototype.setConnectorType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.ResourceCreateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.ResourceCreateEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.ResourceCreateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ResourceCreateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + resourceType: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.ResourceCreateEvent} + */ +proto.prehog.v1alpha.ResourceCreateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.ResourceCreateEvent; + return proto.prehog.v1alpha.ResourceCreateEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.ResourceCreateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.ResourceCreateEvent} + */ +proto.prehog.v1alpha.ResourceCreateEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.ResourceCreateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.ResourceCreateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.ResourceCreateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.ResourceCreateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourceType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string resource_type = 1; + * @return {string} + */ +proto.prehog.v1alpha.ResourceCreateEvent.prototype.getResourceType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.ResourceCreateEvent} returns this + */ +proto.prehog.v1alpha.ResourceCreateEvent.prototype.setResourceType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.SessionStartEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.SessionStartEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.SessionStartEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SessionStartEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, ""), + sessionType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.SessionStartEvent} + */ +proto.prehog.v1alpha.SessionStartEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.SessionStartEvent; + return proto.prehog.v1alpha.SessionStartEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.SessionStartEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.SessionStartEvent} + */ +proto.prehog.v1alpha.SessionStartEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.SessionStartEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.SessionStartEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.SessionStartEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SessionStartEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSessionType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.SessionStartEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.SessionStartEvent} returns this + */ +proto.prehog.v1alpha.SessionStartEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string session_type = 2; + * @return {string} + */ +proto.prehog.v1alpha.SessionStartEvent.prototype.getSessionType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.SessionStartEvent} returns this + */ +proto.prehog.v1alpha.SessionStartEvent.prototype.setSessionType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIBannerClickEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIBannerClickEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIBannerClickEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIBannerClickEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, ""), + alert: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIBannerClickEvent} + */ +proto.prehog.v1alpha.UIBannerClickEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIBannerClickEvent; + return proto.prehog.v1alpha.UIBannerClickEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIBannerClickEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIBannerClickEvent} + */ +proto.prehog.v1alpha.UIBannerClickEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAlert(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIBannerClickEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIBannerClickEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIBannerClickEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIBannerClickEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAlert(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIBannerClickEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIBannerClickEvent} returns this + */ +proto.prehog.v1alpha.UIBannerClickEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string alert = 2; + * @return {string} + */ +proto.prehog.v1alpha.UIBannerClickEvent.prototype.getAlert = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIBannerClickEvent} returns this + */ +proto.prehog.v1alpha.UIBannerClickEvent.prototype.setAlert = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIOnboardGetStartedClickEvent; + return proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} returns this + */ +proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent; + return proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} returns this + */ +proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent; + return proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} returns this + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent; + return proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} returns this + */ +proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent; + return proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} returns this + */ +proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent; + return proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} returns this + */ +proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.toObject = function(includeInstance, msg) { + var f, obj = { + userName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent; + return proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string user_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} returns this + */ +proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.prototype.setUserName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_ = [[3,4,5,6,7,8,9,10,11,12,13,14]]; + +/** + * @enum {number} + */ +proto.prehog.v1alpha.SubmitEventRequest.EventCase = { + EVENT_NOT_SET: 0, + USER_LOGIN: 3, + SSO_CREATE: 4, + RESOURCE_CREATE: 5, + SESSION_START: 6, + UI_BANNER_CLICK: 7, + UI_ONBOARD_GET_STARTED_CLICK: 8, + UI_ONBOARD_COMPLETE_GO_TO_DASHBOARD_CLICK: 9, + UI_ONBOARD_ADD_FIRST_RESOURCE_CLICK: 10, + UI_ONBOARD_ADD_FIRST_RESOURCE_LATER_CLICK: 11, + UI_ONBOARD_SET_CREDENTIAL_SUBMIT: 12, + UI_ONBOARD_REGISTER_CHALLENGE_SUBMIT: 13, + UI_RECOVERY_CODES_CONTINUE_CLICK: 14 +}; + +/** + * @return {proto.prehog.v1alpha.SubmitEventRequest.EventCase} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getEventCase = function() { + return /** @type {proto.prehog.v1alpha.SubmitEventRequest.EventCase} */(jspb.Message.computeOneofCase(this, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.SubmitEventRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.SubmitEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clusterName: jspb.Message.getFieldWithDefault(msg, 1, ""), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + userLogin: (f = msg.getUserLogin()) && proto.prehog.v1alpha.UserLoginEvent.toObject(includeInstance, f), + ssoCreate: (f = msg.getSsoCreate()) && proto.prehog.v1alpha.SSOCreateEvent.toObject(includeInstance, f), + resourceCreate: (f = msg.getResourceCreate()) && proto.prehog.v1alpha.ResourceCreateEvent.toObject(includeInstance, f), + sessionStart: (f = msg.getSessionStart()) && proto.prehog.v1alpha.SessionStartEvent.toObject(includeInstance, f), + uiBannerClick: (f = msg.getUiBannerClick()) && proto.prehog.v1alpha.UIBannerClickEvent.toObject(includeInstance, f), + uiOnboardGetStartedClick: (f = msg.getUiOnboardGetStartedClick()) && proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.toObject(includeInstance, f), + uiOnboardCompleteGoToDashboardClick: (f = msg.getUiOnboardCompleteGoToDashboardClick()) && proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.toObject(includeInstance, f), + uiOnboardAddFirstResourceClick: (f = msg.getUiOnboardAddFirstResourceClick()) && proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.toObject(includeInstance, f), + uiOnboardAddFirstResourceLaterClick: (f = msg.getUiOnboardAddFirstResourceLaterClick()) && proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.toObject(includeInstance, f), + uiOnboardSetCredentialSubmit: (f = msg.getUiOnboardSetCredentialSubmit()) && proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.toObject(includeInstance, f), + uiOnboardRegisterChallengeSubmit: (f = msg.getUiOnboardRegisterChallengeSubmit()) && proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.toObject(includeInstance, f), + uiRecoveryCodesContinueClick: (f = msg.getUiRecoveryCodesContinueClick()) && proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} + */ +proto.prehog.v1alpha.SubmitEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.SubmitEventRequest; + return proto.prehog.v1alpha.SubmitEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.SubmitEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} + */ +proto.prehog.v1alpha.SubmitEventRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClusterName(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 3: + var value = new proto.prehog.v1alpha.UserLoginEvent; + reader.readMessage(value,proto.prehog.v1alpha.UserLoginEvent.deserializeBinaryFromReader); + msg.setUserLogin(value); + break; + case 4: + var value = new proto.prehog.v1alpha.SSOCreateEvent; + reader.readMessage(value,proto.prehog.v1alpha.SSOCreateEvent.deserializeBinaryFromReader); + msg.setSsoCreate(value); + break; + case 5: + var value = new proto.prehog.v1alpha.ResourceCreateEvent; + reader.readMessage(value,proto.prehog.v1alpha.ResourceCreateEvent.deserializeBinaryFromReader); + msg.setResourceCreate(value); + break; + case 6: + var value = new proto.prehog.v1alpha.SessionStartEvent; + reader.readMessage(value,proto.prehog.v1alpha.SessionStartEvent.deserializeBinaryFromReader); + msg.setSessionStart(value); + break; + case 7: + var value = new proto.prehog.v1alpha.UIBannerClickEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIBannerClickEvent.deserializeBinaryFromReader); + msg.setUiBannerClick(value); + break; + case 8: + var value = new proto.prehog.v1alpha.UIOnboardGetStartedClickEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.deserializeBinaryFromReader); + msg.setUiOnboardGetStartedClick(value); + break; + case 9: + var value = new proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.deserializeBinaryFromReader); + msg.setUiOnboardCompleteGoToDashboardClick(value); + break; + case 10: + var value = new proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.deserializeBinaryFromReader); + msg.setUiOnboardAddFirstResourceClick(value); + break; + case 11: + var value = new proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.deserializeBinaryFromReader); + msg.setUiOnboardAddFirstResourceLaterClick(value); + break; + case 12: + var value = new proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.deserializeBinaryFromReader); + msg.setUiOnboardSetCredentialSubmit(value); + break; + case 13: + var value = new proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.deserializeBinaryFromReader); + msg.setUiOnboardRegisterChallengeSubmit(value); + break; + case 14: + var value = new proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent; + reader.readMessage(value,proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.deserializeBinaryFromReader); + msg.setUiRecoveryCodesContinueClick(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.SubmitEventRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.SubmitEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClusterName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUserLogin(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.prehog.v1alpha.UserLoginEvent.serializeBinaryToWriter + ); + } + f = message.getSsoCreate(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.prehog.v1alpha.SSOCreateEvent.serializeBinaryToWriter + ); + } + f = message.getResourceCreate(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.prehog.v1alpha.ResourceCreateEvent.serializeBinaryToWriter + ); + } + f = message.getSessionStart(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.prehog.v1alpha.SessionStartEvent.serializeBinaryToWriter + ); + } + f = message.getUiBannerClick(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.prehog.v1alpha.UIBannerClickEvent.serializeBinaryToWriter + ); + } + f = message.getUiOnboardGetStartedClick(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.prehog.v1alpha.UIOnboardGetStartedClickEvent.serializeBinaryToWriter + ); + } + f = message.getUiOnboardCompleteGoToDashboardClick(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent.serializeBinaryToWriter + ); + } + f = message.getUiOnboardAddFirstResourceClick(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent.serializeBinaryToWriter + ); + } + f = message.getUiOnboardAddFirstResourceLaterClick(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent.serializeBinaryToWriter + ); + } + f = message.getUiOnboardSetCredentialSubmit(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent.serializeBinaryToWriter + ); + } + f = message.getUiOnboardRegisterChallengeSubmit(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent.serializeBinaryToWriter + ); + } + f = message.getUiRecoveryCodesContinueClick(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string cluster_name = 1; + * @return {string} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getClusterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setClusterName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional UserLoginEvent user_login = 3; + * @return {?proto.prehog.v1alpha.UserLoginEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUserLogin = function() { + return /** @type{?proto.prehog.v1alpha.UserLoginEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UserLoginEvent, 3)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UserLoginEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUserLogin = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUserLogin = function() { + return this.setUserLogin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUserLogin = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional SSOCreateEvent sso_create = 4; + * @return {?proto.prehog.v1alpha.SSOCreateEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getSsoCreate = function() { + return /** @type{?proto.prehog.v1alpha.SSOCreateEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.SSOCreateEvent, 4)); +}; + + +/** + * @param {?proto.prehog.v1alpha.SSOCreateEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setSsoCreate = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearSsoCreate = function() { + return this.setSsoCreate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasSsoCreate = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ResourceCreateEvent resource_create = 5; + * @return {?proto.prehog.v1alpha.ResourceCreateEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getResourceCreate = function() { + return /** @type{?proto.prehog.v1alpha.ResourceCreateEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.ResourceCreateEvent, 5)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ResourceCreateEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setResourceCreate = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearResourceCreate = function() { + return this.setResourceCreate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasResourceCreate = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional SessionStartEvent session_start = 6; + * @return {?proto.prehog.v1alpha.SessionStartEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getSessionStart = function() { + return /** @type{?proto.prehog.v1alpha.SessionStartEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.SessionStartEvent, 6)); +}; + + +/** + * @param {?proto.prehog.v1alpha.SessionStartEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setSessionStart = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearSessionStart = function() { + return this.setSessionStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasSessionStart = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional UIBannerClickEvent ui_banner_click = 7; + * @return {?proto.prehog.v1alpha.UIBannerClickEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiBannerClick = function() { + return /** @type{?proto.prehog.v1alpha.UIBannerClickEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIBannerClickEvent, 7)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIBannerClickEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiBannerClick = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiBannerClick = function() { + return this.setUiBannerClick(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiBannerClick = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional UIOnboardGetStartedClickEvent ui_onboard_get_started_click = 8; + * @return {?proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiOnboardGetStartedClick = function() { + return /** @type{?proto.prehog.v1alpha.UIOnboardGetStartedClickEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIOnboardGetStartedClickEvent, 8)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIOnboardGetStartedClickEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiOnboardGetStartedClick = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiOnboardGetStartedClick = function() { + return this.setUiOnboardGetStartedClick(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiOnboardGetStartedClick = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional UIOnboardCompleteGoToDashboardClickEvent ui_onboard_complete_go_to_dashboard_click = 9; + * @return {?proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiOnboardCompleteGoToDashboardClick = function() { + return /** @type{?proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent, 9)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIOnboardCompleteGoToDashboardClickEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiOnboardCompleteGoToDashboardClick = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiOnboardCompleteGoToDashboardClick = function() { + return this.setUiOnboardCompleteGoToDashboardClick(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiOnboardCompleteGoToDashboardClick = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional UIOnboardAddFirstResourceClickEvent ui_onboard_add_first_resource_click = 10; + * @return {?proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiOnboardAddFirstResourceClick = function() { + return /** @type{?proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent, 10)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIOnboardAddFirstResourceClickEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiOnboardAddFirstResourceClick = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiOnboardAddFirstResourceClick = function() { + return this.setUiOnboardAddFirstResourceClick(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiOnboardAddFirstResourceClick = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional UIOnboardAddFirstResourceLaterClickEvent ui_onboard_add_first_resource_later_click = 11; + * @return {?proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiOnboardAddFirstResourceLaterClick = function() { + return /** @type{?proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent, 11)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIOnboardAddFirstResourceLaterClickEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiOnboardAddFirstResourceLaterClick = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiOnboardAddFirstResourceLaterClick = function() { + return this.setUiOnboardAddFirstResourceLaterClick(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiOnboardAddFirstResourceLaterClick = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional UIOnboardSetCredentialSubmitEvent ui_onboard_set_credential_submit = 12; + * @return {?proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiOnboardSetCredentialSubmit = function() { + return /** @type{?proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent, 12)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIOnboardSetCredentialSubmitEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiOnboardSetCredentialSubmit = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiOnboardSetCredentialSubmit = function() { + return this.setUiOnboardSetCredentialSubmit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiOnboardSetCredentialSubmit = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional UIOnboardRegisterChallengeSubmitEvent ui_onboard_register_challenge_submit = 13; + * @return {?proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiOnboardRegisterChallengeSubmit = function() { + return /** @type{?proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent, 13)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIOnboardRegisterChallengeSubmitEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiOnboardRegisterChallengeSubmit = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiOnboardRegisterChallengeSubmit = function() { + return this.setUiOnboardRegisterChallengeSubmit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiOnboardRegisterChallengeSubmit = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional UIRecoveryCodesContinueClickEvent ui_recovery_codes_continue_click = 14; + * @return {?proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.getUiRecoveryCodesContinueClick = function() { + return /** @type{?proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent} */ ( + jspb.Message.getWrapperField(this, proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent, 14)); +}; + + +/** + * @param {?proto.prehog.v1alpha.UIRecoveryCodesContinueClickEvent|undefined} value + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this +*/ +proto.prehog.v1alpha.SubmitEventRequest.prototype.setUiRecoveryCodesContinueClick = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.prehog.v1alpha.SubmitEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.prehog.v1alpha.SubmitEventRequest} returns this + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.clearUiRecoveryCodesContinueClick = function() { + return this.setUiRecoveryCodesContinueClick(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.prehog.v1alpha.SubmitEventRequest.prototype.hasUiRecoveryCodesContinueClick = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.prehog.v1alpha.SubmitEventResponse.prototype.toObject = function(opt_includeInstance) { + return proto.prehog.v1alpha.SubmitEventResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.prehog.v1alpha.SubmitEventResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitEventResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.prehog.v1alpha.SubmitEventResponse} + */ +proto.prehog.v1alpha.SubmitEventResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.prehog.v1alpha.SubmitEventResponse; + return proto.prehog.v1alpha.SubmitEventResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.prehog.v1alpha.SubmitEventResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.prehog.v1alpha.SubmitEventResponse} + */ +proto.prehog.v1alpha.SubmitEventResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.prehog.v1alpha.SubmitEventResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.prehog.v1alpha.SubmitEventResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.prehog.v1alpha.SubmitEventResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.prehog.v1alpha.SubmitEventResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.prehog.v1alpha); diff --git a/packages/teleterm/src/services/tshd/types.ts b/packages/teleterm/src/services/tshd/types.ts index d22b8fb94..541cc4b47 100644 --- a/packages/teleterm/src/services/tshd/types.ts +++ b/packages/teleterm/src/services/tshd/types.ts @@ -56,6 +56,12 @@ export type ReportEventRequest = Modify< apiUsageEvents.ReportEventRequest.AsObject, { timestamp: Date } >; + +export type UsageEvent = Omit< + apiUsageEvents.ReportEventRequest.AsObject, + 'timestamp' | 'distinctId' | 'authClusterId' +>; + // Available types are listed here: // https://github.com/gravitational/teleport/blob/v9.0.3/lib/defaults/defaults.go#L513-L530 // diff --git a/packages/teleterm/src/services/tshd/v1/access_request_pb.d.ts b/packages/teleterm/src/services/tshd/v1/access_request_pb.d.ts index 882e156fe..62f41b53e 100644 --- a/packages/teleterm/src/services/tshd/v1/access_request_pb.d.ts +++ b/packages/teleterm/src/services/tshd/v1/access_request_pb.d.ts @@ -60,6 +60,11 @@ export class AccessRequest extends jspb.Message { setResourceIdsList(value: Array): AccessRequest; addResourceIds(value?: ResourceID, index?: number): ResourceID; + clearResourcesList(): void; + getResourcesList(): Array; + setResourcesList(value: Array): AccessRequest; + addResources(value?: Resource, index?: number): Resource; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AccessRequest.AsObject; @@ -85,6 +90,7 @@ export namespace AccessRequest { suggestedReviewersList: Array, thresholdNamesList: Array, resourceIdsList: Array, + resourcesList: Array, } } @@ -158,3 +164,55 @@ export namespace ResourceID { clusterName: string, } } + +export class ResourceDetails extends jspb.Message { + getHostname(): string; + setHostname(value: string): ResourceDetails; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceDetails.AsObject; + static toObject(includeInstance: boolean, msg: ResourceDetails): ResourceDetails.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceDetails, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceDetails; + static deserializeBinaryFromReader(message: ResourceDetails, reader: jspb.BinaryReader): ResourceDetails; +} + +export namespace ResourceDetails { + export type AsObject = { + hostname: string, + } +} + +export class Resource extends jspb.Message { + + hasId(): boolean; + clearId(): void; + getId(): ResourceID | undefined; + setId(value?: ResourceID): Resource; + + + hasDetails(): boolean; + clearDetails(): void; + getDetails(): ResourceDetails | undefined; + setDetails(value?: ResourceDetails): Resource; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Resource.AsObject; + static toObject(includeInstance: boolean, msg: Resource): Resource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Resource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Resource; + static deserializeBinaryFromReader(message: Resource, reader: jspb.BinaryReader): Resource; +} + +export namespace Resource { + export type AsObject = { + id?: ResourceID.AsObject, + details?: ResourceDetails.AsObject, + } +} diff --git a/packages/teleterm/src/services/tshd/v1/access_request_pb.js b/packages/teleterm/src/services/tshd/v1/access_request_pb.js index 79c864f9e..91ddf1ff7 100644 --- a/packages/teleterm/src/services/tshd/v1/access_request_pb.js +++ b/packages/teleterm/src/services/tshd/v1/access_request_pb.js @@ -19,6 +19,8 @@ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/time goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.teleport.terminal.v1.AccessRequest', null, global); goog.exportSymbol('proto.teleport.terminal.v1.AccessRequestReview', null, global); +goog.exportSymbol('proto.teleport.terminal.v1.Resource', null, global); +goog.exportSymbol('proto.teleport.terminal.v1.ResourceDetails', null, global); goog.exportSymbol('proto.teleport.terminal.v1.ResourceID', null, global); /** * Generated by JsPbCodeGenerator. @@ -83,13 +85,55 @@ if (goog.DEBUG && !COMPILED) { */ proto.teleport.terminal.v1.ResourceID.displayName = 'proto.teleport.terminal.v1.ResourceID'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.teleport.terminal.v1.ResourceDetails = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.teleport.terminal.v1.ResourceDetails, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.teleport.terminal.v1.ResourceDetails.displayName = 'proto.teleport.terminal.v1.ResourceDetails'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.teleport.terminal.v1.Resource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.teleport.terminal.v1.Resource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.teleport.terminal.v1.Resource.displayName = 'proto.teleport.terminal.v1.Resource'; +} /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.teleport.terminal.v1.AccessRequest.repeatedFields_ = [6,9,10,11,12]; +proto.teleport.terminal.v1.AccessRequest.repeatedFields_ = [6,9,10,11,12,13]; @@ -135,7 +179,9 @@ proto.teleport.terminal.v1.AccessRequest.toObject = function(includeInstance, ms suggestedReviewersList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, thresholdNamesList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, resourceIdsList: jspb.Message.toObjectList(msg.getResourceIdsList(), - proto.teleport.terminal.v1.ResourceID.toObject, includeInstance) + proto.teleport.terminal.v1.ResourceID.toObject, includeInstance), + resourcesList: jspb.Message.toObjectList(msg.getResourcesList(), + proto.teleport.terminal.v1.Resource.toObject, includeInstance) }; if (includeInstance) { @@ -224,6 +270,11 @@ proto.teleport.terminal.v1.AccessRequest.deserializeBinaryFromReader = function( reader.readMessage(value,proto.teleport.terminal.v1.ResourceID.deserializeBinaryFromReader); msg.addResourceIds(value); break; + case 13: + var value = new proto.teleport.terminal.v1.Resource; + reader.readMessage(value,proto.teleport.terminal.v1.Resource.deserializeBinaryFromReader); + msg.addResources(value); + break; default: reader.skipField(); break; @@ -341,6 +392,14 @@ proto.teleport.terminal.v1.AccessRequest.serializeBinaryToWriter = function(mess proto.teleport.terminal.v1.ResourceID.serializeBinaryToWriter ); } + f = message.getResourcesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + proto.teleport.terminal.v1.Resource.serializeBinaryToWriter + ); + } }; @@ -695,6 +754,44 @@ proto.teleport.terminal.v1.AccessRequest.prototype.clearResourceIdsList = functi }; +/** + * repeated Resource resources = 13; + * @return {!Array} + */ +proto.teleport.terminal.v1.AccessRequest.prototype.getResourcesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.teleport.terminal.v1.Resource, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.teleport.terminal.v1.AccessRequest} returns this +*/ +proto.teleport.terminal.v1.AccessRequest.prototype.setResourcesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.teleport.terminal.v1.Resource=} opt_value + * @param {number=} opt_index + * @return {!proto.teleport.terminal.v1.Resource} + */ +proto.teleport.terminal.v1.AccessRequest.prototype.addResources = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.teleport.terminal.v1.Resource, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.teleport.terminal.v1.AccessRequest} returns this + */ +proto.teleport.terminal.v1.AccessRequest.prototype.clearResourcesList = function() { + return this.setResourcesList([]); +}; + + /** * List of repeated fields within this message type. @@ -1182,4 +1279,336 @@ proto.teleport.terminal.v1.ResourceID.prototype.setClusterName = function(value) }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.teleport.terminal.v1.ResourceDetails.prototype.toObject = function(opt_includeInstance) { + return proto.teleport.terminal.v1.ResourceDetails.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.teleport.terminal.v1.ResourceDetails} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.teleport.terminal.v1.ResourceDetails.toObject = function(includeInstance, msg) { + var f, obj = { + hostname: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.teleport.terminal.v1.ResourceDetails} + */ +proto.teleport.terminal.v1.ResourceDetails.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.teleport.terminal.v1.ResourceDetails; + return proto.teleport.terminal.v1.ResourceDetails.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.teleport.terminal.v1.ResourceDetails} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.teleport.terminal.v1.ResourceDetails} + */ +proto.teleport.terminal.v1.ResourceDetails.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHostname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.teleport.terminal.v1.ResourceDetails.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.teleport.terminal.v1.ResourceDetails.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.teleport.terminal.v1.ResourceDetails} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.teleport.terminal.v1.ResourceDetails.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHostname(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string hostname = 1; + * @return {string} + */ +proto.teleport.terminal.v1.ResourceDetails.prototype.getHostname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.teleport.terminal.v1.ResourceDetails} returns this + */ +proto.teleport.terminal.v1.ResourceDetails.prototype.setHostname = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.teleport.terminal.v1.Resource.prototype.toObject = function(opt_includeInstance) { + return proto.teleport.terminal.v1.Resource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.teleport.terminal.v1.Resource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.teleport.terminal.v1.Resource.toObject = function(includeInstance, msg) { + var f, obj = { + id: (f = msg.getId()) && proto.teleport.terminal.v1.ResourceID.toObject(includeInstance, f), + details: (f = msg.getDetails()) && proto.teleport.terminal.v1.ResourceDetails.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.teleport.terminal.v1.Resource} + */ +proto.teleport.terminal.v1.Resource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.teleport.terminal.v1.Resource; + return proto.teleport.terminal.v1.Resource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.teleport.terminal.v1.Resource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.teleport.terminal.v1.Resource} + */ +proto.teleport.terminal.v1.Resource.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.teleport.terminal.v1.ResourceID; + reader.readMessage(value,proto.teleport.terminal.v1.ResourceID.deserializeBinaryFromReader); + msg.setId(value); + break; + case 2: + var value = new proto.teleport.terminal.v1.ResourceDetails; + reader.readMessage(value,proto.teleport.terminal.v1.ResourceDetails.deserializeBinaryFromReader); + msg.setDetails(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.teleport.terminal.v1.Resource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.teleport.terminal.v1.Resource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.teleport.terminal.v1.Resource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.teleport.terminal.v1.Resource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.teleport.terminal.v1.ResourceID.serializeBinaryToWriter + ); + } + f = message.getDetails(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.teleport.terminal.v1.ResourceDetails.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResourceID id = 1; + * @return {?proto.teleport.terminal.v1.ResourceID} + */ +proto.teleport.terminal.v1.Resource.prototype.getId = function() { + return /** @type{?proto.teleport.terminal.v1.ResourceID} */ ( + jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ResourceID, 1)); +}; + + +/** + * @param {?proto.teleport.terminal.v1.ResourceID|undefined} value + * @return {!proto.teleport.terminal.v1.Resource} returns this +*/ +proto.teleport.terminal.v1.Resource.prototype.setId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.teleport.terminal.v1.Resource} returns this + */ +proto.teleport.terminal.v1.Resource.prototype.clearId = function() { + return this.setId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.teleport.terminal.v1.Resource.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResourceDetails details = 2; + * @return {?proto.teleport.terminal.v1.ResourceDetails} + */ +proto.teleport.terminal.v1.Resource.prototype.getDetails = function() { + return /** @type{?proto.teleport.terminal.v1.ResourceDetails} */ ( + jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ResourceDetails, 2)); +}; + + +/** + * @param {?proto.teleport.terminal.v1.ResourceDetails|undefined} value + * @return {!proto.teleport.terminal.v1.Resource} returns this +*/ +proto.teleport.terminal.v1.Resource.prototype.setDetails = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.teleport.terminal.v1.Resource} returns this + */ +proto.teleport.terminal.v1.Resource.prototype.clearDetails = function() { + return this.setDetails(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.teleport.terminal.v1.Resource.prototype.hasDetails = function() { + return jspb.Message.getField(this, 2) != null; +}; + + goog.object.extend(exports, proto.teleport.terminal.v1); diff --git a/packages/teleterm/src/services/tshd/v1/service_grpc_pb.js b/packages/teleterm/src/services/tshd/v1/service_grpc_pb.js index 80fd2c684..21c72ab8d 100644 --- a/packages/teleterm/src/services/tshd/v1/service_grpc_pb.js +++ b/packages/teleterm/src/services/tshd/v1/service_grpc_pb.js @@ -1059,7 +1059,7 @@ transferFile: { responseSerialize: serialize_teleport_terminal_v1_FileTransferProgress, responseDeserialize: deserialize_teleport_terminal_v1_FileTransferProgress, }, - // dsf + // ReportEvent sends usage event reportEvent: { path: '/teleport.terminal.v1.TerminalService/ReportEvent', requestStream: false, diff --git a/packages/teleterm/src/services/tshd/v1/usage_events_pb.d.ts b/packages/teleterm/src/services/tshd/v1/usage_events_pb.d.ts index 50d585e39..4f2d743ca 100644 --- a/packages/teleterm/src/services/tshd/v1/usage_events_pb.d.ts +++ b/packages/teleterm/src/services/tshd/v1/usage_events_pb.d.ts @@ -6,6 +6,7 @@ import * as jspb from "google-protobuf"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as prehog_v1alpha_connect_pb from "../prehog/v1alpha/connect_pb"; export class ReportEventRequest extends jspb.Message { getDistinctId(): string; @@ -17,354 +18,112 @@ export class ReportEventRequest extends jspb.Message { getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): ReportEventRequest; - - hasEvent(): boolean; - clearEvent(): void; - getEvent(): ConnectUsageEventOneOf | undefined; - setEvent(value?: ConnectUsageEventOneOf): ReportEventRequest; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReportEventRequest.AsObject; - static toObject(includeInstance: boolean, msg: ReportEventRequest): ReportEventRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ReportEventRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReportEventRequest; - static deserializeBinaryFromReader(message: ReportEventRequest, reader: jspb.BinaryReader): ReportEventRequest; -} - -export namespace ReportEventRequest { - export type AsObject = { - distinctId: string, - timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, - event?: ConnectUsageEventOneOf.AsObject, - } -} - -export class EventReportedResponse extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EventReportedResponse.AsObject; - static toObject(includeInstance: boolean, msg: EventReportedResponse): EventReportedResponse.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EventReportedResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EventReportedResponse; - static deserializeBinaryFromReader(message: EventReportedResponse, reader: jspb.BinaryReader): EventReportedResponse; -} - -export namespace EventReportedResponse { - export type AsObject = { - } -} - -export class ClusterProperties extends jspb.Message { getAuthClusterId(): string; - setAuthClusterId(value: string): ClusterProperties; - - getClusterName(): string; - setClusterName(value: string): ClusterProperties; + setAuthClusterId(value: string): ReportEventRequest; - getUserName(): string; - setUserName(value: string): ClusterProperties; + hasConnectLogin(): boolean; + clearConnectLogin(): void; + getConnectLogin(): prehog_v1alpha_connect_pb.ConnectLoginEvent | undefined; + setConnectLogin(value?: prehog_v1alpha_connect_pb.ConnectLoginEvent): ReportEventRequest; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ClusterProperties.AsObject; - static toObject(includeInstance: boolean, msg: ClusterProperties): ClusterProperties.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ClusterProperties, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ClusterProperties; - static deserializeBinaryFromReader(message: ClusterProperties, reader: jspb.BinaryReader): ClusterProperties; -} - -export namespace ClusterProperties { - export type AsObject = { - authClusterId: string, - clusterName: string, - userName: string, - } -} - -export class LoginEvent extends jspb.Message { - - hasClusterProperties(): boolean; - clearClusterProperties(): void; - getClusterProperties(): ClusterProperties | undefined; - setClusterProperties(value?: ClusterProperties): LoginEvent; - - getArch(): string; - setArch(value: string): LoginEvent; - - getOs(): string; - setOs(value: string): LoginEvent; - - getOsVersion(): string; - setOsVersion(value: string): LoginEvent; - - getConnectVersion(): string; - setConnectVersion(value: string): LoginEvent; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LoginEvent.AsObject; - static toObject(includeInstance: boolean, msg: LoginEvent): LoginEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LoginEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LoginEvent; - static deserializeBinaryFromReader(message: LoginEvent, reader: jspb.BinaryReader): LoginEvent; -} -export namespace LoginEvent { - export type AsObject = { - clusterProperties?: ClusterProperties.AsObject, - arch: string, - os: string, - osVersion: string, - connectVersion: string, - } -} + hasConnectProtocolRun(): boolean; + clearConnectProtocolRun(): void; + getConnectProtocolRun(): prehog_v1alpha_connect_pb.ConnectProtocolRunEvent | undefined; + setConnectProtocolRun(value?: prehog_v1alpha_connect_pb.ConnectProtocolRunEvent): ReportEventRequest; -export class ProtocolRunEvent extends jspb.Message { - hasClusterProperties(): boolean; - clearClusterProperties(): void; - getClusterProperties(): ClusterProperties | undefined; - setClusterProperties(value?: ClusterProperties): ProtocolRunEvent; + hasConnectAccessRequestCreate(): boolean; + clearConnectAccessRequestCreate(): void; + getConnectAccessRequestCreate(): prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent | undefined; + setConnectAccessRequestCreate(value?: prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent): ReportEventRequest; - getProtocol(): string; - setProtocol(value: string): ProtocolRunEvent; + hasConnectAccessRequestReview(): boolean; + clearConnectAccessRequestReview(): void; + getConnectAccessRequestReview(): prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent | undefined; + setConnectAccessRequestReview(value?: prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent): ReportEventRequest; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ProtocolRunEvent.AsObject; - static toObject(includeInstance: boolean, msg: ProtocolRunEvent): ProtocolRunEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ProtocolRunEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ProtocolRunEvent; - static deserializeBinaryFromReader(message: ProtocolRunEvent, reader: jspb.BinaryReader): ProtocolRunEvent; -} -export namespace ProtocolRunEvent { - export type AsObject = { - clusterProperties?: ClusterProperties.AsObject, - protocol: string, - } -} - -export class AccessRequestCreateEvent extends jspb.Message { - - hasClusterProperties(): boolean; - clearClusterProperties(): void; - getClusterProperties(): ClusterProperties | undefined; - setClusterProperties(value?: ClusterProperties): AccessRequestCreateEvent; - - getKind(): string; - setKind(value: string): AccessRequestCreateEvent; + hasConnectAccessRequestAssumeRole(): boolean; + clearConnectAccessRequestAssumeRole(): void; + getConnectAccessRequestAssumeRole(): prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent | undefined; + setConnectAccessRequestAssumeRole(value?: prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent): ReportEventRequest; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccessRequestCreateEvent.AsObject; - static toObject(includeInstance: boolean, msg: AccessRequestCreateEvent): AccessRequestCreateEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccessRequestCreateEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccessRequestCreateEvent; - static deserializeBinaryFromReader(message: AccessRequestCreateEvent, reader: jspb.BinaryReader): AccessRequestCreateEvent; -} + hasConnectFileTransferRunEvent(): boolean; + clearConnectFileTransferRunEvent(): void; + getConnectFileTransferRunEvent(): prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent | undefined; + setConnectFileTransferRunEvent(value?: prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent): ReportEventRequest; -export namespace AccessRequestCreateEvent { - export type AsObject = { - clusterProperties?: ClusterProperties.AsObject, - kind: string, - } -} -export class AccessRequestReviewEvent extends jspb.Message { + hasConnectUserJobRoleUpdateEvent(): boolean; + clearConnectUserJobRoleUpdateEvent(): void; + getConnectUserJobRoleUpdateEvent(): prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent | undefined; + setConnectUserJobRoleUpdateEvent(value?: prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent): ReportEventRequest; - hasClusterProperties(): boolean; - clearClusterProperties(): void; - getClusterProperties(): ClusterProperties | undefined; - setClusterProperties(value?: ClusterProperties): AccessRequestReviewEvent; + getEventCase(): ReportEventRequest.EventCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccessRequestReviewEvent.AsObject; - static toObject(includeInstance: boolean, msg: AccessRequestReviewEvent): AccessRequestReviewEvent.AsObject; + toObject(includeInstance?: boolean): ReportEventRequest.AsObject; + static toObject(includeInstance: boolean, msg: ReportEventRequest): ReportEventRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccessRequestReviewEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccessRequestReviewEvent; - static deserializeBinaryFromReader(message: AccessRequestReviewEvent, reader: jspb.BinaryReader): AccessRequestReviewEvent; + static serializeBinaryToWriter(message: ReportEventRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReportEventRequest; + static deserializeBinaryFromReader(message: ReportEventRequest, reader: jspb.BinaryReader): ReportEventRequest; } -export namespace AccessRequestReviewEvent { +export namespace ReportEventRequest { export type AsObject = { - clusterProperties?: ClusterProperties.AsObject, + distinctId: string, + timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, + authClusterId: string, + connectLogin?: prehog_v1alpha_connect_pb.ConnectLoginEvent.AsObject, + connectProtocolRun?: prehog_v1alpha_connect_pb.ConnectProtocolRunEvent.AsObject, + connectAccessRequestCreate?: prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent.AsObject, + connectAccessRequestReview?: prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent.AsObject, + connectAccessRequestAssumeRole?: prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent.AsObject, + connectFileTransferRunEvent?: prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent.AsObject, + connectUserJobRoleUpdateEvent?: prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent.AsObject, } -} - -export class AccessRequestAssumeRoleEvent extends jspb.Message { - - hasClusterProperties(): boolean; - clearClusterProperties(): void; - getClusterProperties(): ClusterProperties | undefined; - setClusterProperties(value?: ClusterProperties): AccessRequestAssumeRoleEvent; + export enum EventCase { + EVENT_NOT_SET = 0, + + CONNECT_LOGIN = 4, - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AccessRequestAssumeRoleEvent.AsObject; - static toObject(includeInstance: boolean, msg: AccessRequestAssumeRoleEvent): AccessRequestAssumeRoleEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AccessRequestAssumeRoleEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AccessRequestAssumeRoleEvent; - static deserializeBinaryFromReader(message: AccessRequestAssumeRoleEvent, reader: jspb.BinaryReader): AccessRequestAssumeRoleEvent; -} - -export namespace AccessRequestAssumeRoleEvent { - export type AsObject = { - clusterProperties?: ClusterProperties.AsObject, - } -} + CONNECT_PROTOCOL_RUN = 5, -export class FileTransferRunEvent extends jspb.Message { + CONNECT_ACCESS_REQUEST_CREATE = 6, - hasClusterProperties(): boolean; - clearClusterProperties(): void; - getClusterProperties(): ClusterProperties | undefined; - setClusterProperties(value?: ClusterProperties): FileTransferRunEvent; + CONNECT_ACCESS_REQUEST_REVIEW = 7, - getDirection(): string; - setDirection(value: string): FileTransferRunEvent; + CONNECT_ACCESS_REQUEST_ASSUME_ROLE = 8, + CONNECT_FILE_TRANSFER_RUN_EVENT = 9, - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FileTransferRunEvent.AsObject; - static toObject(includeInstance: boolean, msg: FileTransferRunEvent): FileTransferRunEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FileTransferRunEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FileTransferRunEvent; - static deserializeBinaryFromReader(message: FileTransferRunEvent, reader: jspb.BinaryReader): FileTransferRunEvent; -} + CONNECT_USER_JOB_ROLE_UPDATE_EVENT = 10, -export namespace FileTransferRunEvent { - export type AsObject = { - clusterProperties?: ClusterProperties.AsObject, - direction: string, } -} - -export class UserJobRoleUpdateEvent extends jspb.Message { - getJobRole(): string; - setJobRole(value: string): UserJobRoleUpdateEvent; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UserJobRoleUpdateEvent.AsObject; - static toObject(includeInstance: boolean, msg: UserJobRoleUpdateEvent): UserJobRoleUpdateEvent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UserJobRoleUpdateEvent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UserJobRoleUpdateEvent; - static deserializeBinaryFromReader(message: UserJobRoleUpdateEvent, reader: jspb.BinaryReader): UserJobRoleUpdateEvent; -} -export namespace UserJobRoleUpdateEvent { - export type AsObject = { - jobRole: string, - } } -export class ConnectUsageEventOneOf extends jspb.Message { - - hasLoginEvent(): boolean; - clearLoginEvent(): void; - getLoginEvent(): LoginEvent | undefined; - setLoginEvent(value?: LoginEvent): ConnectUsageEventOneOf; - - - hasProtocolRunEvent(): boolean; - clearProtocolRunEvent(): void; - getProtocolRunEvent(): ProtocolRunEvent | undefined; - setProtocolRunEvent(value?: ProtocolRunEvent): ConnectUsageEventOneOf; - - - hasAccessRequestCreateEvent(): boolean; - clearAccessRequestCreateEvent(): void; - getAccessRequestCreateEvent(): AccessRequestCreateEvent | undefined; - setAccessRequestCreateEvent(value?: AccessRequestCreateEvent): ConnectUsageEventOneOf; - - - hasAccessRequestReviewEvent(): boolean; - clearAccessRequestReviewEvent(): void; - getAccessRequestReviewEvent(): AccessRequestReviewEvent | undefined; - setAccessRequestReviewEvent(value?: AccessRequestReviewEvent): ConnectUsageEventOneOf; - - - hasAccessRequestAssumeRoleEvent(): boolean; - clearAccessRequestAssumeRoleEvent(): void; - getAccessRequestAssumeRoleEvent(): AccessRequestAssumeRoleEvent | undefined; - setAccessRequestAssumeRoleEvent(value?: AccessRequestAssumeRoleEvent): ConnectUsageEventOneOf; - - - hasFileTransferRunEvent(): boolean; - clearFileTransferRunEvent(): void; - getFileTransferRunEvent(): FileTransferRunEvent | undefined; - setFileTransferRunEvent(value?: FileTransferRunEvent): ConnectUsageEventOneOf; - - - hasUserJobRoleUpdateEvent(): boolean; - clearUserJobRoleUpdateEvent(): void; - getUserJobRoleUpdateEvent(): UserJobRoleUpdateEvent | undefined; - setUserJobRoleUpdateEvent(value?: UserJobRoleUpdateEvent): ConnectUsageEventOneOf; - - - getEventCase(): ConnectUsageEventOneOf.EventCase; +export class EventReportedResponse extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConnectUsageEventOneOf.AsObject; - static toObject(includeInstance: boolean, msg: ConnectUsageEventOneOf): ConnectUsageEventOneOf.AsObject; + toObject(includeInstance?: boolean): EventReportedResponse.AsObject; + static toObject(includeInstance: boolean, msg: EventReportedResponse): EventReportedResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConnectUsageEventOneOf, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConnectUsageEventOneOf; - static deserializeBinaryFromReader(message: ConnectUsageEventOneOf, reader: jspb.BinaryReader): ConnectUsageEventOneOf; + static serializeBinaryToWriter(message: EventReportedResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventReportedResponse; + static deserializeBinaryFromReader(message: EventReportedResponse, reader: jspb.BinaryReader): EventReportedResponse; } -export namespace ConnectUsageEventOneOf { +export namespace EventReportedResponse { export type AsObject = { - loginEvent?: LoginEvent.AsObject, - protocolRunEvent?: ProtocolRunEvent.AsObject, - accessRequestCreateEvent?: AccessRequestCreateEvent.AsObject, - accessRequestReviewEvent?: AccessRequestReviewEvent.AsObject, - accessRequestAssumeRoleEvent?: AccessRequestAssumeRoleEvent.AsObject, - fileTransferRunEvent?: FileTransferRunEvent.AsObject, - userJobRoleUpdateEvent?: UserJobRoleUpdateEvent.AsObject, } - - export enum EventCase { - EVENT_NOT_SET = 0, - - LOGIN_EVENT = 1, - - PROTOCOL_RUN_EVENT = 2, - - ACCESS_REQUEST_CREATE_EVENT = 3, - - ACCESS_REQUEST_REVIEW_EVENT = 4, - - ACCESS_REQUEST_ASSUME_ROLE_EVENT = 5, - - FILE_TRANSFER_RUN_EVENT = 6, - - USER_JOB_ROLE_UPDATE_EVENT = 7, - - } - } diff --git a/packages/teleterm/src/services/tshd/v1/usage_events_pb.js b/packages/teleterm/src/services/tshd/v1/usage_events_pb.js index c24ecb9cf..a3490e085 100644 --- a/packages/teleterm/src/services/tshd/v1/usage_events_pb.js +++ b/packages/teleterm/src/services/tshd/v1/usage_events_pb.js @@ -17,18 +17,11 @@ var global = (function() { return this || window || global || self || Function(' var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); -goog.exportSymbol('proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.AccessRequestCreateEvent', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.AccessRequestReviewEvent', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.ClusterProperties', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.ConnectUsageEventOneOf', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.ConnectUsageEventOneOf.EventCase', null, global); +var prehog_v1alpha_connect_pb = require('../prehog/v1alpha/connect_pb.js'); +goog.object.extend(proto, prehog_v1alpha_connect_pb); goog.exportSymbol('proto.teleport.terminal.v1.EventReportedResponse', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.FileTransferRunEvent', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.LoginEvent', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.ProtocolRunEvent', null, global); goog.exportSymbol('proto.teleport.terminal.v1.ReportEventRequest', null, global); -goog.exportSymbol('proto.teleport.terminal.v1.UserJobRoleUpdateEvent', null, global); +goog.exportSymbol('proto.teleport.terminal.v1.ReportEventRequest.EventCase', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -40,7 +33,7 @@ goog.exportSymbol('proto.teleport.terminal.v1.UserJobRoleUpdateEvent', null, glo * @constructor */ proto.teleport.terminal.v1.ReportEventRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_); }; goog.inherits(proto.teleport.terminal.v1.ReportEventRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -67,1968 +60,10 @@ goog.inherits(proto.teleport.terminal.v1.EventReportedResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public - * @override - */ - proto.teleport.terminal.v1.EventReportedResponse.displayName = 'proto.teleport.terminal.v1.EventReportedResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.ClusterProperties = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.ClusterProperties, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.ClusterProperties.displayName = 'proto.teleport.terminal.v1.ClusterProperties'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.LoginEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.LoginEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.LoginEvent.displayName = 'proto.teleport.terminal.v1.LoginEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.ProtocolRunEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.ProtocolRunEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.ProtocolRunEvent.displayName = 'proto.teleport.terminal.v1.ProtocolRunEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.AccessRequestCreateEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.AccessRequestCreateEvent.displayName = 'proto.teleport.terminal.v1.AccessRequestCreateEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.AccessRequestReviewEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.AccessRequestReviewEvent.displayName = 'proto.teleport.terminal.v1.AccessRequestReviewEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.displayName = 'proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.FileTransferRunEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.FileTransferRunEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.FileTransferRunEvent.displayName = 'proto.teleport.terminal.v1.FileTransferRunEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.teleport.terminal.v1.UserJobRoleUpdateEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.UserJobRoleUpdateEvent.displayName = 'proto.teleport.terminal.v1.UserJobRoleUpdateEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_); -}; -goog.inherits(proto.teleport.terminal.v1.ConnectUsageEventOneOf, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.teleport.terminal.v1.ConnectUsageEventOneOf.displayName = 'proto.teleport.terminal.v1.ConnectUsageEventOneOf'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.ReportEventRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.ReportEventRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.ReportEventRequest.toObject = function(includeInstance, msg) { - var f, obj = { - distinctId: jspb.Message.getFieldWithDefault(msg, 1, ""), - timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - event: (f = msg.getEvent()) && proto.teleport.terminal.v1.ConnectUsageEventOneOf.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.ReportEventRequest} - */ -proto.teleport.terminal.v1.ReportEventRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.ReportEventRequest; - return proto.teleport.terminal.v1.ReportEventRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.ReportEventRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.ReportEventRequest} - */ -proto.teleport.terminal.v1.ReportEventRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDistinctId(value); - break; - case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTimestamp(value); - break; - case 3: - var value = new proto.teleport.terminal.v1.ConnectUsageEventOneOf; - reader.readMessage(value,proto.teleport.terminal.v1.ConnectUsageEventOneOf.deserializeBinaryFromReader); - msg.setEvent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.ReportEventRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.ReportEventRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.ReportEventRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDistinctId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTimestamp(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getEvent(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.teleport.terminal.v1.ConnectUsageEventOneOf.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string distinct_id = 1; - * @return {string} - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.getDistinctId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.setDistinctId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional google.protobuf.Timestamp timestamp = 2; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.getTimestamp = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this -*/ -proto.teleport.terminal.v1.ReportEventRequest.prototype.setTimestamp = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.clearTimestamp = function() { - return this.setTimestamp(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.hasTimestamp = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional ConnectUsageEventOneOf event = 3; - * @return {?proto.teleport.terminal.v1.ConnectUsageEventOneOf} - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.getEvent = function() { - return /** @type{?proto.teleport.terminal.v1.ConnectUsageEventOneOf} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ConnectUsageEventOneOf, 3)); -}; - - -/** - * @param {?proto.teleport.terminal.v1.ConnectUsageEventOneOf|undefined} value - * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this -*/ -proto.teleport.terminal.v1.ReportEventRequest.prototype.setEvent = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.clearEvent = function() { - return this.setEvent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.ReportEventRequest.prototype.hasEvent = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.EventReportedResponse.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.EventReportedResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.EventReportedResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.EventReportedResponse.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.EventReportedResponse} - */ -proto.teleport.terminal.v1.EventReportedResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.EventReportedResponse; - return proto.teleport.terminal.v1.EventReportedResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.EventReportedResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.EventReportedResponse} - */ -proto.teleport.terminal.v1.EventReportedResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.EventReportedResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.EventReportedResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.EventReportedResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.EventReportedResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.ClusterProperties.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.ClusterProperties} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.ClusterProperties.toObject = function(includeInstance, msg) { - var f, obj = { - authClusterId: jspb.Message.getFieldWithDefault(msg, 1, ""), - clusterName: jspb.Message.getFieldWithDefault(msg, 2, ""), - userName: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.ClusterProperties.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.ClusterProperties; - return proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.ClusterProperties} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthClusterId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setClusterName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUserName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.ClusterProperties} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAuthClusterId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getClusterName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getUserName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string auth_cluster_id = 1; - * @return {string} - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.getAuthClusterId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.ClusterProperties} returns this - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.setAuthClusterId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string cluster_name = 2; - * @return {string} - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.getClusterName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.ClusterProperties} returns this - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.setClusterName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string user_name = 3; - * @return {string} - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.getUserName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.ClusterProperties} returns this - */ -proto.teleport.terminal.v1.ClusterProperties.prototype.setUserName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.LoginEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.LoginEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.LoginEvent.toObject = function(includeInstance, msg) { - var f, obj = { - clusterProperties: (f = msg.getClusterProperties()) && proto.teleport.terminal.v1.ClusterProperties.toObject(includeInstance, f), - arch: jspb.Message.getFieldWithDefault(msg, 2, ""), - os: jspb.Message.getFieldWithDefault(msg, 3, ""), - osVersion: jspb.Message.getFieldWithDefault(msg, 4, ""), - connectVersion: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.LoginEvent} - */ -proto.teleport.terminal.v1.LoginEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.LoginEvent; - return proto.teleport.terminal.v1.LoginEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.LoginEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.LoginEvent} - */ -proto.teleport.terminal.v1.LoginEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.teleport.terminal.v1.ClusterProperties; - reader.readMessage(value,proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader); - msg.setClusterProperties(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setArch(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setOs(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setOsVersion(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setConnectVersion(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.LoginEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.LoginEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.LoginEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClusterProperties(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter - ); - } - f = message.getArch(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getOs(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getOsVersion(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getConnectVersion(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional ClusterProperties cluster_properties = 1; - * @return {?proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.getClusterProperties = function() { - return /** @type{?proto.teleport.terminal.v1.ClusterProperties} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ClusterProperties, 1)); -}; - - -/** - * @param {?proto.teleport.terminal.v1.ClusterProperties|undefined} value - * @return {!proto.teleport.terminal.v1.LoginEvent} returns this -*/ -proto.teleport.terminal.v1.LoginEvent.prototype.setClusterProperties = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.LoginEvent} returns this - */ -proto.teleport.terminal.v1.LoginEvent.prototype.clearClusterProperties = function() { - return this.setClusterProperties(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.hasClusterProperties = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string arch = 2; - * @return {string} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.getArch = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.LoginEvent} returns this - */ -proto.teleport.terminal.v1.LoginEvent.prototype.setArch = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string os = 3; - * @return {string} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.getOs = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.LoginEvent} returns this - */ -proto.teleport.terminal.v1.LoginEvent.prototype.setOs = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string os_version = 4; - * @return {string} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.getOsVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.LoginEvent} returns this - */ -proto.teleport.terminal.v1.LoginEvent.prototype.setOsVersion = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string connect_version = 5; - * @return {string} - */ -proto.teleport.terminal.v1.LoginEvent.prototype.getConnectVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.LoginEvent} returns this - */ -proto.teleport.terminal.v1.LoginEvent.prototype.setConnectVersion = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.ProtocolRunEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.ProtocolRunEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.ProtocolRunEvent.toObject = function(includeInstance, msg) { - var f, obj = { - clusterProperties: (f = msg.getClusterProperties()) && proto.teleport.terminal.v1.ClusterProperties.toObject(includeInstance, f), - protocol: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.ProtocolRunEvent} - */ -proto.teleport.terminal.v1.ProtocolRunEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.ProtocolRunEvent; - return proto.teleport.terminal.v1.ProtocolRunEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.ProtocolRunEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.ProtocolRunEvent} - */ -proto.teleport.terminal.v1.ProtocolRunEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.teleport.terminal.v1.ClusterProperties; - reader.readMessage(value,proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader); - msg.setClusterProperties(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setProtocol(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.ProtocolRunEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.ProtocolRunEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.ProtocolRunEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClusterProperties(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter - ); - } - f = message.getProtocol(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional ClusterProperties cluster_properties = 1; - * @return {?proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.getClusterProperties = function() { - return /** @type{?proto.teleport.terminal.v1.ClusterProperties} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ClusterProperties, 1)); -}; - - -/** - * @param {?proto.teleport.terminal.v1.ClusterProperties|undefined} value - * @return {!proto.teleport.terminal.v1.ProtocolRunEvent} returns this -*/ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.setClusterProperties = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ProtocolRunEvent} returns this - */ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.clearClusterProperties = function() { - return this.setClusterProperties(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.hasClusterProperties = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string protocol = 2; - * @return {string} - */ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.getProtocol = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.ProtocolRunEvent} returns this - */ -proto.teleport.terminal.v1.ProtocolRunEvent.prototype.setProtocol = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.AccessRequestCreateEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.AccessRequestCreateEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.toObject = function(includeInstance, msg) { - var f, obj = { - clusterProperties: (f = msg.getClusterProperties()) && proto.teleport.terminal.v1.ClusterProperties.toObject(includeInstance, f), - kind: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.AccessRequestCreateEvent} - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.AccessRequestCreateEvent; - return proto.teleport.terminal.v1.AccessRequestCreateEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.AccessRequestCreateEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.AccessRequestCreateEvent} - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.teleport.terminal.v1.ClusterProperties; - reader.readMessage(value,proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader); - msg.setClusterProperties(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setKind(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.AccessRequestCreateEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.AccessRequestCreateEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClusterProperties(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter - ); - } - f = message.getKind(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional ClusterProperties cluster_properties = 1; - * @return {?proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.getClusterProperties = function() { - return /** @type{?proto.teleport.terminal.v1.ClusterProperties} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ClusterProperties, 1)); -}; - - -/** - * @param {?proto.teleport.terminal.v1.ClusterProperties|undefined} value - * @return {!proto.teleport.terminal.v1.AccessRequestCreateEvent} returns this -*/ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.setClusterProperties = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.AccessRequestCreateEvent} returns this - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.clearClusterProperties = function() { - return this.setClusterProperties(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.hasClusterProperties = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string kind = 2; - * @return {string} - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.getKind = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.AccessRequestCreateEvent} returns this - */ -proto.teleport.terminal.v1.AccessRequestCreateEvent.prototype.setKind = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.AccessRequestReviewEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.AccessRequestReviewEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.toObject = function(includeInstance, msg) { - var f, obj = { - clusterProperties: (f = msg.getClusterProperties()) && proto.teleport.terminal.v1.ClusterProperties.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.AccessRequestReviewEvent} - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.AccessRequestReviewEvent; - return proto.teleport.terminal.v1.AccessRequestReviewEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.AccessRequestReviewEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.AccessRequestReviewEvent} - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.teleport.terminal.v1.ClusterProperties; - reader.readMessage(value,proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader); - msg.setClusterProperties(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.AccessRequestReviewEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.AccessRequestReviewEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClusterProperties(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ClusterProperties cluster_properties = 1; - * @return {?proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.prototype.getClusterProperties = function() { - return /** @type{?proto.teleport.terminal.v1.ClusterProperties} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ClusterProperties, 1)); -}; - - -/** - * @param {?proto.teleport.terminal.v1.ClusterProperties|undefined} value - * @return {!proto.teleport.terminal.v1.AccessRequestReviewEvent} returns this -*/ -proto.teleport.terminal.v1.AccessRequestReviewEvent.prototype.setClusterProperties = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.AccessRequestReviewEvent} returns this - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.prototype.clearClusterProperties = function() { - return this.setClusterProperties(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.AccessRequestReviewEvent.prototype.hasClusterProperties = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.toObject = function(includeInstance, msg) { - var f, obj = { - clusterProperties: (f = msg.getClusterProperties()) && proto.teleport.terminal.v1.ClusterProperties.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent; - return proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.teleport.terminal.v1.ClusterProperties; - reader.readMessage(value,proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader); - msg.setClusterProperties(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClusterProperties(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ClusterProperties cluster_properties = 1; - * @return {?proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.prototype.getClusterProperties = function() { - return /** @type{?proto.teleport.terminal.v1.ClusterProperties} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ClusterProperties, 1)); -}; - - -/** - * @param {?proto.teleport.terminal.v1.ClusterProperties|undefined} value - * @return {!proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} returns this -*/ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.prototype.setClusterProperties = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} returns this - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.prototype.clearClusterProperties = function() { - return this.setClusterProperties(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.prototype.hasClusterProperties = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.FileTransferRunEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.FileTransferRunEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.FileTransferRunEvent.toObject = function(includeInstance, msg) { - var f, obj = { - clusterProperties: (f = msg.getClusterProperties()) && proto.teleport.terminal.v1.ClusterProperties.toObject(includeInstance, f), - direction: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.FileTransferRunEvent} - */ -proto.teleport.terminal.v1.FileTransferRunEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.FileTransferRunEvent; - return proto.teleport.terminal.v1.FileTransferRunEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.FileTransferRunEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.FileTransferRunEvent} - */ -proto.teleport.terminal.v1.FileTransferRunEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.teleport.terminal.v1.ClusterProperties; - reader.readMessage(value,proto.teleport.terminal.v1.ClusterProperties.deserializeBinaryFromReader); - msg.setClusterProperties(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDirection(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.FileTransferRunEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.FileTransferRunEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.FileTransferRunEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getClusterProperties(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.teleport.terminal.v1.ClusterProperties.serializeBinaryToWriter - ); - } - f = message.getDirection(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional ClusterProperties cluster_properties = 1; - * @return {?proto.teleport.terminal.v1.ClusterProperties} - */ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.getClusterProperties = function() { - return /** @type{?proto.teleport.terminal.v1.ClusterProperties} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ClusterProperties, 1)); -}; - - -/** - * @param {?proto.teleport.terminal.v1.ClusterProperties|undefined} value - * @return {!proto.teleport.terminal.v1.FileTransferRunEvent} returns this -*/ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.setClusterProperties = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.FileTransferRunEvent} returns this - */ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.clearClusterProperties = function() { - return this.setClusterProperties(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.hasClusterProperties = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string direction = 2; - * @return {string} - */ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.getDirection = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.FileTransferRunEvent} returns this - */ -proto.teleport.terminal.v1.FileTransferRunEvent.prototype.setDirection = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.UserJobRoleUpdateEvent.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.UserJobRoleUpdateEvent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.toObject = function(includeInstance, msg) { - var f, obj = { - jobRole: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.UserJobRoleUpdateEvent} - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.UserJobRoleUpdateEvent; - return proto.teleport.terminal.v1.UserJobRoleUpdateEvent.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.UserJobRoleUpdateEvent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.UserJobRoleUpdateEvent} - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setJobRole(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.UserJobRoleUpdateEvent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.UserJobRoleUpdateEvent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getJobRole(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string job_role = 1; - * @return {string} - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.prototype.getJobRole = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.teleport.terminal.v1.UserJobRoleUpdateEvent} returns this - */ -proto.teleport.terminal.v1.UserJobRoleUpdateEvent.prototype.setJobRole = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - + * @override + */ + proto.teleport.terminal.v1.EventReportedResponse.displayName = 'proto.teleport.terminal.v1.EventReportedResponse'; +} /** * Oneof group definitions for this message. Each group defines the field @@ -2038,27 +73,27 @@ proto.teleport.terminal.v1.UserJobRoleUpdateEvent.prototype.setJobRole = functio * @private {!Array>} * @const */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_ = [[1,2,3,4,5,6,7]]; +proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_ = [[4,5,6,7,8,9,10]]; /** * @enum {number} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.EventCase = { +proto.teleport.terminal.v1.ReportEventRequest.EventCase = { EVENT_NOT_SET: 0, - LOGIN_EVENT: 1, - PROTOCOL_RUN_EVENT: 2, - ACCESS_REQUEST_CREATE_EVENT: 3, - ACCESS_REQUEST_REVIEW_EVENT: 4, - ACCESS_REQUEST_ASSUME_ROLE_EVENT: 5, - FILE_TRANSFER_RUN_EVENT: 6, - USER_JOB_ROLE_UPDATE_EVENT: 7 + CONNECT_LOGIN: 4, + CONNECT_PROTOCOL_RUN: 5, + CONNECT_ACCESS_REQUEST_CREATE: 6, + CONNECT_ACCESS_REQUEST_REVIEW: 7, + CONNECT_ACCESS_REQUEST_ASSUME_ROLE: 8, + CONNECT_FILE_TRANSFER_RUN_EVENT: 9, + CONNECT_USER_JOB_ROLE_UPDATE_EVENT: 10 }; /** - * @return {proto.teleport.terminal.v1.ConnectUsageEventOneOf.EventCase} + * @return {proto.teleport.terminal.v1.ReportEventRequest.EventCase} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getEventCase = function() { - return /** @type {proto.teleport.terminal.v1.ConnectUsageEventOneOf.EventCase} */(jspb.Message.computeOneofCase(this, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0])); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getEventCase = function() { + return /** @type {proto.teleport.terminal.v1.ReportEventRequest.EventCase} */(jspb.Message.computeOneofCase(this, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0])); }; @@ -2076,8 +111,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.toObject = function(opt_includeInstance) { - return proto.teleport.terminal.v1.ConnectUsageEventOneOf.toObject(opt_includeInstance, this); +proto.teleport.terminal.v1.ReportEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.teleport.terminal.v1.ReportEventRequest.toObject(opt_includeInstance, this); }; @@ -2086,19 +121,22 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.toObject = function( * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} msg The msg instance to transform. + * @param {!proto.teleport.terminal.v1.ReportEventRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.toObject = function(includeInstance, msg) { +proto.teleport.terminal.v1.ReportEventRequest.toObject = function(includeInstance, msg) { var f, obj = { - loginEvent: (f = msg.getLoginEvent()) && proto.teleport.terminal.v1.LoginEvent.toObject(includeInstance, f), - protocolRunEvent: (f = msg.getProtocolRunEvent()) && proto.teleport.terminal.v1.ProtocolRunEvent.toObject(includeInstance, f), - accessRequestCreateEvent: (f = msg.getAccessRequestCreateEvent()) && proto.teleport.terminal.v1.AccessRequestCreateEvent.toObject(includeInstance, f), - accessRequestReviewEvent: (f = msg.getAccessRequestReviewEvent()) && proto.teleport.terminal.v1.AccessRequestReviewEvent.toObject(includeInstance, f), - accessRequestAssumeRoleEvent: (f = msg.getAccessRequestAssumeRoleEvent()) && proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.toObject(includeInstance, f), - fileTransferRunEvent: (f = msg.getFileTransferRunEvent()) && proto.teleport.terminal.v1.FileTransferRunEvent.toObject(includeInstance, f), - userJobRoleUpdateEvent: (f = msg.getUserJobRoleUpdateEvent()) && proto.teleport.terminal.v1.UserJobRoleUpdateEvent.toObject(includeInstance, f) + distinctId: jspb.Message.getFieldWithDefault(msg, 1, ""), + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + authClusterId: jspb.Message.getFieldWithDefault(msg, 3, ""), + connectLogin: (f = msg.getConnectLogin()) && prehog_v1alpha_connect_pb.ConnectLoginEvent.toObject(includeInstance, f), + connectProtocolRun: (f = msg.getConnectProtocolRun()) && prehog_v1alpha_connect_pb.ConnectProtocolRunEvent.toObject(includeInstance, f), + connectAccessRequestCreate: (f = msg.getConnectAccessRequestCreate()) && prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent.toObject(includeInstance, f), + connectAccessRequestReview: (f = msg.getConnectAccessRequestReview()) && prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent.toObject(includeInstance, f), + connectAccessRequestAssumeRole: (f = msg.getConnectAccessRequestAssumeRole()) && prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent.toObject(includeInstance, f), + connectFileTransferRunEvent: (f = msg.getConnectFileTransferRunEvent()) && prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent.toObject(includeInstance, f), + connectUserJobRoleUpdateEvent: (f = msg.getConnectUserJobRoleUpdateEvent()) && prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -2112,23 +150,23 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} + * @return {!proto.teleport.terminal.v1.ReportEventRequest} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.deserializeBinary = function(bytes) { +proto.teleport.terminal.v1.ReportEventRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.teleport.terminal.v1.ConnectUsageEventOneOf; - return proto.teleport.terminal.v1.ConnectUsageEventOneOf.deserializeBinaryFromReader(msg, reader); + var msg = new proto.teleport.terminal.v1.ReportEventRequest; + return proto.teleport.terminal.v1.ReportEventRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} msg The message object to deserialize into. + * @param {!proto.teleport.terminal.v1.ReportEventRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} + * @return {!proto.teleport.terminal.v1.ReportEventRequest} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.deserializeBinaryFromReader = function(msg, reader) { +proto.teleport.terminal.v1.ReportEventRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2136,39 +174,52 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.teleport.terminal.v1.LoginEvent; - reader.readMessage(value,proto.teleport.terminal.v1.LoginEvent.deserializeBinaryFromReader); - msg.setLoginEvent(value); + var value = /** @type {string} */ (reader.readString()); + msg.setDistinctId(value); break; case 2: - var value = new proto.teleport.terminal.v1.ProtocolRunEvent; - reader.readMessage(value,proto.teleport.terminal.v1.ProtocolRunEvent.deserializeBinaryFromReader); - msg.setProtocolRunEvent(value); + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); break; case 3: - var value = new proto.teleport.terminal.v1.AccessRequestCreateEvent; - reader.readMessage(value,proto.teleport.terminal.v1.AccessRequestCreateEvent.deserializeBinaryFromReader); - msg.setAccessRequestCreateEvent(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAuthClusterId(value); break; case 4: - var value = new proto.teleport.terminal.v1.AccessRequestReviewEvent; - reader.readMessage(value,proto.teleport.terminal.v1.AccessRequestReviewEvent.deserializeBinaryFromReader); - msg.setAccessRequestReviewEvent(value); + var value = new prehog_v1alpha_connect_pb.ConnectLoginEvent; + reader.readMessage(value,prehog_v1alpha_connect_pb.ConnectLoginEvent.deserializeBinaryFromReader); + msg.setConnectLogin(value); break; case 5: - var value = new proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent; - reader.readMessage(value,proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.deserializeBinaryFromReader); - msg.setAccessRequestAssumeRoleEvent(value); + var value = new prehog_v1alpha_connect_pb.ConnectProtocolRunEvent; + reader.readMessage(value,prehog_v1alpha_connect_pb.ConnectProtocolRunEvent.deserializeBinaryFromReader); + msg.setConnectProtocolRun(value); break; case 6: - var value = new proto.teleport.terminal.v1.FileTransferRunEvent; - reader.readMessage(value,proto.teleport.terminal.v1.FileTransferRunEvent.deserializeBinaryFromReader); - msg.setFileTransferRunEvent(value); + var value = new prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent; + reader.readMessage(value,prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent.deserializeBinaryFromReader); + msg.setConnectAccessRequestCreate(value); break; case 7: - var value = new proto.teleport.terminal.v1.UserJobRoleUpdateEvent; - reader.readMessage(value,proto.teleport.terminal.v1.UserJobRoleUpdateEvent.deserializeBinaryFromReader); - msg.setUserJobRoleUpdateEvent(value); + var value = new prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent; + reader.readMessage(value,prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent.deserializeBinaryFromReader); + msg.setConnectAccessRequestReview(value); + break; + case 8: + var value = new prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent; + reader.readMessage(value,prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent.deserializeBinaryFromReader); + msg.setConnectAccessRequestAssumeRole(value); + break; + case 9: + var value = new prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent; + reader.readMessage(value,prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent.deserializeBinaryFromReader); + msg.setConnectFileTransferRunEvent(value); + break; + case 10: + var value = new prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent; + reader.readMessage(value,prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent.deserializeBinaryFromReader); + msg.setConnectUserJobRoleUpdateEvent(value); break; default: reader.skipField(); @@ -2183,9 +234,9 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.serializeBinary = function() { +proto.teleport.terminal.v1.ReportEventRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.teleport.terminal.v1.ConnectUsageEventOneOf.serializeBinaryToWriter(this, writer); + proto.teleport.terminal.v1.ReportEventRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2193,96 +244,136 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} message + * @param {!proto.teleport.terminal.v1.ReportEventRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.serializeBinaryToWriter = function(message, writer) { +proto.teleport.terminal.v1.ReportEventRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLoginEvent(); - if (f != null) { - writer.writeMessage( + f = message.getDistinctId(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.teleport.terminal.v1.LoginEvent.serializeBinaryToWriter + f ); } - f = message.getProtocolRunEvent(); + f = message.getTimestamp(); if (f != null) { writer.writeMessage( 2, f, - proto.teleport.terminal.v1.ProtocolRunEvent.serializeBinaryToWriter + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getAccessRequestCreateEvent(); - if (f != null) { - writer.writeMessage( + f = message.getAuthClusterId(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.teleport.terminal.v1.AccessRequestCreateEvent.serializeBinaryToWriter + f ); } - f = message.getAccessRequestReviewEvent(); + f = message.getConnectLogin(); if (f != null) { writer.writeMessage( 4, f, - proto.teleport.terminal.v1.AccessRequestReviewEvent.serializeBinaryToWriter + prehog_v1alpha_connect_pb.ConnectLoginEvent.serializeBinaryToWriter ); } - f = message.getAccessRequestAssumeRoleEvent(); + f = message.getConnectProtocolRun(); if (f != null) { writer.writeMessage( 5, f, - proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent.serializeBinaryToWriter + prehog_v1alpha_connect_pb.ConnectProtocolRunEvent.serializeBinaryToWriter ); } - f = message.getFileTransferRunEvent(); + f = message.getConnectAccessRequestCreate(); if (f != null) { writer.writeMessage( 6, f, - proto.teleport.terminal.v1.FileTransferRunEvent.serializeBinaryToWriter + prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent.serializeBinaryToWriter ); } - f = message.getUserJobRoleUpdateEvent(); + f = message.getConnectAccessRequestReview(); if (f != null) { writer.writeMessage( 7, f, - proto.teleport.terminal.v1.UserJobRoleUpdateEvent.serializeBinaryToWriter + prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent.serializeBinaryToWriter + ); + } + f = message.getConnectAccessRequestAssumeRole(); + if (f != null) { + writer.writeMessage( + 8, + f, + prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent.serializeBinaryToWriter + ); + } + f = message.getConnectFileTransferRunEvent(); + if (f != null) { + writer.writeMessage( + 9, + f, + prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent.serializeBinaryToWriter + ); + } + f = message.getConnectUserJobRoleUpdateEvent(); + if (f != null) { + writer.writeMessage( + 10, + f, + prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent.serializeBinaryToWriter ); } }; /** - * optional LoginEvent login_event = 1; - * @return {?proto.teleport.terminal.v1.LoginEvent} + * optional string distinct_id = 1; + * @return {string} + */ +proto.teleport.terminal.v1.ReportEventRequest.prototype.getDistinctId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this + */ +proto.teleport.terminal.v1.ReportEventRequest.prototype.setDistinctId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 2; + * @return {?proto.google.protobuf.Timestamp} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getLoginEvent = function() { - return /** @type{?proto.teleport.terminal.v1.LoginEvent} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.LoginEvent, 1)); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); }; /** - * @param {?proto.teleport.terminal.v1.LoginEvent|undefined} value - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.setLoginEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0], value); +proto.teleport.terminal.v1.ReportEventRequest.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearLoginEvent = function() { - return this.setLoginEvent(undefined); +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); }; @@ -2290,36 +381,54 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearLoginEvent = fu * Returns whether this field is set. * @return {boolean} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.hasLoginEvent = function() { - return jspb.Message.getField(this, 1) != null; +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string auth_cluster_id = 3; + * @return {string} + */ +proto.teleport.terminal.v1.ReportEventRequest.prototype.getAuthClusterId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this + */ +proto.teleport.terminal.v1.ReportEventRequest.prototype.setAuthClusterId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional ProtocolRunEvent protocol_run_event = 2; - * @return {?proto.teleport.terminal.v1.ProtocolRunEvent} + * optional prehog.v1alpha.ConnectLoginEvent connect_login = 4; + * @return {?proto.prehog.v1alpha.ConnectLoginEvent} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getProtocolRunEvent = function() { - return /** @type{?proto.teleport.terminal.v1.ProtocolRunEvent} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.ProtocolRunEvent, 2)); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getConnectLogin = function() { + return /** @type{?proto.prehog.v1alpha.ConnectLoginEvent} */ ( + jspb.Message.getWrapperField(this, prehog_v1alpha_connect_pb.ConnectLoginEvent, 4)); }; /** - * @param {?proto.teleport.terminal.v1.ProtocolRunEvent|undefined} value - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @param {?proto.prehog.v1alpha.ConnectLoginEvent|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.setProtocolRunEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0], value); +proto.teleport.terminal.v1.ReportEventRequest.prototype.setConnectLogin = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearProtocolRunEvent = function() { - return this.setProtocolRunEvent(undefined); +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearConnectLogin = function() { + return this.setConnectLogin(undefined); }; @@ -2327,36 +436,36 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearProtocolRunEven * Returns whether this field is set. * @return {boolean} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.hasProtocolRunEvent = function() { - return jspb.Message.getField(this, 2) != null; +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasConnectLogin = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional AccessRequestCreateEvent access_request_create_event = 3; - * @return {?proto.teleport.terminal.v1.AccessRequestCreateEvent} + * optional prehog.v1alpha.ConnectProtocolRunEvent connect_protocol_run = 5; + * @return {?proto.prehog.v1alpha.ConnectProtocolRunEvent} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getAccessRequestCreateEvent = function() { - return /** @type{?proto.teleport.terminal.v1.AccessRequestCreateEvent} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.AccessRequestCreateEvent, 3)); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getConnectProtocolRun = function() { + return /** @type{?proto.prehog.v1alpha.ConnectProtocolRunEvent} */ ( + jspb.Message.getWrapperField(this, prehog_v1alpha_connect_pb.ConnectProtocolRunEvent, 5)); }; /** - * @param {?proto.teleport.terminal.v1.AccessRequestCreateEvent|undefined} value - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @param {?proto.prehog.v1alpha.ConnectProtocolRunEvent|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.setAccessRequestCreateEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0], value); +proto.teleport.terminal.v1.ReportEventRequest.prototype.setConnectProtocolRun = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearAccessRequestCreateEvent = function() { - return this.setAccessRequestCreateEvent(undefined); +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearConnectProtocolRun = function() { + return this.setConnectProtocolRun(undefined); }; @@ -2364,36 +473,36 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearAccessRequestCr * Returns whether this field is set. * @return {boolean} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.hasAccessRequestCreateEvent = function() { - return jspb.Message.getField(this, 3) != null; +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasConnectProtocolRun = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional AccessRequestReviewEvent access_request_review_event = 4; - * @return {?proto.teleport.terminal.v1.AccessRequestReviewEvent} + * optional prehog.v1alpha.ConnectAccessRequestCreateEvent connect_access_request_create = 6; + * @return {?proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getAccessRequestReviewEvent = function() { - return /** @type{?proto.teleport.terminal.v1.AccessRequestReviewEvent} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.AccessRequestReviewEvent, 4)); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getConnectAccessRequestCreate = function() { + return /** @type{?proto.prehog.v1alpha.ConnectAccessRequestCreateEvent} */ ( + jspb.Message.getWrapperField(this, prehog_v1alpha_connect_pb.ConnectAccessRequestCreateEvent, 6)); }; /** - * @param {?proto.teleport.terminal.v1.AccessRequestReviewEvent|undefined} value - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @param {?proto.prehog.v1alpha.ConnectAccessRequestCreateEvent|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.setAccessRequestReviewEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0], value); +proto.teleport.terminal.v1.ReportEventRequest.prototype.setConnectAccessRequestCreate = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearAccessRequestReviewEvent = function() { - return this.setAccessRequestReviewEvent(undefined); +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearConnectAccessRequestCreate = function() { + return this.setConnectAccessRequestCreate(undefined); }; @@ -2401,36 +510,36 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearAccessRequestRe * Returns whether this field is set. * @return {boolean} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.hasAccessRequestReviewEvent = function() { - return jspb.Message.getField(this, 4) != null; +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasConnectAccessRequestCreate = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional AccessRequestAssumeRoleEvent access_request_assume_role_event = 5; - * @return {?proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} + * optional prehog.v1alpha.ConnectAccessRequestReviewEvent connect_access_request_review = 7; + * @return {?proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getAccessRequestAssumeRoleEvent = function() { - return /** @type{?proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent, 5)); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getConnectAccessRequestReview = function() { + return /** @type{?proto.prehog.v1alpha.ConnectAccessRequestReviewEvent} */ ( + jspb.Message.getWrapperField(this, prehog_v1alpha_connect_pb.ConnectAccessRequestReviewEvent, 7)); }; /** - * @param {?proto.teleport.terminal.v1.AccessRequestAssumeRoleEvent|undefined} value - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @param {?proto.prehog.v1alpha.ConnectAccessRequestReviewEvent|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.setAccessRequestAssumeRoleEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0], value); +proto.teleport.terminal.v1.ReportEventRequest.prototype.setConnectAccessRequestReview = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearAccessRequestAssumeRoleEvent = function() { - return this.setAccessRequestAssumeRoleEvent(undefined); +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearConnectAccessRequestReview = function() { + return this.setConnectAccessRequestReview(undefined); }; @@ -2438,36 +547,36 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearAccessRequestAs * Returns whether this field is set. * @return {boolean} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.hasAccessRequestAssumeRoleEvent = function() { - return jspb.Message.getField(this, 5) != null; +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasConnectAccessRequestReview = function() { + return jspb.Message.getField(this, 7) != null; }; /** - * optional FileTransferRunEvent file_transfer_run_event = 6; - * @return {?proto.teleport.terminal.v1.FileTransferRunEvent} + * optional prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent connect_access_request_assume_role = 8; + * @return {?proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getFileTransferRunEvent = function() { - return /** @type{?proto.teleport.terminal.v1.FileTransferRunEvent} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.FileTransferRunEvent, 6)); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getConnectAccessRequestAssumeRole = function() { + return /** @type{?proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent} */ ( + jspb.Message.getWrapperField(this, prehog_v1alpha_connect_pb.ConnectAccessRequestAssumeRoleEvent, 8)); }; /** - * @param {?proto.teleport.terminal.v1.FileTransferRunEvent|undefined} value - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @param {?proto.prehog.v1alpha.ConnectAccessRequestAssumeRoleEvent|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.setFileTransferRunEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0], value); +proto.teleport.terminal.v1.ReportEventRequest.prototype.setConnectAccessRequestAssumeRole = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearFileTransferRunEvent = function() { - return this.setFileTransferRunEvent(undefined); +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearConnectAccessRequestAssumeRole = function() { + return this.setConnectAccessRequestAssumeRole(undefined); }; @@ -2475,36 +584,73 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearFileTransferRun * Returns whether this field is set. * @return {boolean} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.hasFileTransferRunEvent = function() { - return jspb.Message.getField(this, 6) != null; +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasConnectAccessRequestAssumeRole = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional prehog.v1alpha.ConnectFileTransferRunEvent connect_file_transfer_run_event = 9; + * @return {?proto.prehog.v1alpha.ConnectFileTransferRunEvent} + */ +proto.teleport.terminal.v1.ReportEventRequest.prototype.getConnectFileTransferRunEvent = function() { + return /** @type{?proto.prehog.v1alpha.ConnectFileTransferRunEvent} */ ( + jspb.Message.getWrapperField(this, prehog_v1alpha_connect_pb.ConnectFileTransferRunEvent, 9)); +}; + + +/** + * @param {?proto.prehog.v1alpha.ConnectFileTransferRunEvent|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this +*/ +proto.teleport.terminal.v1.ReportEventRequest.prototype.setConnectFileTransferRunEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this + */ +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearConnectFileTransferRunEvent = function() { + return this.setConnectFileTransferRunEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasConnectFileTransferRunEvent = function() { + return jspb.Message.getField(this, 9) != null; }; /** - * optional UserJobRoleUpdateEvent user_job_role_update_event = 7; - * @return {?proto.teleport.terminal.v1.UserJobRoleUpdateEvent} + * optional prehog.v1alpha.ConnectUserJobRoleUpdateEvent connect_user_job_role_update_event = 10; + * @return {?proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.getUserJobRoleUpdateEvent = function() { - return /** @type{?proto.teleport.terminal.v1.UserJobRoleUpdateEvent} */ ( - jspb.Message.getWrapperField(this, proto.teleport.terminal.v1.UserJobRoleUpdateEvent, 7)); +proto.teleport.terminal.v1.ReportEventRequest.prototype.getConnectUserJobRoleUpdateEvent = function() { + return /** @type{?proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent} */ ( + jspb.Message.getWrapperField(this, prehog_v1alpha_connect_pb.ConnectUserJobRoleUpdateEvent, 10)); }; /** - * @param {?proto.teleport.terminal.v1.UserJobRoleUpdateEvent|undefined} value - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @param {?proto.prehog.v1alpha.ConnectUserJobRoleUpdateEvent|undefined} value + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.setUserJobRoleUpdateEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 7, proto.teleport.terminal.v1.ConnectUsageEventOneOf.oneofGroups_[0], value); +proto.teleport.terminal.v1.ReportEventRequest.prototype.setConnectUserJobRoleUpdateEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.teleport.terminal.v1.ReportEventRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.teleport.terminal.v1.ConnectUsageEventOneOf} returns this + * @return {!proto.teleport.terminal.v1.ReportEventRequest} returns this */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearUserJobRoleUpdateEvent = function() { - return this.setUserJobRoleUpdateEvent(undefined); +proto.teleport.terminal.v1.ReportEventRequest.prototype.clearConnectUserJobRoleUpdateEvent = function() { + return this.setConnectUserJobRoleUpdateEvent(undefined); }; @@ -2512,8 +658,109 @@ proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.clearUserJobRoleUpda * Returns whether this field is set. * @return {boolean} */ -proto.teleport.terminal.v1.ConnectUsageEventOneOf.prototype.hasUserJobRoleUpdateEvent = function() { - return jspb.Message.getField(this, 7) != null; +proto.teleport.terminal.v1.ReportEventRequest.prototype.hasConnectUserJobRoleUpdateEvent = function() { + return jspb.Message.getField(this, 10) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.teleport.terminal.v1.EventReportedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.teleport.terminal.v1.EventReportedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.teleport.terminal.v1.EventReportedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.teleport.terminal.v1.EventReportedResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.teleport.terminal.v1.EventReportedResponse} + */ +proto.teleport.terminal.v1.EventReportedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.teleport.terminal.v1.EventReportedResponse; + return proto.teleport.terminal.v1.EventReportedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.teleport.terminal.v1.EventReportedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.teleport.terminal.v1.EventReportedResponse} + */ +proto.teleport.terminal.v1.EventReportedResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.teleport.terminal.v1.EventReportedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.teleport.terminal.v1.EventReportedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.teleport.terminal.v1.EventReportedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.teleport.terminal.v1.EventReportedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; diff --git a/packages/teleterm/src/ui/services/usageEvent/usageEventService.ts b/packages/teleterm/src/ui/services/usageEvent/usageEventService.ts index 82a48e546..bb0a1c88c 100644 --- a/packages/teleterm/src/ui/services/usageEvent/usageEventService.ts +++ b/packages/teleterm/src/ui/services/usageEvent/usageEventService.ts @@ -15,11 +15,7 @@ */ import { ClusterOrResourceUri, ClusterUri, routing } from 'teleterm/ui/uri'; -import { - Cluster, - ReportEventRequest, - TshClient, -} from 'teleterm/services/tshd/types'; +import { Cluster, UsageEvent, TshClient } from 'teleterm/services/tshd/types'; import { RuntimeSettings } from 'teleterm/mainProcess/types'; import { ConfigService } from 'teleterm/services/config'; import Logger from 'teleterm/logger'; @@ -39,9 +35,10 @@ export class UsageEventService { if (!clusterParams) { return; } - return this.reportUsageEvent({ - loginEvent: { - clusterProperties: clusterParams, + return this.reportUsageEvent(clusterParams.authClusterId, { + connectLogin: { + clusterName: clusterParams.clusterName, + userName: clusterParams.userName, arch: this.runtimeSettings.arch, os: this.runtimeSettings.platform, osVersion: this.runtimeSettings.osVersion, @@ -58,9 +55,10 @@ export class UsageEventService { if (!clusterProperties) { return; } - return this.reportUsageEvent({ - protocolRunEvent: { - clusterProperties, + return this.reportUsageEvent(clusterProperties.authClusterId, { + connectProtocolRun: { + clusterName: clusterProperties.clusterName, + userName: clusterProperties.userName, protocol, }, }); @@ -74,9 +72,10 @@ export class UsageEventService { if (!clusterProperties) { return; } - return this.reportUsageEvent({ - accessRequestCreateEvent: { - clusterProperties, + return this.reportUsageEvent(clusterProperties.authClusterId, { + connectAccessRequestCreate: { + clusterName: clusterProperties.clusterName, + userName: clusterProperties.userName, kind, }, }); @@ -87,9 +86,10 @@ export class UsageEventService { if (!clusterProperties) { return; } - return this.reportUsageEvent({ - accessRequestReviewEvent: { - clusterProperties, + return this.reportUsageEvent(clusterProperties.authClusterId, { + connectAccessRequestReview: { + clusterName: clusterProperties.clusterName, + userName: clusterProperties.userName, }, }); } @@ -99,9 +99,10 @@ export class UsageEventService { if (!clusterProperties) { return; } - return this.reportUsageEvent({ - accessRequestAssumeRoleEvent: { - clusterProperties, + return this.reportUsageEvent(clusterProperties.authClusterId, { + connectAccessRequestAssumeRole: { + clusterName: clusterProperties.clusterName, + userName: clusterProperties.userName, }, }); } @@ -114,23 +115,31 @@ export class UsageEventService { if (!clusterProperties) { return; } - return this.reportUsageEvent({ - fileTransferRunEvent: { - clusterProperties, + return this.reportUsageEvent(clusterProperties.authClusterId, { + connectFileTransferRunEvent: { + clusterName: clusterProperties.clusterName, + userName: clusterProperties.userName, direction, }, }); } captureUserJobRoleUpdate(jobRole: string): Promise { - return this.reportUsageEvent({ - userJobRoleUpdateEvent: { + return this.reportAnonymousUsageEvent({ + connectUserJobRoleUpdateEvent: { jobRole, }, }); } - private reportUsageEvent(event: ReportEventRequest['event']): Promise { + private reportAnonymousUsageEvent(event: UsageEvent): Promise { + return this.reportUsageEvent('', event); + } + + private reportUsageEvent( + authClusterId: string, + event: UsageEvent + ): Promise { const isCollectingUsageMetricsEnabled = this.configService.get( 'usageMetrics.enabled' ).value; @@ -143,9 +152,10 @@ export class UsageEventService { } return this.tshClient.reportUsageEvent({ + ...event, + authClusterId, distinctId: `connect.${this.runtimeSettings.installationId}`, timestamp: new Date(), - event, }); }