import { StartJourneyRequest, StartJourneyResponse, JourneyProgressRequest, JourneyProgressResponse, JourneyInteractionRequest, JourneyInteractionResponse, EndJourneyRequest, EndJourneyResponse, } from './telemetry.js';
export class TelemetryPluginClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.StartJourney.bind(this);
        this.JourneyProgress.bind(this);
        this.JourneyInteraction.bind(this);
        this.EndJourney.bind(this);
    }
    StartJourney(request) {
        const data = StartJourneyRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'StartJourney', 'application/json', data);
        return promise.then((data) => StartJourneyResponse.fromJSON(data));
    }
    JourneyProgress(request) {
        const data = JourneyProgressRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'JourneyProgress', 'application/json', data);
        return promise.then((data) => JourneyProgressResponse.fromJSON(data));
    }
    JourneyInteraction(request) {
        const data = JourneyInteractionRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'JourneyInteraction', 'application/json', data);
        return promise.then((data) => JourneyInteractionResponse.fromJSON(data));
    }
    EndJourney(request) {
        const data = EndJourneyRequest.toJSON(request);
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'EndJourney', 'application/json', data);
        return promise.then((data) => EndJourneyResponse.fromJSON(data));
    }
}
export class TelemetryPluginClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.StartJourney.bind(this);
        this.JourneyProgress.bind(this);
        this.JourneyInteraction.bind(this);
        this.EndJourney.bind(this);
    }
    StartJourney(request) {
        const data = StartJourneyRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'StartJourney', 'application/protobuf', data);
        return promise.then((data) => StartJourneyResponse.decode(data));
    }
    JourneyProgress(request) {
        const data = JourneyProgressRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'JourneyProgress', 'application/protobuf', data);
        return promise.then((data) => JourneyProgressResponse.decode(data));
    }
    JourneyInteraction(request) {
        const data = JourneyInteractionRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'JourneyInteraction', 'application/protobuf', data);
        return promise.then((data) => JourneyInteractionResponse.decode(data));
    }
    EndJourney(request) {
        const data = EndJourneyRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.plugin.telemetry.TelemetryPlugin', 'EndJourney', 'application/protobuf', data);
        return promise.then((data) => EndJourneyResponse.decode(data));
    }
}
