import { AppCreationRequest, AppSearchRequest, AppSearchResponse, GetAppBySlugRequest, FullAppInfo, GetAllWithOwnerRequest, GetPopularAppsRequest, CheckIfMediaExistsRequest, CheckIfMediaExistsResponse, UploadNewMediaRequest, UploadNewMediaResponse, AppUpdateRequest, DisableAppRequest, EnableAppRequest, AppExistsRequest, AppExistsResponse, AppAccountExistsRequest, AppAccountExistsResponse, CreateAppAccountRequest, CreateAppAccountResponse, RecoverAppAccountRequest, } from './app/app.js';
import { AppInfo, MultipleAppInfos } from './app/info/app_info.js';
import { UUID } from '../uuid.js';
import { GetAllWithInstallLocationRequest, GetAllWithInstallerRequest, InstallationCreationRequest, FullInstallationInfo, GetByAppNameAndInstallLocationRequest, MultipleInstallationsResponse, GetAllWithVersionUUIDRequest, GetAllWithAppRequest, GetAllWithAppResponse, GetInstallationHistoryRequest, GetInstallationHistoryResponse, InstallationUpgradeRequest, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse, InstallationUpdateRequest, } from './installation/installation.js';
import { Empty } from '../../google/protobuf/empty.js';
import { AppCategoryNodeListResponse } from './app/categories/categories.js';
import { AppVersionCreationRequest, FullAppVersionInfo, AppSlugAndVersion, AppVersionUpdateRequest, ValidInstallLocationsRequest, ValidInstallLocationsResponse, GetAppVersionBundleResponse, } from './app_version/app_version.js';
import { AppVersionInfo } from './app_version/info/app_version_info.js';
import { GetNutritionByNameVersionRequest, MultipleNutritionCategories, } from './nutrition/nutrition.js';
import { ProductList } from './payments/product.js';
import { CreateFeedbackRequest } from './feedback/feedback.js';
import { CreateDataTokenRequest, CreateDataTokenResponse, GetDataTokenByIdRequest, GetDataTokenByIdResponse, GetDataTokensByOrganizationNameRequest, GetDataTokensByOrganizationNameResponse, RevokeDataTokenByIdRequest, RevokeDataTokenByIdResponse, } from './data_api/admin/auth/auth.js';
import { CreateDataSubscriptionRequest, CreateDataSubscriptionResponse, GetDataSubscriptionByIdRequest, GetDataSubscriptionByIdResponse, GetDataSubscriptionsByOrganizationNameRequest, GetDataSubscriptionsByOrganizationNameResponse, UpdateDataSubscriptionRequest, UpdateDataSubscriptionResponse, DeleteDataSubscriptionRequest, DeleteDataSubscriptionResponse, } from './data_api/admin/subscription/subscription.js';
import { CreateOrganizationRequest, CreateOrganizationResponse, GetOrganizationByNameRequest, GetOrganizationByNameResponse, GetOrganizationsRequest, GetOrganizationsResponse, UpdateOrganizationRequest, UpdateOrganizationResponse, } from './data_api/admin/organization/organization.js';
import { GetAuditLogEventsRequest, GetAuditLogEventsResponse, } from './data_api/admin/audit/audit.js';
import { AddUsersToOrgRequest, AddUsersToOrgResponse, GetUsersByOrgIdRequest, GetUsersByOrgIdResponse, GetUserByIdRequest, GetUserByIdResponse, DeleteUserRequest, DeleteUserResponse, } from './data_api/admin/user/user.js';
import { CreateResearchOrganizationRequest, CreateResearchOrganizationResponse, GetResearchOrganizationsRequest, GetResearchOrganizationsResponse, UpdateResearchOrganizationByIdRequest, UpdateResearchOrganizationResponse, GetResearchOrganizationByIdRequest, GetResearchOrganizationByIdResponse, DeleteResearchOrganizationRequest, DeleteResearchOrganizationResponse, } from '../data/api/admin/rfr/research_organization.js';
import { CreateResearcherRequest, CreateResearcherResponse, GetResearchersRequest, GetResearchersResponse, GetResearcherByIdRequest, GetResearcherByIdResponse, GetResearchersByOrganizationIdRequest, GetResearchersByOrganizationIdResponse, DeleteResearcherRequest, DeleteResearcherResponse, } from '../data/api/admin/rfr/researcher.js';
import { Value } from '../../google/protobuf/struct.js';
import { GetInstallationSettingsFormRequest, GetInstallationSettingsFormResponse, ValidateInstallationSettingsFormRequest, ValidateInstallationSettingsFormResponse, GetInstallationSettingsRequest, GetInstallationSettingsResponse, UpdateInstallationSettingsRequest, UpdateInstallationSettingsResponse, } from './installation_settings/installation_settings.js';
import { GetAppSettingsFormRequest, GetAppSettingsFormResponse, ValidateAppSettingsFormRequest, ValidateAppSettingsFormResponse, GetAppSettingsRequest, GetAppSettingsResponse, UpdateAppSettingsRequest, UpdateAppSettingsResponse, } from './app_settings/app_settings.js';
import { GetPaymentsVerificationStatusRequest, GetPaymentsVerificationStatusResponse, } from './payments/payments_verification.js';
import { AppPRCreateRequest, AppPRUpdateRequest, AppPRGetRequest, FullPublishRequestInfo, AppPRFindManyRequest, MultiplePublishRequestInfos, } from './app_publish_request/app_publish_request.js';
import { AppPRSetReviewDecisionRequest } from './app_publish_request/review/app_publish_request_review.js';
import { AppPRAddNoteRequest, AppPRUpdateNoteRequest, } from './app_publish_request/note/app_publish_request_note.js';
import { AppPRListModmailConversationsRequest, AppPRListModmailConversationsResponse, AppPRSetReviewDecisionWithModmailRequest, AppPRSetReviewDecisionWithModmailResponse, } from './app_publish_request/modmail/app_publish_request_modmail.js';
import { DeveloperAccountRegisterUserRequest, DeveloperAccountInfo, GetUserAccountInfoResponse, } from './developer_account/developer_account.js';
export class AppClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
        this.Search.bind(this);
        this.GetBySlug.bind(this);
        this.GetByUUID.bind(this);
        this.GetAllWithLocation.bind(this);
        this.GetAllWithInstaller.bind(this);
        this.GetAllWithOwner.bind(this);
        this.GetPopularApps.bind(this);
        this.CheckIfMediaExists.bind(this);
        this.UploadNewMedia.bind(this);
        this.Update.bind(this);
        this.Disable.bind(this);
        this.Enable.bind(this);
        this.Exists.bind(this);
        this.AppAccountExists.bind(this);
        this.CreateAppAccount.bind(this);
        this.RecoverAppAccount.bind(this);
        this.GetAllCategories.bind(this);
    }
    Create(request) {
        const data = AppCreationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'Create', 'application/json', data);
        return promise.then((data) => AppInfo.fromJSON(data));
    }
    Search(request) {
        const data = AppSearchRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'Search', 'application/json', data);
        return promise.then((data) => AppSearchResponse.fromJSON(data));
    }
    GetBySlug(request) {
        const data = GetAppBySlugRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetBySlug', 'application/json', data);
        return promise.then((data) => FullAppInfo.fromJSON(data));
    }
    GetByUUID(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetByUUID', 'application/json', data);
        return promise.then((data) => FullAppInfo.fromJSON(data));
    }
    GetAllWithLocation(request) {
        const data = GetAllWithInstallLocationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllWithLocation', 'application/json', data);
        return promise.then((data) => MultipleAppInfos.fromJSON(data));
    }
    GetAllWithInstaller(request) {
        const data = GetAllWithInstallerRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllWithInstaller', 'application/json', data);
        return promise.then((data) => MultipleAppInfos.fromJSON(data));
    }
    GetAllWithOwner(request) {
        const data = GetAllWithOwnerRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllWithOwner', 'application/json', data);
        return promise.then((data) => MultipleAppInfos.fromJSON(data));
    }
    GetPopularApps(request) {
        const data = GetPopularAppsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetPopularApps', 'application/json', data);
        return promise.then((data) => MultipleAppInfos.fromJSON(data));
    }
    CheckIfMediaExists(request) {
        const data = CheckIfMediaExistsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'CheckIfMediaExists', 'application/json', data);
        return promise.then((data) => CheckIfMediaExistsResponse.fromJSON(data));
    }
    UploadNewMedia(request) {
        const data = UploadNewMediaRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'UploadNewMedia', 'application/json', data);
        return promise.then((data) => UploadNewMediaResponse.fromJSON(data));
    }
    Update(request) {
        const data = AppUpdateRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'Update', 'application/json', data);
        return promise.then((data) => FullAppInfo.fromJSON(data));
    }
    Disable(request) {
        const data = DisableAppRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'Disable', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Enable(request) {
        const data = EnableAppRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'Enable', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Exists(request) {
        const data = AppExistsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'Exists', 'application/json', data);
        return promise.then((data) => AppExistsResponse.fromJSON(data));
    }
    AppAccountExists(request) {
        const data = AppAccountExistsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'AppAccountExists', 'application/json', data);
        return promise.then((data) => AppAccountExistsResponse.fromJSON(data));
    }
    CreateAppAccount(request) {
        const data = CreateAppAccountRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'CreateAppAccount', 'application/json', data);
        return promise.then((data) => CreateAppAccountResponse.fromJSON(data));
    }
    RecoverAppAccount(request) {
        const data = RecoverAppAccountRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'RecoverAppAccount', 'application/json', data);
        return promise.then((data) => AppInfo.fromJSON(data));
    }
    GetAllCategories(request) {
        const data = Empty.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllCategories', 'application/json', data);
        return promise.then((data) => AppCategoryNodeListResponse.fromJSON(data));
    }
}
export class AppClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
        this.Search.bind(this);
        this.GetBySlug.bind(this);
        this.GetByUUID.bind(this);
        this.GetAllWithLocation.bind(this);
        this.GetAllWithInstaller.bind(this);
        this.GetAllWithOwner.bind(this);
        this.GetPopularApps.bind(this);
        this.CheckIfMediaExists.bind(this);
        this.UploadNewMedia.bind(this);
        this.Update.bind(this);
        this.Disable.bind(this);
        this.Enable.bind(this);
        this.Exists.bind(this);
        this.AppAccountExists.bind(this);
        this.CreateAppAccount.bind(this);
        this.RecoverAppAccount.bind(this);
        this.GetAllCategories.bind(this);
    }
    Create(request) {
        const data = AppCreationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'Create', 'application/protobuf', data);
        return promise.then((data) => AppInfo.decode(data));
    }
    Search(request) {
        const data = AppSearchRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'Search', 'application/protobuf', data);
        return promise.then((data) => AppSearchResponse.decode(data));
    }
    GetBySlug(request) {
        const data = GetAppBySlugRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetBySlug', 'application/protobuf', data);
        return promise.then((data) => FullAppInfo.decode(data));
    }
    GetByUUID(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetByUUID', 'application/protobuf', data);
        return promise.then((data) => FullAppInfo.decode(data));
    }
    GetAllWithLocation(request) {
        const data = GetAllWithInstallLocationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllWithLocation', 'application/protobuf', data);
        return promise.then((data) => MultipleAppInfos.decode(data));
    }
    GetAllWithInstaller(request) {
        const data = GetAllWithInstallerRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllWithInstaller', 'application/protobuf', data);
        return promise.then((data) => MultipleAppInfos.decode(data));
    }
    GetAllWithOwner(request) {
        const data = GetAllWithOwnerRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllWithOwner', 'application/protobuf', data);
        return promise.then((data) => MultipleAppInfos.decode(data));
    }
    GetPopularApps(request) {
        const data = GetPopularAppsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetPopularApps', 'application/protobuf', data);
        return promise.then((data) => MultipleAppInfos.decode(data));
    }
    CheckIfMediaExists(request) {
        const data = CheckIfMediaExistsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'CheckIfMediaExists', 'application/protobuf', data);
        return promise.then((data) => CheckIfMediaExistsResponse.decode(data));
    }
    UploadNewMedia(request) {
        const data = UploadNewMediaRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'UploadNewMedia', 'application/protobuf', data);
        return promise.then((data) => UploadNewMediaResponse.decode(data));
    }
    Update(request) {
        const data = AppUpdateRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'Update', 'application/protobuf', data);
        return promise.then((data) => FullAppInfo.decode(data));
    }
    Disable(request) {
        const data = DisableAppRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'Disable', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Enable(request) {
        const data = EnableAppRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'Enable', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Exists(request) {
        const data = AppExistsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'Exists', 'application/protobuf', data);
        return promise.then((data) => AppExistsResponse.decode(data));
    }
    AppAccountExists(request) {
        const data = AppAccountExistsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'AppAccountExists', 'application/protobuf', data);
        return promise.then((data) => AppAccountExistsResponse.decode(data));
    }
    CreateAppAccount(request) {
        const data = CreateAppAccountRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'CreateAppAccount', 'application/protobuf', data);
        return promise.then((data) => CreateAppAccountResponse.decode(data));
    }
    RecoverAppAccount(request) {
        const data = RecoverAppAccountRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'RecoverAppAccount', 'application/protobuf', data);
        return promise.then((data) => AppInfo.decode(data));
    }
    GetAllCategories(request) {
        const data = Empty.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.App', 'GetAllCategories', 'application/protobuf', data);
        return promise.then((data) => AppCategoryNodeListResponse.decode(data));
    }
}
export class AppVersionClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
        this.Get.bind(this);
        this.GetBySlugAndVersionNumber.bind(this);
        this.Update.bind(this);
        this.GetValidInstallLocations.bind(this);
        this.GetAppVersionBundle.bind(this);
        this.GetNutritionByNameVersion.bind(this);
        this.GetNutritionByAppVersionId.bind(this);
        this.GetProductsByAppVersionId.bind(this);
    }
    Create(request) {
        const data = AppVersionCreationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'Create', 'application/json', data);
        return promise.then((data) => AppVersionInfo.fromJSON(data));
    }
    Get(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'Get', 'application/json', data);
        return promise.then((data) => FullAppVersionInfo.fromJSON(data));
    }
    GetBySlugAndVersionNumber(request) {
        const data = AppSlugAndVersion.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetBySlugAndVersionNumber', 'application/json', data);
        return promise.then((data) => FullAppVersionInfo.fromJSON(data));
    }
    Update(request) {
        const data = AppVersionUpdateRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'Update', 'application/json', data);
        return promise.then((data) => FullAppVersionInfo.fromJSON(data));
    }
    GetValidInstallLocations(request) {
        const data = ValidInstallLocationsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetValidInstallLocations', 'application/json', data);
        return promise.then((data) => ValidInstallLocationsResponse.fromJSON(data));
    }
    GetAppVersionBundle(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetAppVersionBundle', 'application/json', data);
        return promise.then((data) => GetAppVersionBundleResponse.fromJSON(data));
    }
    GetNutritionByNameVersion(request) {
        const data = GetNutritionByNameVersionRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetNutritionByNameVersion', 'application/json', data);
        return promise.then((data) => MultipleNutritionCategories.fromJSON(data));
    }
    GetNutritionByAppVersionId(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetNutritionByAppVersionId', 'application/json', data);
        return promise.then((data) => MultipleNutritionCategories.fromJSON(data));
    }
    GetProductsByAppVersionId(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetProductsByAppVersionId', 'application/json', data);
        return promise.then((data) => ProductList.fromJSON(data));
    }
}
export class AppVersionClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
        this.Get.bind(this);
        this.GetBySlugAndVersionNumber.bind(this);
        this.Update.bind(this);
        this.GetValidInstallLocations.bind(this);
        this.GetAppVersionBundle.bind(this);
        this.GetNutritionByNameVersion.bind(this);
        this.GetNutritionByAppVersionId.bind(this);
        this.GetProductsByAppVersionId.bind(this);
    }
    Create(request) {
        const data = AppVersionCreationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'Create', 'application/protobuf', data);
        return promise.then((data) => AppVersionInfo.decode(data));
    }
    Get(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'Get', 'application/protobuf', data);
        return promise.then((data) => FullAppVersionInfo.decode(data));
    }
    GetBySlugAndVersionNumber(request) {
        const data = AppSlugAndVersion.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetBySlugAndVersionNumber', 'application/protobuf', data);
        return promise.then((data) => FullAppVersionInfo.decode(data));
    }
    Update(request) {
        const data = AppVersionUpdateRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'Update', 'application/protobuf', data);
        return promise.then((data) => FullAppVersionInfo.decode(data));
    }
    GetValidInstallLocations(request) {
        const data = ValidInstallLocationsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetValidInstallLocations', 'application/protobuf', data);
        return promise.then((data) => ValidInstallLocationsResponse.decode(data));
    }
    GetAppVersionBundle(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetAppVersionBundle', 'application/protobuf', data);
        return promise.then((data) => GetAppVersionBundleResponse.decode(data));
    }
    GetNutritionByNameVersion(request) {
        const data = GetNutritionByNameVersionRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetNutritionByNameVersion', 'application/protobuf', data);
        return promise.then((data) => MultipleNutritionCategories.decode(data));
    }
    GetNutritionByAppVersionId(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetNutritionByAppVersionId', 'application/protobuf', data);
        return promise.then((data) => MultipleNutritionCategories.decode(data));
    }
    GetProductsByAppVersionId(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.AppVersion', 'GetProductsByAppVersionId', 'application/protobuf', data);
        return promise.then((data) => ProductList.decode(data));
    }
}
export class InstallationsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
        this.GetByUUID.bind(this);
        this.GetByAppNameAndInstallLocation.bind(this);
        this.GetAllWithInstallLocation.bind(this);
        this.GetAllWithInstaller.bind(this);
        this.GetAllWithVersionUUID.bind(this);
        this.GetAllWithApp.bind(this);
        this.GetInstallationHistory.bind(this);
        this.Upgrade.bind(this);
        this.UpgradeMany.bind(this);
        this.Update.bind(this);
        this.Remove.bind(this);
    }
    Create(request) {
        const data = InstallationCreationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Create', 'application/json', data);
        return promise.then((data) => FullInstallationInfo.fromJSON(data));
    }
    GetByUUID(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetByUUID', 'application/json', data);
        return promise.then((data) => FullInstallationInfo.fromJSON(data));
    }
    GetByAppNameAndInstallLocation(request) {
        const data = GetByAppNameAndInstallLocationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetByAppNameAndInstallLocation', 'application/json', data);
        return promise.then((data) => FullInstallationInfo.fromJSON(data));
    }
    GetAllWithInstallLocation(request) {
        const data = GetAllWithInstallLocationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithInstallLocation', 'application/json', data);
        return promise.then((data) => MultipleInstallationsResponse.fromJSON(data));
    }
    GetAllWithInstaller(request) {
        const data = GetAllWithInstallerRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithInstaller', 'application/json', data);
        return promise.then((data) => MultipleInstallationsResponse.fromJSON(data));
    }
    GetAllWithVersionUUID(request) {
        const data = GetAllWithVersionUUIDRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithVersionUUID', 'application/json', data);
        return promise.then((data) => MultipleInstallationsResponse.fromJSON(data));
    }
    GetAllWithApp(request) {
        const data = GetAllWithAppRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithApp', 'application/json', data);
        return promise.then((data) => GetAllWithAppResponse.fromJSON(data));
    }
    GetInstallationHistory(request) {
        const data = GetInstallationHistoryRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetInstallationHistory', 'application/json', data);
        return promise.then((data) => GetInstallationHistoryResponse.fromJSON(data));
    }
    Upgrade(request) {
        const data = InstallationUpgradeRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Upgrade', 'application/json', data);
        return promise.then((data) => FullInstallationInfo.fromJSON(data));
    }
    UpgradeMany(request) {
        const data = InstallationUpgradeManyRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'UpgradeMany', 'application/json', data);
        return promise.then((data) => InstallationUpgradeManyResponse.fromJSON(data));
    }
    Update(request) {
        const data = InstallationUpdateRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Update', 'application/json', data);
        return promise.then((data) => FullInstallationInfo.fromJSON(data));
    }
    Remove(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Remove', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
}
export class InstallationsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
        this.GetByUUID.bind(this);
        this.GetByAppNameAndInstallLocation.bind(this);
        this.GetAllWithInstallLocation.bind(this);
        this.GetAllWithInstaller.bind(this);
        this.GetAllWithVersionUUID.bind(this);
        this.GetAllWithApp.bind(this);
        this.GetInstallationHistory.bind(this);
        this.Upgrade.bind(this);
        this.UpgradeMany.bind(this);
        this.Update.bind(this);
        this.Remove.bind(this);
    }
    Create(request) {
        const data = InstallationCreationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Create', 'application/protobuf', data);
        return promise.then((data) => FullInstallationInfo.decode(data));
    }
    GetByUUID(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetByUUID', 'application/protobuf', data);
        return promise.then((data) => FullInstallationInfo.decode(data));
    }
    GetByAppNameAndInstallLocation(request) {
        const data = GetByAppNameAndInstallLocationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetByAppNameAndInstallLocation', 'application/protobuf', data);
        return promise.then((data) => FullInstallationInfo.decode(data));
    }
    GetAllWithInstallLocation(request) {
        const data = GetAllWithInstallLocationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithInstallLocation', 'application/protobuf', data);
        return promise.then((data) => MultipleInstallationsResponse.decode(data));
    }
    GetAllWithInstaller(request) {
        const data = GetAllWithInstallerRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithInstaller', 'application/protobuf', data);
        return promise.then((data) => MultipleInstallationsResponse.decode(data));
    }
    GetAllWithVersionUUID(request) {
        const data = GetAllWithVersionUUIDRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithVersionUUID', 'application/protobuf', data);
        return promise.then((data) => MultipleInstallationsResponse.decode(data));
    }
    GetAllWithApp(request) {
        const data = GetAllWithAppRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetAllWithApp', 'application/protobuf', data);
        return promise.then((data) => GetAllWithAppResponse.decode(data));
    }
    GetInstallationHistory(request) {
        const data = GetInstallationHistoryRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'GetInstallationHistory', 'application/protobuf', data);
        return promise.then((data) => GetInstallationHistoryResponse.decode(data));
    }
    Upgrade(request) {
        const data = InstallationUpgradeRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Upgrade', 'application/protobuf', data);
        return promise.then((data) => FullInstallationInfo.decode(data));
    }
    UpgradeMany(request) {
        const data = InstallationUpgradeManyRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'UpgradeMany', 'application/protobuf', data);
        return promise.then((data) => InstallationUpgradeManyResponse.decode(data));
    }
    Update(request) {
        const data = InstallationUpdateRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Update', 'application/protobuf', data);
        return promise.then((data) => FullInstallationInfo.decode(data));
    }
    Remove(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Installations', 'Remove', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
}
export class FeedbackClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
    }
    Create(request) {
        const data = CreateFeedbackRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Feedback', 'Create', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
}
export class FeedbackClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.Create.bind(this);
    }
    Create(request) {
        const data = CreateFeedbackRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Feedback', 'Create', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
}
export class DataApiAdminClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.CreateDataToken.bind(this);
        this.GetDataTokenById.bind(this);
        this.GetDataTokensByOrganizationName.bind(this);
        this.RevokeDataTokenById.bind(this);
        this.CreateDataSubscription.bind(this);
        this.GetDataSubscriptionById.bind(this);
        this.GetDataSubscriptionsByOrganizationName.bind(this);
        this.UpdateDataSubscription.bind(this);
        this.DeleteDataSubscription.bind(this);
        this.CreateOrganization.bind(this);
        this.GetOrganizationByName.bind(this);
        this.GetOrganizations.bind(this);
        this.UpdateOrganization.bind(this);
        this.GetAuditLogEvents.bind(this);
        this.AddUsersToOrg.bind(this);
        this.GetUsersByOrgId.bind(this);
        this.GetUserById.bind(this);
        this.DeleteUser.bind(this);
        this.CreateResearchOrganization.bind(this);
        this.GetResearchOrganizations.bind(this);
        this.UpdateResearchOrganization.bind(this);
        this.GetResearchOrganization.bind(this);
        this.DeleteResearchOrganization.bind(this);
        this.CreateResearcher.bind(this);
        this.GetResearchers.bind(this);
        this.GetResearcher.bind(this);
        this.GetResearchersByOrganizationId.bind(this);
        this.DeleteResearcher.bind(this);
    }
    CreateDataToken(request) {
        const data = CreateDataTokenRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateDataToken', 'application/json', data);
        return promise.then((data) => CreateDataTokenResponse.fromJSON(data));
    }
    GetDataTokenById(request) {
        const data = GetDataTokenByIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataTokenById', 'application/json', data);
        return promise.then((data) => GetDataTokenByIdResponse.fromJSON(data));
    }
    GetDataTokensByOrganizationName(request) {
        const data = GetDataTokensByOrganizationNameRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataTokensByOrganizationName', 'application/json', data);
        return promise.then((data) => GetDataTokensByOrganizationNameResponse.fromJSON(data));
    }
    RevokeDataTokenById(request) {
        const data = RevokeDataTokenByIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'RevokeDataTokenById', 'application/json', data);
        return promise.then((data) => RevokeDataTokenByIdResponse.fromJSON(data));
    }
    CreateDataSubscription(request) {
        const data = CreateDataSubscriptionRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateDataSubscription', 'application/json', data);
        return promise.then((data) => CreateDataSubscriptionResponse.fromJSON(data));
    }
    GetDataSubscriptionById(request) {
        const data = GetDataSubscriptionByIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataSubscriptionById', 'application/json', data);
        return promise.then((data) => GetDataSubscriptionByIdResponse.fromJSON(data));
    }
    GetDataSubscriptionsByOrganizationName(request) {
        const data = GetDataSubscriptionsByOrganizationNameRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataSubscriptionsByOrganizationName', 'application/json', data);
        return promise.then((data) => GetDataSubscriptionsByOrganizationNameResponse.fromJSON(data));
    }
    UpdateDataSubscription(request) {
        const data = UpdateDataSubscriptionRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'UpdateDataSubscription', 'application/json', data);
        return promise.then((data) => UpdateDataSubscriptionResponse.fromJSON(data));
    }
    DeleteDataSubscription(request) {
        const data = DeleteDataSubscriptionRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteDataSubscription', 'application/json', data);
        return promise.then((data) => DeleteDataSubscriptionResponse.fromJSON(data));
    }
    CreateOrganization(request) {
        const data = CreateOrganizationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateOrganization', 'application/json', data);
        return promise.then((data) => CreateOrganizationResponse.fromJSON(data));
    }
    GetOrganizationByName(request) {
        const data = GetOrganizationByNameRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetOrganizationByName', 'application/json', data);
        return promise.then((data) => GetOrganizationByNameResponse.fromJSON(data));
    }
    GetOrganizations(request) {
        const data = GetOrganizationsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetOrganizations', 'application/json', data);
        return promise.then((data) => GetOrganizationsResponse.fromJSON(data));
    }
    UpdateOrganization(request) {
        const data = UpdateOrganizationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'UpdateOrganization', 'application/json', data);
        return promise.then((data) => UpdateOrganizationResponse.fromJSON(data));
    }
    GetAuditLogEvents(request) {
        const data = GetAuditLogEventsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetAuditLogEvents', 'application/json', data);
        return promise.then((data) => GetAuditLogEventsResponse.fromJSON(data));
    }
    AddUsersToOrg(request) {
        const data = AddUsersToOrgRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'AddUsersToOrg', 'application/json', data);
        return promise.then((data) => AddUsersToOrgResponse.fromJSON(data));
    }
    GetUsersByOrgId(request) {
        const data = GetUsersByOrgIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetUsersByOrgId', 'application/json', data);
        return promise.then((data) => GetUsersByOrgIdResponse.fromJSON(data));
    }
    GetUserById(request) {
        const data = GetUserByIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetUserById', 'application/json', data);
        return promise.then((data) => GetUserByIdResponse.fromJSON(data));
    }
    DeleteUser(request) {
        const data = DeleteUserRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteUser', 'application/json', data);
        return promise.then((data) => DeleteUserResponse.fromJSON(data));
    }
    CreateResearchOrganization(request) {
        const data = CreateResearchOrganizationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateResearchOrganization', 'application/json', data);
        return promise.then((data) => CreateResearchOrganizationResponse.fromJSON(data));
    }
    GetResearchOrganizations(request) {
        const data = GetResearchOrganizationsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchOrganizations', 'application/json', data);
        return promise.then((data) => GetResearchOrganizationsResponse.fromJSON(data));
    }
    UpdateResearchOrganization(request) {
        const data = UpdateResearchOrganizationByIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'UpdateResearchOrganization', 'application/json', data);
        return promise.then((data) => UpdateResearchOrganizationResponse.fromJSON(data));
    }
    GetResearchOrganization(request) {
        const data = GetResearchOrganizationByIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchOrganization', 'application/json', data);
        return promise.then((data) => GetResearchOrganizationByIdResponse.fromJSON(data));
    }
    DeleteResearchOrganization(request) {
        const data = DeleteResearchOrganizationRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteResearchOrganization', 'application/json', data);
        return promise.then((data) => DeleteResearchOrganizationResponse.fromJSON(data));
    }
    CreateResearcher(request) {
        const data = CreateResearcherRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateResearcher', 'application/json', data);
        return promise.then((data) => CreateResearcherResponse.fromJSON(data));
    }
    GetResearchers(request) {
        const data = GetResearchersRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchers', 'application/json', data);
        return promise.then((data) => GetResearchersResponse.fromJSON(data));
    }
    GetResearcher(request) {
        const data = GetResearcherByIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearcher', 'application/json', data);
        return promise.then((data) => GetResearcherByIdResponse.fromJSON(data));
    }
    GetResearchersByOrganizationId(request) {
        const data = GetResearchersByOrganizationIdRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchersByOrganizationId', 'application/json', data);
        return promise.then((data) => GetResearchersByOrganizationIdResponse.fromJSON(data));
    }
    DeleteResearcher(request) {
        const data = DeleteResearcherRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteResearcher', 'application/json', data);
        return promise.then((data) => DeleteResearcherResponse.fromJSON(data));
    }
}
export class DataApiAdminClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.CreateDataToken.bind(this);
        this.GetDataTokenById.bind(this);
        this.GetDataTokensByOrganizationName.bind(this);
        this.RevokeDataTokenById.bind(this);
        this.CreateDataSubscription.bind(this);
        this.GetDataSubscriptionById.bind(this);
        this.GetDataSubscriptionsByOrganizationName.bind(this);
        this.UpdateDataSubscription.bind(this);
        this.DeleteDataSubscription.bind(this);
        this.CreateOrganization.bind(this);
        this.GetOrganizationByName.bind(this);
        this.GetOrganizations.bind(this);
        this.UpdateOrganization.bind(this);
        this.GetAuditLogEvents.bind(this);
        this.AddUsersToOrg.bind(this);
        this.GetUsersByOrgId.bind(this);
        this.GetUserById.bind(this);
        this.DeleteUser.bind(this);
        this.CreateResearchOrganization.bind(this);
        this.GetResearchOrganizations.bind(this);
        this.UpdateResearchOrganization.bind(this);
        this.GetResearchOrganization.bind(this);
        this.DeleteResearchOrganization.bind(this);
        this.CreateResearcher.bind(this);
        this.GetResearchers.bind(this);
        this.GetResearcher.bind(this);
        this.GetResearchersByOrganizationId.bind(this);
        this.DeleteResearcher.bind(this);
    }
    CreateDataToken(request) {
        const data = CreateDataTokenRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateDataToken', 'application/protobuf', data);
        return promise.then((data) => CreateDataTokenResponse.decode(data));
    }
    GetDataTokenById(request) {
        const data = GetDataTokenByIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataTokenById', 'application/protobuf', data);
        return promise.then((data) => GetDataTokenByIdResponse.decode(data));
    }
    GetDataTokensByOrganizationName(request) {
        const data = GetDataTokensByOrganizationNameRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataTokensByOrganizationName', 'application/protobuf', data);
        return promise.then((data) => GetDataTokensByOrganizationNameResponse.decode(data));
    }
    RevokeDataTokenById(request) {
        const data = RevokeDataTokenByIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'RevokeDataTokenById', 'application/protobuf', data);
        return promise.then((data) => RevokeDataTokenByIdResponse.decode(data));
    }
    CreateDataSubscription(request) {
        const data = CreateDataSubscriptionRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateDataSubscription', 'application/protobuf', data);
        return promise.then((data) => CreateDataSubscriptionResponse.decode(data));
    }
    GetDataSubscriptionById(request) {
        const data = GetDataSubscriptionByIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataSubscriptionById', 'application/protobuf', data);
        return promise.then((data) => GetDataSubscriptionByIdResponse.decode(data));
    }
    GetDataSubscriptionsByOrganizationName(request) {
        const data = GetDataSubscriptionsByOrganizationNameRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetDataSubscriptionsByOrganizationName', 'application/protobuf', data);
        return promise.then((data) => GetDataSubscriptionsByOrganizationNameResponse.decode(data));
    }
    UpdateDataSubscription(request) {
        const data = UpdateDataSubscriptionRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'UpdateDataSubscription', 'application/protobuf', data);
        return promise.then((data) => UpdateDataSubscriptionResponse.decode(data));
    }
    DeleteDataSubscription(request) {
        const data = DeleteDataSubscriptionRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteDataSubscription', 'application/protobuf', data);
        return promise.then((data) => DeleteDataSubscriptionResponse.decode(data));
    }
    CreateOrganization(request) {
        const data = CreateOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateOrganization', 'application/protobuf', data);
        return promise.then((data) => CreateOrganizationResponse.decode(data));
    }
    GetOrganizationByName(request) {
        const data = GetOrganizationByNameRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetOrganizationByName', 'application/protobuf', data);
        return promise.then((data) => GetOrganizationByNameResponse.decode(data));
    }
    GetOrganizations(request) {
        const data = GetOrganizationsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetOrganizations', 'application/protobuf', data);
        return promise.then((data) => GetOrganizationsResponse.decode(data));
    }
    UpdateOrganization(request) {
        const data = UpdateOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'UpdateOrganization', 'application/protobuf', data);
        return promise.then((data) => UpdateOrganizationResponse.decode(data));
    }
    GetAuditLogEvents(request) {
        const data = GetAuditLogEventsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetAuditLogEvents', 'application/protobuf', data);
        return promise.then((data) => GetAuditLogEventsResponse.decode(data));
    }
    AddUsersToOrg(request) {
        const data = AddUsersToOrgRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'AddUsersToOrg', 'application/protobuf', data);
        return promise.then((data) => AddUsersToOrgResponse.decode(data));
    }
    GetUsersByOrgId(request) {
        const data = GetUsersByOrgIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetUsersByOrgId', 'application/protobuf', data);
        return promise.then((data) => GetUsersByOrgIdResponse.decode(data));
    }
    GetUserById(request) {
        const data = GetUserByIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetUserById', 'application/protobuf', data);
        return promise.then((data) => GetUserByIdResponse.decode(data));
    }
    DeleteUser(request) {
        const data = DeleteUserRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteUser', 'application/protobuf', data);
        return promise.then((data) => DeleteUserResponse.decode(data));
    }
    CreateResearchOrganization(request) {
        const data = CreateResearchOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateResearchOrganization', 'application/protobuf', data);
        return promise.then((data) => CreateResearchOrganizationResponse.decode(data));
    }
    GetResearchOrganizations(request) {
        const data = GetResearchOrganizationsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchOrganizations', 'application/protobuf', data);
        return promise.then((data) => GetResearchOrganizationsResponse.decode(data));
    }
    UpdateResearchOrganization(request) {
        const data = UpdateResearchOrganizationByIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'UpdateResearchOrganization', 'application/protobuf', data);
        return promise.then((data) => UpdateResearchOrganizationResponse.decode(data));
    }
    GetResearchOrganization(request) {
        const data = GetResearchOrganizationByIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchOrganization', 'application/protobuf', data);
        return promise.then((data) => GetResearchOrganizationByIdResponse.decode(data));
    }
    DeleteResearchOrganization(request) {
        const data = DeleteResearchOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteResearchOrganization', 'application/protobuf', data);
        return promise.then((data) => DeleteResearchOrganizationResponse.decode(data));
    }
    CreateResearcher(request) {
        const data = CreateResearcherRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'CreateResearcher', 'application/protobuf', data);
        return promise.then((data) => CreateResearcherResponse.decode(data));
    }
    GetResearchers(request) {
        const data = GetResearchersRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchers', 'application/protobuf', data);
        return promise.then((data) => GetResearchersResponse.decode(data));
    }
    GetResearcher(request) {
        const data = GetResearcherByIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearcher', 'application/protobuf', data);
        return promise.then((data) => GetResearcherByIdResponse.decode(data));
    }
    GetResearchersByOrganizationId(request) {
        const data = GetResearchersByOrganizationIdRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'GetResearchersByOrganizationId', 'application/protobuf', data);
        return promise.then((data) => GetResearchersByOrganizationIdResponse.decode(data));
    }
    DeleteResearcher(request) {
        const data = DeleteResearcherRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DataApiAdmin', 'DeleteResearcher', 'application/protobuf', data);
        return promise.then((data) => DeleteResearcherResponse.decode(data));
    }
}
export class EventsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.SendEvent.bind(this);
    }
    SendEvent(request) {
        const data = Value.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.Events', 'SendEvent', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
}
export class EventsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.SendEvent.bind(this);
    }
    SendEvent(request) {
        const data = Value.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.Events', 'SendEvent', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
}
export class DevPortalInstallationSettingsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.GetForm.bind(this);
        this.ValidateForm.bind(this);
        this.GetSettings.bind(this);
        this.UpdateSettings.bind(this);
    }
    GetForm(request) {
        const data = GetInstallationSettingsFormRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'GetForm', 'application/json', data);
        return promise.then((data) => GetInstallationSettingsFormResponse.fromJSON(data));
    }
    ValidateForm(request) {
        const data = ValidateInstallationSettingsFormRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'ValidateForm', 'application/json', data);
        return promise.then((data) => ValidateInstallationSettingsFormResponse.fromJSON(data));
    }
    GetSettings(request) {
        const data = GetInstallationSettingsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'GetSettings', 'application/json', data);
        return promise.then((data) => GetInstallationSettingsResponse.fromJSON(data));
    }
    UpdateSettings(request) {
        const data = UpdateInstallationSettingsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'UpdateSettings', 'application/json', data);
        return promise.then((data) => UpdateInstallationSettingsResponse.fromJSON(data));
    }
}
export class DevPortalInstallationSettingsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.GetForm.bind(this);
        this.ValidateForm.bind(this);
        this.GetSettings.bind(this);
        this.UpdateSettings.bind(this);
    }
    GetForm(request) {
        const data = GetInstallationSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'GetForm', 'application/protobuf', data);
        return promise.then((data) => GetInstallationSettingsFormResponse.decode(data));
    }
    ValidateForm(request) {
        const data = ValidateInstallationSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'ValidateForm', 'application/protobuf', data);
        return promise.then((data) => ValidateInstallationSettingsFormResponse.decode(data));
    }
    GetSettings(request) {
        const data = GetInstallationSettingsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'GetSettings', 'application/protobuf', data);
        return promise.then((data) => GetInstallationSettingsResponse.decode(data));
    }
    UpdateSettings(request) {
        const data = UpdateInstallationSettingsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalInstallationSettings', 'UpdateSettings', 'application/protobuf', data);
        return promise.then((data) => UpdateInstallationSettingsResponse.decode(data));
    }
}
export class DevPortalAppSettingsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.GetForm.bind(this);
        this.ValidateForm.bind(this);
        this.GetSettings.bind(this);
        this.UpdateSettings.bind(this);
    }
    GetForm(request) {
        const data = GetAppSettingsFormRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'GetForm', 'application/json', data);
        return promise.then((data) => GetAppSettingsFormResponse.fromJSON(data));
    }
    ValidateForm(request) {
        const data = ValidateAppSettingsFormRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'ValidateForm', 'application/json', data);
        return promise.then((data) => ValidateAppSettingsFormResponse.fromJSON(data));
    }
    GetSettings(request) {
        const data = GetAppSettingsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'GetSettings', 'application/json', data);
        return promise.then((data) => GetAppSettingsResponse.fromJSON(data));
    }
    UpdateSettings(request) {
        const data = UpdateAppSettingsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'UpdateSettings', 'application/json', data);
        return promise.then((data) => UpdateAppSettingsResponse.fromJSON(data));
    }
}
export class DevPortalAppSettingsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.GetForm.bind(this);
        this.ValidateForm.bind(this);
        this.GetSettings.bind(this);
        this.UpdateSettings.bind(this);
    }
    GetForm(request) {
        const data = GetAppSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'GetForm', 'application/protobuf', data);
        return promise.then((data) => GetAppSettingsFormResponse.decode(data));
    }
    ValidateForm(request) {
        const data = ValidateAppSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'ValidateForm', 'application/protobuf', data);
        return promise.then((data) => ValidateAppSettingsFormResponse.decode(data));
    }
    GetSettings(request) {
        const data = GetAppSettingsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'GetSettings', 'application/protobuf', data);
        return promise.then((data) => GetAppSettingsResponse.decode(data));
    }
    UpdateSettings(request) {
        const data = UpdateAppSettingsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppSettings', 'UpdateSettings', 'application/protobuf', data);
        return promise.then((data) => UpdateAppSettingsResponse.decode(data));
    }
}
export class DevPortalDeveloperSettingsClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.GetPaymentsVerificationStatus.bind(this);
    }
    GetPaymentsVerificationStatus(request) {
        const data = GetPaymentsVerificationStatusRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalDeveloperSettings', 'GetPaymentsVerificationStatus', 'application/json', data);
        return promise.then((data) => GetPaymentsVerificationStatusResponse.fromJSON(data));
    }
}
export class DevPortalDeveloperSettingsClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.GetPaymentsVerificationStatus.bind(this);
    }
    GetPaymentsVerificationStatus(request) {
        const data = GetPaymentsVerificationStatusRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalDeveloperSettings', 'GetPaymentsVerificationStatus', 'application/protobuf', data);
        return promise.then((data) => GetPaymentsVerificationStatusResponse.decode(data));
    }
}
export class DevPortalAppPublishRequestClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.Submit.bind(this);
        this.Update.bind(this);
        this.Get.bind(this);
        this.FindMany.bind(this);
        this.SetReviewDecision.bind(this);
        this.RemoveReview.bind(this);
        this.AddNote.bind(this);
        this.UpdateNote.bind(this);
        this.RemoveNote.bind(this);
        this.ListModmailConversations.bind(this);
        this.SetReviewDecisionWithModmail.bind(this);
    }
    Submit(request) {
        const data = AppPRCreateRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'Submit', 'application/json', data);
        return promise.then((data) => UUID.fromJSON(data));
    }
    Update(request) {
        const data = AppPRUpdateRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'Update', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    Get(request) {
        const data = AppPRGetRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'Get', 'application/json', data);
        return promise.then((data) => FullPublishRequestInfo.fromJSON(data));
    }
    FindMany(request) {
        const data = AppPRFindManyRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'FindMany', 'application/json', data);
        return promise.then((data) => MultiplePublishRequestInfos.fromJSON(data));
    }
    SetReviewDecision(request) {
        const data = AppPRSetReviewDecisionRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'SetReviewDecision', 'application/json', data);
        return promise.then((data) => UUID.fromJSON(data));
    }
    RemoveReview(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'RemoveReview', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    AddNote(request) {
        const data = AppPRAddNoteRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'AddNote', 'application/json', data);
        return promise.then((data) => UUID.fromJSON(data));
    }
    UpdateNote(request) {
        const data = AppPRUpdateNoteRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'UpdateNote', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    RemoveNote(request) {
        const data = UUID.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'RemoveNote', 'application/json', data);
        return promise.then((data) => Empty.fromJSON(data));
    }
    ListModmailConversations(request) {
        const data = AppPRListModmailConversationsRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'ListModmailConversations', 'application/json', data);
        return promise.then((data) => AppPRListModmailConversationsResponse.fromJSON(data));
    }
    SetReviewDecisionWithModmail(request) {
        const data = AppPRSetReviewDecisionWithModmailRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'SetReviewDecisionWithModmail', 'application/json', data);
        return promise.then((data) => AppPRSetReviewDecisionWithModmailResponse.fromJSON(data));
    }
}
export class DevPortalAppPublishRequestClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.Submit.bind(this);
        this.Update.bind(this);
        this.Get.bind(this);
        this.FindMany.bind(this);
        this.SetReviewDecision.bind(this);
        this.RemoveReview.bind(this);
        this.AddNote.bind(this);
        this.UpdateNote.bind(this);
        this.RemoveNote.bind(this);
        this.ListModmailConversations.bind(this);
        this.SetReviewDecisionWithModmail.bind(this);
    }
    Submit(request) {
        const data = AppPRCreateRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'Submit', 'application/protobuf', data);
        return promise.then((data) => UUID.decode(data));
    }
    Update(request) {
        const data = AppPRUpdateRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'Update', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    Get(request) {
        const data = AppPRGetRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'Get', 'application/protobuf', data);
        return promise.then((data) => FullPublishRequestInfo.decode(data));
    }
    FindMany(request) {
        const data = AppPRFindManyRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'FindMany', 'application/protobuf', data);
        return promise.then((data) => MultiplePublishRequestInfos.decode(data));
    }
    SetReviewDecision(request) {
        const data = AppPRSetReviewDecisionRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'SetReviewDecision', 'application/protobuf', data);
        return promise.then((data) => UUID.decode(data));
    }
    RemoveReview(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'RemoveReview', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    AddNote(request) {
        const data = AppPRAddNoteRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'AddNote', 'application/protobuf', data);
        return promise.then((data) => UUID.decode(data));
    }
    UpdateNote(request) {
        const data = AppPRUpdateNoteRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'UpdateNote', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    RemoveNote(request) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'RemoveNote', 'application/protobuf', data);
        return promise.then((data) => Empty.decode(data));
    }
    ListModmailConversations(request) {
        const data = AppPRListModmailConversationsRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'ListModmailConversations', 'application/protobuf', data);
        return promise.then((data) => AppPRListModmailConversationsResponse.decode(data));
    }
    SetReviewDecisionWithModmail(request) {
        const data = AppPRSetReviewDecisionWithModmailRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DevPortalAppPublishRequest', 'SetReviewDecisionWithModmail', 'application/protobuf', data);
        return promise.then((data) => AppPRSetReviewDecisionWithModmailResponse.decode(data));
    }
}
export class DeveloperAccountClientJSON {
    constructor(rpc) {
        this.rpc = rpc;
        this.RegisterUser.bind(this);
        this.GetUserAccountInfoIfExists.bind(this);
    }
    RegisterUser(request) {
        const data = DeveloperAccountRegisterUserRequest.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DeveloperAccount', 'RegisterUser', 'application/json', data);
        return promise.then((data) => DeveloperAccountInfo.fromJSON(data));
    }
    GetUserAccountInfoIfExists(request) {
        const data = Empty.toJSON(request);
        const promise = this.rpc.request('devvit.dev_portal.DeveloperAccount', 'GetUserAccountInfoIfExists', 'application/json', data);
        return promise.then((data) => GetUserAccountInfoResponse.fromJSON(data));
    }
}
export class DeveloperAccountClientProtobuf {
    constructor(rpc) {
        this.rpc = rpc;
        this.RegisterUser.bind(this);
        this.GetUserAccountInfoIfExists.bind(this);
    }
    RegisterUser(request) {
        const data = DeveloperAccountRegisterUserRequest.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DeveloperAccount', 'RegisterUser', 'application/protobuf', data);
        return promise.then((data) => DeveloperAccountInfo.decode(data));
    }
    GetUserAccountInfoIfExists(request) {
        const data = Empty.encode(request).finish();
        const promise = this.rpc.request('devvit.dev_portal.DeveloperAccount', 'GetUserAccountInfoIfExists', 'application/protobuf', data);
        return promise.then((data) => GetUserAccountInfoResponse.decode(data));
    }
}
