import { CacheContextActionsRequest, PurgeResult, AccessKeyPurgeRequest, InstallationsPurgeRequest, InstallationPurgeRequest, AppVersionPurgeRequest, AppPurgeRequest, AppVersionPublishStatusPurgeRequest, CuratedGamesPurgeRequest, PurgeAllRequest, AcceptInviteRequest, AcceptInviteResponse, } from './utilities.js';
export class CacheUtilsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.CacheContextActionsInRuntimeDb.bind(this);
        this.PurgeAccessKey.bind(this);
        this.PurgeInstallations.bind(this);
        this.PurgeInstallation.bind(this);
        this.PurgeAppVersion.bind(this);
        this.PurgeApp.bind(this);
        this.PurgeAppVersionPublishStatus.bind(this);
        this.PurgeCuratedGames.bind(this);
        this.PurgeAll.bind(this);
    }
    CacheContextActionsInRuntimeDb(request) {
        const data = CacheContextActionsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'CacheContextActionsInRuntimeDb', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeAccessKey(request) {
        const data = AccessKeyPurgeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAccessKey', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeInstallations(request) {
        const data = InstallationsPurgeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeInstallations', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeInstallation(request) {
        const data = InstallationPurgeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeInstallation', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeAppVersion(request) {
        const data = AppVersionPurgeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAppVersion', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeApp(request) {
        const data = AppPurgeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeApp', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeAppVersionPublishStatus(request) {
        const data = AppVersionPublishStatusPurgeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAppVersionPublishStatus', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeCuratedGames(request) {
        const data = CuratedGamesPurgeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeCuratedGames', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
    PurgeAll(request) {
        const data = PurgeAllRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAll', 'application/json', data);
        return promise.then((data) => PurgeResult.fromJSON(data));
    }
}
export class CacheUtilsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.CacheContextActionsInRuntimeDb.bind(this);
        this.PurgeAccessKey.bind(this);
        this.PurgeInstallations.bind(this);
        this.PurgeInstallation.bind(this);
        this.PurgeAppVersion.bind(this);
        this.PurgeApp.bind(this);
        this.PurgeAppVersionPublishStatus.bind(this);
        this.PurgeCuratedGames.bind(this);
        this.PurgeAll.bind(this);
    }
    CacheContextActionsInRuntimeDb(request) {
        const data = CacheContextActionsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'CacheContextActionsInRuntimeDb', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeAccessKey(request) {
        const data = AccessKeyPurgeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAccessKey', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeInstallations(request) {
        const data = InstallationsPurgeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeInstallations', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeInstallation(request) {
        const data = InstallationPurgeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeInstallation', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeAppVersion(request) {
        const data = AppVersionPurgeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAppVersion', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeApp(request) {
        const data = AppPurgeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeApp', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeAppVersionPublishStatus(request) {
        const data = AppVersionPublishStatusPurgeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAppVersionPublishStatus', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeCuratedGames(request) {
        const data = CuratedGamesPurgeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeCuratedGames', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
    PurgeAll(request) {
        const data = PurgeAllRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.CacheUtils', 'PurgeAll', 'application/protobuf', data);
        return promise.then((data) => PurgeResult.decode(data));
    }
}
export class ModInviteUtilsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.AcceptInvite.bind(this);
    }
    AcceptInvite(request) {
        const data = AcceptInviteRequest.toJSON(request);
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.ModInviteUtils', 'AcceptInvite', 'application/json', data);
        return promise.then((data) => AcceptInviteResponse.fromJSON(data));
    }
}
export class ModInviteUtilsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.AcceptInvite.bind(this);
    }
    AcceptInvite(request) {
        const data = AcceptInviteRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.gateway.utils.v1alpha.ModInviteUtils', 'AcceptInvite', 'application/protobuf', data);
        return promise.then((data) => AcceptInviteResponse.decode(data));
    }
}
