/**
 * #dev_portal.ts
 *
 * Code generated by ts-proto. DO NOT EDIT.
 * @packageDocumentation
 */
/* eslint-disable */
import _m0 from "protobufjs/minimal.js";
import { Empty } from "../../google/protobuf/empty.js";
import { Value } from "../../google/protobuf/struct.js";
import { CreateResearchOrganizationRequest, CreateResearchOrganizationResponse, DeleteResearchOrganizationRequest, DeleteResearchOrganizationResponse, GetResearchOrganizationByIdRequest, GetResearchOrganizationByIdResponse, GetResearchOrganizationsRequest, GetResearchOrganizationsResponse, UpdateResearchOrganizationByIdRequest, UpdateResearchOrganizationResponse, } from "../data/api/admin/rfr/research_organization.js";
import { CreateResearcherRequest, CreateResearcherResponse, DeleteResearcherRequest, DeleteResearcherResponse, GetResearcherByIdRequest, GetResearcherByIdResponse, GetResearchersByOrganizationIdRequest, GetResearchersByOrganizationIdResponse, GetResearchersRequest, GetResearchersResponse, } from "../data/api/admin/rfr/researcher.js";
import { UUID } from "../uuid.js";
import { AppAccountExistsRequest, AppAccountExistsResponse, AppCreationRequest, AppExistsRequest, AppExistsResponse, AppSearchRequest, AppSearchResponse, AppUpdateRequest, CheckIfMediaExistsRequest, CheckIfMediaExistsResponse, CreateAppAccountRequest, CreateAppAccountResponse, DisableAppRequest, EnableAppRequest, FullAppInfo, GetAllWithOwnerRequest, GetAppBySlugRequest, GetPopularAppsRequest, RecoverAppAccountRequest, UploadNewMediaRequest, UploadNewMediaResponse, } from "./app/app.js";
import { AppCategoryNodeListResponse } from "./app/categories/categories.js";
import { AppInfo, MultipleAppInfos } from "./app/info/app_info.js";
import { AppPRCreateRequest, AppPRFindManyRequest, AppPRGetRequest, AppPRUpdateRequest, FullPublishRequestInfo, MultiplePublishRequestInfos, } from "./app_publish_request/app_publish_request.js";
import { AppPRListModmailConversationsRequest, AppPRListModmailConversationsResponse, AppPRSetReviewDecisionWithModmailRequest, AppPRSetReviewDecisionWithModmailResponse, } from "./app_publish_request/modmail/app_publish_request_modmail.js";
import { AppPRAddNoteRequest, AppPRUpdateNoteRequest } from "./app_publish_request/note/app_publish_request_note.js";
import { AppPRSetReviewDecisionRequest } from "./app_publish_request/review/app_publish_request_review.js";
import { GetAppSettingsFormRequest, GetAppSettingsFormResponse, GetAppSettingsRequest, GetAppSettingsResponse, UpdateAppSettingsRequest, UpdateAppSettingsResponse, ValidateAppSettingsFormRequest, ValidateAppSettingsFormResponse, } from "./app_settings/app_settings.js";
import { AppSlugAndVersion, AppVersionCreationRequest, AppVersionUpdateRequest, FullAppVersionInfo, GetAppVersionBundleResponse, ValidInstallLocationsRequest, ValidInstallLocationsResponse, } from "./app_version/app_version.js";
import { AppVersionInfo } from "./app_version/info/app_version_info.js";
import { GetAuditLogEventsRequest, GetAuditLogEventsResponse } from "./data_api/admin/audit/audit.js";
import { CreateDataTokenRequest, CreateDataTokenResponse, GetDataTokenByIdRequest, GetDataTokenByIdResponse, GetDataTokensByOrganizationNameRequest, GetDataTokensByOrganizationNameResponse, RevokeDataTokenByIdRequest, RevokeDataTokenByIdResponse, } from "./data_api/admin/auth/auth.js";
import { CreateOrganizationRequest, CreateOrganizationResponse, GetOrganizationByNameRequest, GetOrganizationByNameResponse, GetOrganizationsRequest, GetOrganizationsResponse, UpdateOrganizationRequest, UpdateOrganizationResponse, } from "./data_api/admin/organization/organization.js";
import { CreateDataSubscriptionRequest, CreateDataSubscriptionResponse, DeleteDataSubscriptionRequest, DeleteDataSubscriptionResponse, GetDataSubscriptionByIdRequest, GetDataSubscriptionByIdResponse, GetDataSubscriptionsByOrganizationNameRequest, GetDataSubscriptionsByOrganizationNameResponse, UpdateDataSubscriptionRequest, UpdateDataSubscriptionResponse, } from "./data_api/admin/subscription/subscription.js";
import { AddUsersToOrgRequest, AddUsersToOrgResponse, DeleteUserRequest, DeleteUserResponse, GetUserByIdRequest, GetUserByIdResponse, GetUsersByOrgIdRequest, GetUsersByOrgIdResponse, } from "./data_api/admin/user/user.js";
import { DeveloperAccountInfo, DeveloperAccountRegisterUserRequest, GetUserAccountInfoResponse, } from "./developer_account/developer_account.js";
import { CreateFeedbackRequest } from "./feedback/feedback.js";
import { FullInstallationInfo, GetAllWithAppRequest, GetAllWithAppResponse, GetAllWithInstallerRequest, GetAllWithInstallLocationRequest, GetAllWithVersionUUIDRequest, GetByAppNameAndInstallLocationRequest, GetInstallationHistoryRequest, GetInstallationHistoryResponse, InstallationCreationRequest, InstallationUpdateRequest, InstallationUpgradeManyRequest, InstallationUpgradeManyResponse, InstallationUpgradeRequest, MultipleInstallationsResponse, } from "./installation/installation.js";
import { GetInstallationSettingsFormRequest, GetInstallationSettingsFormResponse, GetInstallationSettingsRequest, GetInstallationSettingsResponse, UpdateInstallationSettingsRequest, UpdateInstallationSettingsResponse, ValidateInstallationSettingsFormRequest, ValidateInstallationSettingsFormResponse, } from "./installation_settings/installation_settings.js";
import { GetNutritionByNameVersionRequest, MultipleNutritionCategories } from "./nutrition/nutrition.js";
import { GetPaymentsVerificationStatusRequest, GetPaymentsVerificationStatusResponse, } from "./payments/payments_verification.js";
import { ProductList } from "./payments/product.js";
export const AppServiceName = "devvit.dev_portal.App";
export class AppClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || AppServiceName;
        this.rpc = rpc;
        this.Create = this.Create.bind(this);
        this.Search = this.Search.bind(this);
        this.GetBySlug = this.GetBySlug.bind(this);
        this.GetByUUID = this.GetByUUID.bind(this);
        this.GetAllWithLocation = this.GetAllWithLocation.bind(this);
        this.GetAllWithInstaller = this.GetAllWithInstaller.bind(this);
        this.GetAllWithOwner = this.GetAllWithOwner.bind(this);
        this.GetPopularApps = this.GetPopularApps.bind(this);
        this.CheckIfMediaExists = this.CheckIfMediaExists.bind(this);
        this.UploadNewMedia = this.UploadNewMedia.bind(this);
        this.Update = this.Update.bind(this);
        this.Disable = this.Disable.bind(this);
        this.Enable = this.Enable.bind(this);
        this.Exists = this.Exists.bind(this);
        this.AppAccountExists = this.AppAccountExists.bind(this);
        this.CreateAppAccount = this.CreateAppAccount.bind(this);
        this.RecoverAppAccount = this.RecoverAppAccount.bind(this);
        this.GetAllCategories = this.GetAllCategories.bind(this);
    }
    Create(request, metadata) {
        const data = AppCreationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Create", data, metadata);
        return promise.then((data) => AppInfo.decode(_m0.Reader.create(data)));
    }
    Search(request, metadata) {
        const data = AppSearchRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Search", data, metadata);
        return promise.then((data) => AppSearchResponse.decode(_m0.Reader.create(data)));
    }
    GetBySlug(request, metadata) {
        const data = GetAppBySlugRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetBySlug", data, metadata);
        return promise.then((data) => FullAppInfo.decode(_m0.Reader.create(data)));
    }
    GetByUUID(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetByUUID", data, metadata);
        return promise.then((data) => FullAppInfo.decode(_m0.Reader.create(data)));
    }
    GetAllWithLocation(request, metadata) {
        const data = GetAllWithInstallLocationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllWithLocation", data, metadata);
        return promise.then((data) => MultipleAppInfos.decode(_m0.Reader.create(data)));
    }
    GetAllWithInstaller(request, metadata) {
        const data = GetAllWithInstallerRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllWithInstaller", data, metadata);
        return promise.then((data) => MultipleAppInfos.decode(_m0.Reader.create(data)));
    }
    GetAllWithOwner(request, metadata) {
        const data = GetAllWithOwnerRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllWithOwner", data, metadata);
        return promise.then((data) => MultipleAppInfos.decode(_m0.Reader.create(data)));
    }
    GetPopularApps(request, metadata) {
        const data = GetPopularAppsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetPopularApps", data, metadata);
        return promise.then((data) => MultipleAppInfos.decode(_m0.Reader.create(data)));
    }
    CheckIfMediaExists(request, metadata) {
        const data = CheckIfMediaExistsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "CheckIfMediaExists", data, metadata);
        return promise.then((data) => CheckIfMediaExistsResponse.decode(_m0.Reader.create(data)));
    }
    UploadNewMedia(request, metadata) {
        const data = UploadNewMediaRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UploadNewMedia", data, metadata);
        return promise.then((data) => UploadNewMediaResponse.decode(_m0.Reader.create(data)));
    }
    Update(request, metadata) {
        const data = AppUpdateRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Update", data, metadata);
        return promise.then((data) => FullAppInfo.decode(_m0.Reader.create(data)));
    }
    Disable(request, metadata) {
        const data = DisableAppRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Disable", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
    Enable(request, metadata) {
        const data = EnableAppRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Enable", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
    Exists(request, metadata) {
        const data = AppExistsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Exists", data, metadata);
        return promise.then((data) => AppExistsResponse.decode(_m0.Reader.create(data)));
    }
    AppAccountExists(request, metadata) {
        const data = AppAccountExistsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "AppAccountExists", data, metadata);
        return promise.then((data) => AppAccountExistsResponse.decode(_m0.Reader.create(data)));
    }
    CreateAppAccount(request, metadata) {
        const data = CreateAppAccountRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "CreateAppAccount", data, metadata);
        return promise.then((data) => CreateAppAccountResponse.decode(_m0.Reader.create(data)));
    }
    RecoverAppAccount(request, metadata) {
        const data = RecoverAppAccountRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "RecoverAppAccount", data, metadata);
        return promise.then((data) => AppInfo.decode(_m0.Reader.create(data)));
    }
    GetAllCategories(request, metadata) {
        const data = Empty.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllCategories", data, metadata);
        return promise.then((data) => AppCategoryNodeListResponse.decode(_m0.Reader.create(data)));
    }
}
export const AppDefinition = {
    name: "App",
    fullName: "devvit.dev_portal.App",
    methods: {
        create: {
            name: "Create",
            requestType: AppCreationRequest,
            requestStream: false,
            responseType: AppInfo,
            responseStream: false,
            options: {},
        },
        search: {
            name: "Search",
            requestType: AppSearchRequest,
            requestStream: false,
            responseType: AppSearchResponse,
            responseStream: false,
            options: {},
        },
        getBySlug: {
            name: "GetBySlug",
            requestType: GetAppBySlugRequest,
            requestStream: false,
            responseType: FullAppInfo,
            responseStream: false,
            options: {},
        },
        getByUUID: {
            name: "GetByUUID",
            requestType: UUID,
            requestStream: false,
            responseType: FullAppInfo,
            responseStream: false,
            options: {},
        },
        getAllWithLocation: {
            name: "GetAllWithLocation",
            requestType: GetAllWithInstallLocationRequest,
            requestStream: false,
            responseType: MultipleAppInfos,
            responseStream: false,
            options: {},
        },
        getAllWithInstaller: {
            name: "GetAllWithInstaller",
            requestType: GetAllWithInstallerRequest,
            requestStream: false,
            responseType: MultipleAppInfos,
            responseStream: false,
            options: {},
        },
        getAllWithOwner: {
            name: "GetAllWithOwner",
            requestType: GetAllWithOwnerRequest,
            requestStream: false,
            responseType: MultipleAppInfos,
            responseStream: false,
            options: {},
        },
        /** Get the X most popular apps, as determined by number of installations. */
        getPopularApps: {
            name: "GetPopularApps",
            requestType: GetPopularAppsRequest,
            requestStream: false,
            responseType: MultipleAppInfos,
            responseStream: false,
            options: {},
        },
        checkIfMediaExists: {
            name: "CheckIfMediaExists",
            requestType: CheckIfMediaExistsRequest,
            requestStream: false,
            responseType: CheckIfMediaExistsResponse,
            responseStream: false,
            options: {},
        },
        uploadNewMedia: {
            name: "UploadNewMedia",
            requestType: UploadNewMediaRequest,
            requestStream: false,
            responseType: UploadNewMediaResponse,
            responseStream: false,
            options: {},
        },
        update: {
            name: "Update",
            requestType: AppUpdateRequest,
            requestStream: false,
            responseType: FullAppInfo,
            responseStream: false,
            options: {},
        },
        disable: {
            name: "Disable",
            requestType: DisableAppRequest,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
        enable: {
            name: "Enable",
            requestType: EnableAppRequest,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
        exists: {
            name: "Exists",
            requestType: AppExistsRequest,
            requestStream: false,
            responseType: AppExistsResponse,
            responseStream: false,
            options: {},
        },
        appAccountExists: {
            name: "AppAccountExists",
            requestType: AppAccountExistsRequest,
            requestStream: false,
            responseType: AppAccountExistsResponse,
            responseStream: false,
            options: {},
        },
        createAppAccount: {
            name: "CreateAppAccount",
            requestType: CreateAppAccountRequest,
            requestStream: false,
            responseType: CreateAppAccountResponse,
            responseStream: false,
            options: {},
        },
        recoverAppAccount: {
            name: "RecoverAppAccount",
            requestType: RecoverAppAccountRequest,
            requestStream: false,
            responseType: AppInfo,
            responseStream: false,
            options: {},
        },
        /** Retrieve the full category taxonomy as a nested tree structure. */
        getAllCategories: {
            name: "GetAllCategories",
            requestType: Empty,
            requestStream: false,
            responseType: AppCategoryNodeListResponse,
            responseStream: false,
            options: {},
        },
    },
};
export const AppVersionServiceName = "devvit.dev_portal.AppVersion";
export class AppVersionClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || AppVersionServiceName;
        this.rpc = rpc;
        this.Create = this.Create.bind(this);
        this.Get = this.Get.bind(this);
        this.GetBySlugAndVersionNumber = this.GetBySlugAndVersionNumber.bind(this);
        this.Update = this.Update.bind(this);
        this.GetValidInstallLocations = this.GetValidInstallLocations.bind(this);
        this.GetAppVersionBundle = this.GetAppVersionBundle.bind(this);
        this.GetNutritionByNameVersion = this.GetNutritionByNameVersion.bind(this);
        this.GetNutritionByAppVersionId = this.GetNutritionByAppVersionId.bind(this);
        this.GetProductsByAppVersionId = this.GetProductsByAppVersionId.bind(this);
    }
    Create(request, metadata) {
        const data = AppVersionCreationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Create", data, metadata);
        return promise.then((data) => AppVersionInfo.decode(_m0.Reader.create(data)));
    }
    Get(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "Get", data, metadata);
        return promise.then((data) => FullAppVersionInfo.decode(_m0.Reader.create(data)));
    }
    GetBySlugAndVersionNumber(request, metadata) {
        const data = AppSlugAndVersion.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetBySlugAndVersionNumber", data, metadata);
        return promise.then((data) => FullAppVersionInfo.decode(_m0.Reader.create(data)));
    }
    Update(request, metadata) {
        const data = AppVersionUpdateRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Update", data, metadata);
        return promise.then((data) => FullAppVersionInfo.decode(_m0.Reader.create(data)));
    }
    GetValidInstallLocations(request, metadata) {
        const data = ValidInstallLocationsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetValidInstallLocations", data, metadata);
        return promise.then((data) => ValidInstallLocationsResponse.decode(_m0.Reader.create(data)));
    }
    GetAppVersionBundle(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAppVersionBundle", data, metadata);
        return promise.then((data) => GetAppVersionBundleResponse.decode(_m0.Reader.create(data)));
    }
    GetNutritionByNameVersion(request, metadata) {
        const data = GetNutritionByNameVersionRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetNutritionByNameVersion", data, metadata);
        return promise.then((data) => MultipleNutritionCategories.decode(_m0.Reader.create(data)));
    }
    GetNutritionByAppVersionId(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetNutritionByAppVersionId", data, metadata);
        return promise.then((data) => MultipleNutritionCategories.decode(_m0.Reader.create(data)));
    }
    GetProductsByAppVersionId(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetProductsByAppVersionId", data, metadata);
        return promise.then((data) => ProductList.decode(_m0.Reader.create(data)));
    }
}
export const AppVersionDefinition = {
    name: "AppVersion",
    fullName: "devvit.dev_portal.AppVersion",
    methods: {
        create: {
            name: "Create",
            requestType: AppVersionCreationRequest,
            requestStream: false,
            responseType: AppVersionInfo,
            responseStream: false,
            options: {},
        },
        get: {
            name: "Get",
            requestType: UUID,
            requestStream: false,
            responseType: FullAppVersionInfo,
            responseStream: false,
            options: {},
        },
        getBySlugAndVersionNumber: {
            name: "GetBySlugAndVersionNumber",
            requestType: AppSlugAndVersion,
            requestStream: false,
            responseType: FullAppVersionInfo,
            responseStream: false,
            options: {},
        },
        update: {
            name: "Update",
            requestType: AppVersionUpdateRequest,
            requestStream: false,
            responseType: FullAppVersionInfo,
            responseStream: false,
            options: {},
        },
        getValidInstallLocations: {
            name: "GetValidInstallLocations",
            requestType: ValidInstallLocationsRequest,
            requestStream: false,
            responseType: ValidInstallLocationsResponse,
            responseStream: false,
            options: {},
        },
        getAppVersionBundle: {
            name: "GetAppVersionBundle",
            requestType: UUID,
            requestStream: false,
            responseType: GetAppVersionBundleResponse,
            responseStream: false,
            options: {},
        },
        /**
         * Get app nutritional labels by app name (slug) and optional version (1.2.3,
         * 1.2.3.4, latest). Unlike SemVer, latest includes pre-release versions, not
         * just stable.
         */
        getNutritionByNameVersion: {
            name: "GetNutritionByNameVersion",
            requestType: GetNutritionByNameVersionRequest,
            requestStream: false,
            responseType: MultipleNutritionCategories,
            responseStream: false,
            options: {},
        },
        /** Get app nutritional labels by app version id */
        getNutritionByAppVersionId: {
            name: "GetNutritionByAppVersionId",
            requestType: UUID,
            requestStream: false,
            responseType: MultipleNutritionCategories,
            responseStream: false,
            options: {},
        },
        /** Get app products by app version id */
        getProductsByAppVersionId: {
            name: "GetProductsByAppVersionId",
            requestType: UUID,
            requestStream: false,
            responseType: ProductList,
            responseStream: false,
            options: {},
        },
    },
};
export const InstallationsServiceName = "devvit.dev_portal.Installations";
export class InstallationsClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || InstallationsServiceName;
        this.rpc = rpc;
        this.Create = this.Create.bind(this);
        this.GetByUUID = this.GetByUUID.bind(this);
        this.GetByAppNameAndInstallLocation = this.GetByAppNameAndInstallLocation.bind(this);
        this.GetAllWithInstallLocation = this.GetAllWithInstallLocation.bind(this);
        this.GetAllWithInstaller = this.GetAllWithInstaller.bind(this);
        this.GetAllWithVersionUUID = this.GetAllWithVersionUUID.bind(this);
        this.GetAllWithApp = this.GetAllWithApp.bind(this);
        this.GetInstallationHistory = this.GetInstallationHistory.bind(this);
        this.Upgrade = this.Upgrade.bind(this);
        this.UpgradeMany = this.UpgradeMany.bind(this);
        this.Update = this.Update.bind(this);
        this.Remove = this.Remove.bind(this);
    }
    Create(request, metadata) {
        const data = InstallationCreationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Create", data, metadata);
        return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
    }
    GetByUUID(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetByUUID", data, metadata);
        return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
    }
    GetByAppNameAndInstallLocation(request, metadata) {
        const data = GetByAppNameAndInstallLocationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetByAppNameAndInstallLocation", data, metadata);
        return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
    }
    GetAllWithInstallLocation(request, metadata) {
        const data = GetAllWithInstallLocationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllWithInstallLocation", data, metadata);
        return promise.then((data) => MultipleInstallationsResponse.decode(_m0.Reader.create(data)));
    }
    GetAllWithInstaller(request, metadata) {
        const data = GetAllWithInstallerRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllWithInstaller", data, metadata);
        return promise.then((data) => MultipleInstallationsResponse.decode(_m0.Reader.create(data)));
    }
    GetAllWithVersionUUID(request, metadata) {
        const data = GetAllWithVersionUUIDRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllWithVersionUUID", data, metadata);
        return promise.then((data) => MultipleInstallationsResponse.decode(_m0.Reader.create(data)));
    }
    GetAllWithApp(request, metadata) {
        const data = GetAllWithAppRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAllWithApp", data, metadata);
        return promise.then((data) => GetAllWithAppResponse.decode(_m0.Reader.create(data)));
    }
    GetInstallationHistory(request, metadata) {
        const data = GetInstallationHistoryRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetInstallationHistory", data, metadata);
        return promise.then((data) => GetInstallationHistoryResponse.decode(_m0.Reader.create(data)));
    }
    Upgrade(request, metadata) {
        const data = InstallationUpgradeRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Upgrade", data, metadata);
        return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
    }
    UpgradeMany(request, metadata) {
        const data = InstallationUpgradeManyRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UpgradeMany", data, metadata);
        return promise.then((data) => InstallationUpgradeManyResponse.decode(_m0.Reader.create(data)));
    }
    Update(request, metadata) {
        const data = InstallationUpdateRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Update", data, metadata);
        return promise.then((data) => FullInstallationInfo.decode(_m0.Reader.create(data)));
    }
    Remove(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "Remove", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
}
export const InstallationsDefinition = {
    name: "Installations",
    fullName: "devvit.dev_portal.Installations",
    methods: {
        create: {
            name: "Create",
            requestType: InstallationCreationRequest,
            requestStream: false,
            responseType: FullInstallationInfo,
            responseStream: false,
            options: {},
        },
        getByUUID: {
            name: "GetByUUID",
            requestType: UUID,
            requestStream: false,
            responseType: FullInstallationInfo,
            responseStream: false,
            options: {},
        },
        getByAppNameAndInstallLocation: {
            name: "GetByAppNameAndInstallLocation",
            requestType: GetByAppNameAndInstallLocationRequest,
            requestStream: false,
            responseType: FullInstallationInfo,
            responseStream: false,
            options: {},
        },
        getAllWithInstallLocation: {
            name: "GetAllWithInstallLocation",
            requestType: GetAllWithInstallLocationRequest,
            requestStream: false,
            responseType: MultipleInstallationsResponse,
            responseStream: false,
            options: {},
        },
        getAllWithInstaller: {
            name: "GetAllWithInstaller",
            requestType: GetAllWithInstallerRequest,
            requestStream: false,
            responseType: MultipleInstallationsResponse,
            responseStream: false,
            options: {},
        },
        getAllWithVersionUUID: {
            name: "GetAllWithVersionUUID",
            requestType: GetAllWithVersionUUIDRequest,
            requestStream: false,
            responseType: MultipleInstallationsResponse,
            responseStream: false,
            options: {},
        },
        getAllWithApp: {
            name: "GetAllWithApp",
            requestType: GetAllWithAppRequest,
            requestStream: false,
            responseType: GetAllWithAppResponse,
            responseStream: false,
            options: {},
        },
        getInstallationHistory: {
            name: "GetInstallationHistory",
            requestType: GetInstallationHistoryRequest,
            requestStream: false,
            responseType: GetInstallationHistoryResponse,
            responseStream: false,
            options: {},
        },
        upgrade: {
            name: "Upgrade",
            requestType: InstallationUpgradeRequest,
            requestStream: false,
            responseType: FullInstallationInfo,
            responseStream: false,
            options: {},
        },
        upgradeMany: {
            name: "UpgradeMany",
            requestType: InstallationUpgradeManyRequest,
            requestStream: false,
            responseType: InstallationUpgradeManyResponse,
            responseStream: false,
            options: {},
        },
        update: {
            name: "Update",
            requestType: InstallationUpdateRequest,
            requestStream: false,
            responseType: FullInstallationInfo,
            responseStream: false,
            options: {},
        },
        remove: {
            name: "Remove",
            requestType: UUID,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
    },
};
export const FeedbackServiceName = "devvit.dev_portal.Feedback";
export class FeedbackClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || FeedbackServiceName;
        this.rpc = rpc;
        this.Create = this.Create.bind(this);
    }
    Create(request, metadata) {
        const data = CreateFeedbackRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Create", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
}
export const FeedbackDefinition = {
    name: "Feedback",
    fullName: "devvit.dev_portal.Feedback",
    methods: {
        create: {
            name: "Create",
            requestType: CreateFeedbackRequest,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
    },
};
export const DataApiAdminServiceName = "devvit.dev_portal.DataApiAdmin";
export class DataApiAdminClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || DataApiAdminServiceName;
        this.rpc = rpc;
        this.CreateDataToken = this.CreateDataToken.bind(this);
        this.GetDataTokenById = this.GetDataTokenById.bind(this);
        this.GetDataTokensByOrganizationName = this.GetDataTokensByOrganizationName.bind(this);
        this.RevokeDataTokenById = this.RevokeDataTokenById.bind(this);
        this.CreateDataSubscription = this.CreateDataSubscription.bind(this);
        this.GetDataSubscriptionById = this.GetDataSubscriptionById.bind(this);
        this.GetDataSubscriptionsByOrganizationName = this.GetDataSubscriptionsByOrganizationName.bind(this);
        this.UpdateDataSubscription = this.UpdateDataSubscription.bind(this);
        this.DeleteDataSubscription = this.DeleteDataSubscription.bind(this);
        this.CreateOrganization = this.CreateOrganization.bind(this);
        this.GetOrganizationByName = this.GetOrganizationByName.bind(this);
        this.GetOrganizations = this.GetOrganizations.bind(this);
        this.UpdateOrganization = this.UpdateOrganization.bind(this);
        this.GetAuditLogEvents = this.GetAuditLogEvents.bind(this);
        this.AddUsersToOrg = this.AddUsersToOrg.bind(this);
        this.GetUsersByOrgId = this.GetUsersByOrgId.bind(this);
        this.GetUserById = this.GetUserById.bind(this);
        this.DeleteUser = this.DeleteUser.bind(this);
        this.CreateResearchOrganization = this.CreateResearchOrganization.bind(this);
        this.GetResearchOrganizations = this.GetResearchOrganizations.bind(this);
        this.UpdateResearchOrganization = this.UpdateResearchOrganization.bind(this);
        this.GetResearchOrganization = this.GetResearchOrganization.bind(this);
        this.DeleteResearchOrganization = this.DeleteResearchOrganization.bind(this);
        this.CreateResearcher = this.CreateResearcher.bind(this);
        this.GetResearchers = this.GetResearchers.bind(this);
        this.GetResearcher = this.GetResearcher.bind(this);
        this.GetResearchersByOrganizationId = this.GetResearchersByOrganizationId.bind(this);
        this.DeleteResearcher = this.DeleteResearcher.bind(this);
    }
    CreateDataToken(request, metadata) {
        const data = CreateDataTokenRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "CreateDataToken", data, metadata);
        return promise.then((data) => CreateDataTokenResponse.decode(_m0.Reader.create(data)));
    }
    GetDataTokenById(request, metadata) {
        const data = GetDataTokenByIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetDataTokenById", data, metadata);
        return promise.then((data) => GetDataTokenByIdResponse.decode(_m0.Reader.create(data)));
    }
    GetDataTokensByOrganizationName(request, metadata) {
        const data = GetDataTokensByOrganizationNameRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetDataTokensByOrganizationName", data, metadata);
        return promise.then((data) => GetDataTokensByOrganizationNameResponse.decode(_m0.Reader.create(data)));
    }
    RevokeDataTokenById(request, metadata) {
        const data = RevokeDataTokenByIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "RevokeDataTokenById", data, metadata);
        return promise.then((data) => RevokeDataTokenByIdResponse.decode(_m0.Reader.create(data)));
    }
    CreateDataSubscription(request, metadata) {
        const data = CreateDataSubscriptionRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "CreateDataSubscription", data, metadata);
        return promise.then((data) => CreateDataSubscriptionResponse.decode(_m0.Reader.create(data)));
    }
    GetDataSubscriptionById(request, metadata) {
        const data = GetDataSubscriptionByIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetDataSubscriptionById", data, metadata);
        return promise.then((data) => GetDataSubscriptionByIdResponse.decode(_m0.Reader.create(data)));
    }
    GetDataSubscriptionsByOrganizationName(request, metadata) {
        const data = GetDataSubscriptionsByOrganizationNameRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetDataSubscriptionsByOrganizationName", data, metadata);
        return promise.then((data) => GetDataSubscriptionsByOrganizationNameResponse.decode(_m0.Reader.create(data)));
    }
    UpdateDataSubscription(request, metadata) {
        const data = UpdateDataSubscriptionRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UpdateDataSubscription", data, metadata);
        return promise.then((data) => UpdateDataSubscriptionResponse.decode(_m0.Reader.create(data)));
    }
    DeleteDataSubscription(request, metadata) {
        const data = DeleteDataSubscriptionRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "DeleteDataSubscription", data, metadata);
        return promise.then((data) => DeleteDataSubscriptionResponse.decode(_m0.Reader.create(data)));
    }
    CreateOrganization(request, metadata) {
        const data = CreateOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "CreateOrganization", data, metadata);
        return promise.then((data) => CreateOrganizationResponse.decode(_m0.Reader.create(data)));
    }
    GetOrganizationByName(request, metadata) {
        const data = GetOrganizationByNameRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetOrganizationByName", data, metadata);
        return promise.then((data) => GetOrganizationByNameResponse.decode(_m0.Reader.create(data)));
    }
    GetOrganizations(request, metadata) {
        const data = GetOrganizationsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetOrganizations", data, metadata);
        return promise.then((data) => GetOrganizationsResponse.decode(_m0.Reader.create(data)));
    }
    UpdateOrganization(request, metadata) {
        const data = UpdateOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UpdateOrganization", data, metadata);
        return promise.then((data) => UpdateOrganizationResponse.decode(_m0.Reader.create(data)));
    }
    GetAuditLogEvents(request, metadata) {
        const data = GetAuditLogEventsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetAuditLogEvents", data, metadata);
        return promise.then((data) => GetAuditLogEventsResponse.decode(_m0.Reader.create(data)));
    }
    AddUsersToOrg(request, metadata) {
        const data = AddUsersToOrgRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "AddUsersToOrg", data, metadata);
        return promise.then((data) => AddUsersToOrgResponse.decode(_m0.Reader.create(data)));
    }
    GetUsersByOrgId(request, metadata) {
        const data = GetUsersByOrgIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetUsersByOrgId", data, metadata);
        return promise.then((data) => GetUsersByOrgIdResponse.decode(_m0.Reader.create(data)));
    }
    GetUserById(request, metadata) {
        const data = GetUserByIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetUserById", data, metadata);
        return promise.then((data) => GetUserByIdResponse.decode(_m0.Reader.create(data)));
    }
    DeleteUser(request, metadata) {
        const data = DeleteUserRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "DeleteUser", data, metadata);
        return promise.then((data) => DeleteUserResponse.decode(_m0.Reader.create(data)));
    }
    CreateResearchOrganization(request, metadata) {
        const data = CreateResearchOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "CreateResearchOrganization", data, metadata);
        return promise.then((data) => CreateResearchOrganizationResponse.decode(_m0.Reader.create(data)));
    }
    GetResearchOrganizations(request, metadata) {
        const data = GetResearchOrganizationsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetResearchOrganizations", data, metadata);
        return promise.then((data) => GetResearchOrganizationsResponse.decode(_m0.Reader.create(data)));
    }
    UpdateResearchOrganization(request, metadata) {
        const data = UpdateResearchOrganizationByIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UpdateResearchOrganization", data, metadata);
        return promise.then((data) => UpdateResearchOrganizationResponse.decode(_m0.Reader.create(data)));
    }
    GetResearchOrganization(request, metadata) {
        const data = GetResearchOrganizationByIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetResearchOrganization", data, metadata);
        return promise.then((data) => GetResearchOrganizationByIdResponse.decode(_m0.Reader.create(data)));
    }
    DeleteResearchOrganization(request, metadata) {
        const data = DeleteResearchOrganizationRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "DeleteResearchOrganization", data, metadata);
        return promise.then((data) => DeleteResearchOrganizationResponse.decode(_m0.Reader.create(data)));
    }
    CreateResearcher(request, metadata) {
        const data = CreateResearcherRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "CreateResearcher", data, metadata);
        return promise.then((data) => CreateResearcherResponse.decode(_m0.Reader.create(data)));
    }
    GetResearchers(request, metadata) {
        const data = GetResearchersRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetResearchers", data, metadata);
        return promise.then((data) => GetResearchersResponse.decode(_m0.Reader.create(data)));
    }
    GetResearcher(request, metadata) {
        const data = GetResearcherByIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetResearcher", data, metadata);
        return promise.then((data) => GetResearcherByIdResponse.decode(_m0.Reader.create(data)));
    }
    GetResearchersByOrganizationId(request, metadata) {
        const data = GetResearchersByOrganizationIdRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetResearchersByOrganizationId", data, metadata);
        return promise.then((data) => GetResearchersByOrganizationIdResponse.decode(_m0.Reader.create(data)));
    }
    DeleteResearcher(request, metadata) {
        const data = DeleteResearcherRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "DeleteResearcher", data, metadata);
        return promise.then((data) => DeleteResearcherResponse.decode(_m0.Reader.create(data)));
    }
}
export const DataApiAdminDefinition = {
    name: "DataApiAdmin",
    fullName: "devvit.dev_portal.DataApiAdmin",
    methods: {
        /** Data Token */
        createDataToken: {
            name: "CreateDataToken",
            requestType: CreateDataTokenRequest,
            requestStream: false,
            responseType: CreateDataTokenResponse,
            responseStream: false,
            options: {},
        },
        getDataTokenById: {
            name: "GetDataTokenById",
            requestType: GetDataTokenByIdRequest,
            requestStream: false,
            responseType: GetDataTokenByIdResponse,
            responseStream: false,
            options: {},
        },
        getDataTokensByOrganizationName: {
            name: "GetDataTokensByOrganizationName",
            requestType: GetDataTokensByOrganizationNameRequest,
            requestStream: false,
            responseType: GetDataTokensByOrganizationNameResponse,
            responseStream: false,
            options: {},
        },
        revokeDataTokenById: {
            name: "RevokeDataTokenById",
            requestType: RevokeDataTokenByIdRequest,
            requestStream: false,
            responseType: RevokeDataTokenByIdResponse,
            responseStream: false,
            options: {},
        },
        /** Data Subscription */
        createDataSubscription: {
            name: "CreateDataSubscription",
            requestType: CreateDataSubscriptionRequest,
            requestStream: false,
            responseType: CreateDataSubscriptionResponse,
            responseStream: false,
            options: {},
        },
        getDataSubscriptionById: {
            name: "GetDataSubscriptionById",
            requestType: GetDataSubscriptionByIdRequest,
            requestStream: false,
            responseType: GetDataSubscriptionByIdResponse,
            responseStream: false,
            options: {},
        },
        getDataSubscriptionsByOrganizationName: {
            name: "GetDataSubscriptionsByOrganizationName",
            requestType: GetDataSubscriptionsByOrganizationNameRequest,
            requestStream: false,
            responseType: GetDataSubscriptionsByOrganizationNameResponse,
            responseStream: false,
            options: {},
        },
        updateDataSubscription: {
            name: "UpdateDataSubscription",
            requestType: UpdateDataSubscriptionRequest,
            requestStream: false,
            responseType: UpdateDataSubscriptionResponse,
            responseStream: false,
            options: {},
        },
        deleteDataSubscription: {
            name: "DeleteDataSubscription",
            requestType: DeleteDataSubscriptionRequest,
            requestStream: false,
            responseType: DeleteDataSubscriptionResponse,
            responseStream: false,
            options: {},
        },
        /** Organizations */
        createOrganization: {
            name: "CreateOrganization",
            requestType: CreateOrganizationRequest,
            requestStream: false,
            responseType: CreateOrganizationResponse,
            responseStream: false,
            options: {},
        },
        getOrganizationByName: {
            name: "GetOrganizationByName",
            requestType: GetOrganizationByNameRequest,
            requestStream: false,
            responseType: GetOrganizationByNameResponse,
            responseStream: false,
            options: {},
        },
        getOrganizations: {
            name: "GetOrganizations",
            requestType: GetOrganizationsRequest,
            requestStream: false,
            responseType: GetOrganizationsResponse,
            responseStream: false,
            options: {},
        },
        updateOrganization: {
            name: "UpdateOrganization",
            requestType: UpdateOrganizationRequest,
            requestStream: false,
            responseType: UpdateOrganizationResponse,
            responseStream: false,
            options: {},
        },
        /** Audit Log */
        getAuditLogEvents: {
            name: "GetAuditLogEvents",
            requestType: GetAuditLogEventsRequest,
            requestStream: false,
            responseType: GetAuditLogEventsResponse,
            responseStream: false,
            options: {},
        },
        addUsersToOrg: {
            name: "AddUsersToOrg",
            requestType: AddUsersToOrgRequest,
            requestStream: false,
            responseType: AddUsersToOrgResponse,
            responseStream: false,
            options: {},
        },
        getUsersByOrgId: {
            name: "GetUsersByOrgId",
            requestType: GetUsersByOrgIdRequest,
            requestStream: false,
            responseType: GetUsersByOrgIdResponse,
            responseStream: false,
            options: {},
        },
        getUserById: {
            name: "GetUserById",
            requestType: GetUserByIdRequest,
            requestStream: false,
            responseType: GetUserByIdResponse,
            responseStream: false,
            options: {},
        },
        deleteUser: {
            name: "DeleteUser",
            requestType: DeleteUserRequest,
            requestStream: false,
            responseType: DeleteUserResponse,
            responseStream: false,
            options: {},
        },
        /** Reddit for Researchers Organizations */
        createResearchOrganization: {
            name: "CreateResearchOrganization",
            requestType: CreateResearchOrganizationRequest,
            requestStream: false,
            responseType: CreateResearchOrganizationResponse,
            responseStream: false,
            options: {},
        },
        getResearchOrganizations: {
            name: "GetResearchOrganizations",
            requestType: GetResearchOrganizationsRequest,
            requestStream: false,
            responseType: GetResearchOrganizationsResponse,
            responseStream: false,
            options: {},
        },
        updateResearchOrganization: {
            name: "UpdateResearchOrganization",
            requestType: UpdateResearchOrganizationByIdRequest,
            requestStream: false,
            responseType: UpdateResearchOrganizationResponse,
            responseStream: false,
            options: {},
        },
        getResearchOrganization: {
            name: "GetResearchOrganization",
            requestType: GetResearchOrganizationByIdRequest,
            requestStream: false,
            responseType: GetResearchOrganizationByIdResponse,
            responseStream: false,
            options: {},
        },
        deleteResearchOrganization: {
            name: "DeleteResearchOrganization",
            requestType: DeleteResearchOrganizationRequest,
            requestStream: false,
            responseType: DeleteResearchOrganizationResponse,
            responseStream: false,
            options: {},
        },
        /** Reddit for Researchers Users */
        createResearcher: {
            name: "CreateResearcher",
            requestType: CreateResearcherRequest,
            requestStream: false,
            responseType: CreateResearcherResponse,
            responseStream: false,
            options: {},
        },
        getResearchers: {
            name: "GetResearchers",
            requestType: GetResearchersRequest,
            requestStream: false,
            responseType: GetResearchersResponse,
            responseStream: false,
            options: {},
        },
        getResearcher: {
            name: "GetResearcher",
            requestType: GetResearcherByIdRequest,
            requestStream: false,
            responseType: GetResearcherByIdResponse,
            responseStream: false,
            options: {},
        },
        getResearchersByOrganizationId: {
            name: "GetResearchersByOrganizationId",
            requestType: GetResearchersByOrganizationIdRequest,
            requestStream: false,
            responseType: GetResearchersByOrganizationIdResponse,
            responseStream: false,
            options: {},
        },
        deleteResearcher: {
            name: "DeleteResearcher",
            requestType: DeleteResearcherRequest,
            requestStream: false,
            responseType: DeleteResearcherResponse,
            responseStream: false,
            options: {},
        },
    },
};
export const EventsServiceName = "devvit.dev_portal.Events";
export class EventsClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || EventsServiceName;
        this.rpc = rpc;
        this.SendEvent = this.SendEvent.bind(this);
    }
    SendEvent(request, metadata) {
        const data = Value.encode(request).finish();
        const promise = this.rpc.request(this.service, "SendEvent", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
}
export const EventsDefinition = {
    name: "Events",
    fullName: "devvit.dev_portal.Events",
    methods: {
        /** Fire off a client-side event */
        sendEvent: {
            name: "SendEvent",
            requestType: Value,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
    },
};
export const DevPortalInstallationSettingsServiceName = "devvit.dev_portal.DevPortalInstallationSettings";
export class DevPortalInstallationSettingsClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || DevPortalInstallationSettingsServiceName;
        this.rpc = rpc;
        this.GetForm = this.GetForm.bind(this);
        this.ValidateForm = this.ValidateForm.bind(this);
        this.GetSettings = this.GetSettings.bind(this);
        this.UpdateSettings = this.UpdateSettings.bind(this);
    }
    GetForm(request, metadata) {
        const data = GetInstallationSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetForm", data, metadata);
        return promise.then((data) => GetInstallationSettingsFormResponse.decode(_m0.Reader.create(data)));
    }
    ValidateForm(request, metadata) {
        const data = ValidateInstallationSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "ValidateForm", data, metadata);
        return promise.then((data) => ValidateInstallationSettingsFormResponse.decode(_m0.Reader.create(data)));
    }
    GetSettings(request, metadata) {
        const data = GetInstallationSettingsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetSettings", data, metadata);
        return promise.then((data) => GetInstallationSettingsResponse.decode(_m0.Reader.create(data)));
    }
    UpdateSettings(request, metadata) {
        const data = UpdateInstallationSettingsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UpdateSettings", data, metadata);
        return promise.then((data) => UpdateInstallationSettingsResponse.decode(_m0.Reader.create(data)));
    }
}
export const DevPortalInstallationSettingsDefinition = {
    name: "DevPortalInstallationSettings",
    fullName: "devvit.dev_portal.DevPortalInstallationSettings",
    methods: {
        getForm: {
            name: "GetForm",
            requestType: GetInstallationSettingsFormRequest,
            requestStream: false,
            responseType: GetInstallationSettingsFormResponse,
            responseStream: false,
            options: {},
        },
        validateForm: {
            name: "ValidateForm",
            requestType: ValidateInstallationSettingsFormRequest,
            requestStream: false,
            responseType: ValidateInstallationSettingsFormResponse,
            responseStream: false,
            options: {},
        },
        getSettings: {
            name: "GetSettings",
            requestType: GetInstallationSettingsRequest,
            requestStream: false,
            responseType: GetInstallationSettingsResponse,
            responseStream: false,
            options: {},
        },
        updateSettings: {
            name: "UpdateSettings",
            requestType: UpdateInstallationSettingsRequest,
            requestStream: false,
            responseType: UpdateInstallationSettingsResponse,
            responseStream: false,
            options: {},
        },
    },
};
export const DevPortalAppSettingsServiceName = "devvit.dev_portal.DevPortalAppSettings";
export class DevPortalAppSettingsClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || DevPortalAppSettingsServiceName;
        this.rpc = rpc;
        this.GetForm = this.GetForm.bind(this);
        this.ValidateForm = this.ValidateForm.bind(this);
        this.GetSettings = this.GetSettings.bind(this);
        this.UpdateSettings = this.UpdateSettings.bind(this);
    }
    GetForm(request, metadata) {
        const data = GetAppSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetForm", data, metadata);
        return promise.then((data) => GetAppSettingsFormResponse.decode(_m0.Reader.create(data)));
    }
    ValidateForm(request, metadata) {
        const data = ValidateAppSettingsFormRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "ValidateForm", data, metadata);
        return promise.then((data) => ValidateAppSettingsFormResponse.decode(_m0.Reader.create(data)));
    }
    GetSettings(request, metadata) {
        const data = GetAppSettingsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetSettings", data, metadata);
        return promise.then((data) => GetAppSettingsResponse.decode(_m0.Reader.create(data)));
    }
    UpdateSettings(request, metadata) {
        const data = UpdateAppSettingsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UpdateSettings", data, metadata);
        return promise.then((data) => UpdateAppSettingsResponse.decode(_m0.Reader.create(data)));
    }
}
export const DevPortalAppSettingsDefinition = {
    name: "DevPortalAppSettings",
    fullName: "devvit.dev_portal.DevPortalAppSettings",
    methods: {
        getForm: {
            name: "GetForm",
            requestType: GetAppSettingsFormRequest,
            requestStream: false,
            responseType: GetAppSettingsFormResponse,
            responseStream: false,
            options: {},
        },
        validateForm: {
            name: "ValidateForm",
            requestType: ValidateAppSettingsFormRequest,
            requestStream: false,
            responseType: ValidateAppSettingsFormResponse,
            responseStream: false,
            options: {},
        },
        getSettings: {
            name: "GetSettings",
            requestType: GetAppSettingsRequest,
            requestStream: false,
            responseType: GetAppSettingsResponse,
            responseStream: false,
            options: {},
        },
        updateSettings: {
            name: "UpdateSettings",
            requestType: UpdateAppSettingsRequest,
            requestStream: false,
            responseType: UpdateAppSettingsResponse,
            responseStream: false,
            options: {},
        },
    },
};
export const DevPortalDeveloperSettingsServiceName = "devvit.dev_portal.DevPortalDeveloperSettings";
export class DevPortalDeveloperSettingsClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || DevPortalDeveloperSettingsServiceName;
        this.rpc = rpc;
        this.GetPaymentsVerificationStatus = this.GetPaymentsVerificationStatus.bind(this);
    }
    GetPaymentsVerificationStatus(request, metadata) {
        const data = GetPaymentsVerificationStatusRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetPaymentsVerificationStatus", data, metadata);
        return promise.then((data) => GetPaymentsVerificationStatusResponse.decode(_m0.Reader.create(data)));
    }
}
export const DevPortalDeveloperSettingsDefinition = {
    name: "DevPortalDeveloperSettings",
    fullName: "devvit.dev_portal.DevPortalDeveloperSettings",
    methods: {
        /**
         * Returns the payments verification status for a given user. This determines whether the user can get paid out and
         * whether they can publish apps that accept payments.
         */
        getPaymentsVerificationStatus: {
            name: "GetPaymentsVerificationStatus",
            requestType: GetPaymentsVerificationStatusRequest,
            requestStream: false,
            responseType: GetPaymentsVerificationStatusResponse,
            responseStream: false,
            options: {},
        },
    },
};
export const DevPortalAppPublishRequestServiceName = "devvit.dev_portal.DevPortalAppPublishRequest";
export class DevPortalAppPublishRequestClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || DevPortalAppPublishRequestServiceName;
        this.rpc = rpc;
        this.Submit = this.Submit.bind(this);
        this.Update = this.Update.bind(this);
        this.Get = this.Get.bind(this);
        this.FindMany = this.FindMany.bind(this);
        this.SetReviewDecision = this.SetReviewDecision.bind(this);
        this.RemoveReview = this.RemoveReview.bind(this);
        this.AddNote = this.AddNote.bind(this);
        this.UpdateNote = this.UpdateNote.bind(this);
        this.RemoveNote = this.RemoveNote.bind(this);
        this.ListModmailConversations = this.ListModmailConversations.bind(this);
        this.SetReviewDecisionWithModmail = this.SetReviewDecisionWithModmail.bind(this);
    }
    Submit(request, metadata) {
        const data = AppPRCreateRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Submit", data, metadata);
        return promise.then((data) => UUID.decode(_m0.Reader.create(data)));
    }
    Update(request, metadata) {
        const data = AppPRUpdateRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Update", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
    Get(request, metadata) {
        const data = AppPRGetRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "Get", data, metadata);
        return promise.then((data) => FullPublishRequestInfo.decode(_m0.Reader.create(data)));
    }
    FindMany(request, metadata) {
        const data = AppPRFindManyRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "FindMany", data, metadata);
        return promise.then((data) => MultiplePublishRequestInfos.decode(_m0.Reader.create(data)));
    }
    SetReviewDecision(request, metadata) {
        const data = AppPRSetReviewDecisionRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "SetReviewDecision", data, metadata);
        return promise.then((data) => UUID.decode(_m0.Reader.create(data)));
    }
    RemoveReview(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "RemoveReview", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
    AddNote(request, metadata) {
        const data = AppPRAddNoteRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "AddNote", data, metadata);
        return promise.then((data) => UUID.decode(_m0.Reader.create(data)));
    }
    UpdateNote(request, metadata) {
        const data = AppPRUpdateNoteRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "UpdateNote", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
    RemoveNote(request, metadata) {
        const data = UUID.encode(request).finish();
        const promise = this.rpc.request(this.service, "RemoveNote", data, metadata);
        return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
    }
    ListModmailConversations(request, metadata) {
        const data = AppPRListModmailConversationsRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "ListModmailConversations", data, metadata);
        return promise.then((data) => AppPRListModmailConversationsResponse.decode(_m0.Reader.create(data)));
    }
    SetReviewDecisionWithModmail(request, metadata) {
        const data = AppPRSetReviewDecisionWithModmailRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "SetReviewDecisionWithModmail", data, metadata);
        return promise.then((data) => AppPRSetReviewDecisionWithModmailResponse.decode(_m0.Reader.create(data)));
    }
}
export const DevPortalAppPublishRequestDefinition = {
    name: "DevPortalAppPublishRequest",
    fullName: "devvit.dev_portal.DevPortalAppPublishRequest",
    methods: {
        submit: {
            name: "Submit",
            requestType: AppPRCreateRequest,
            requestStream: false,
            responseType: UUID,
            responseStream: false,
            options: {},
        },
        update: {
            name: "Update",
            requestType: AppPRUpdateRequest,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
        get: {
            name: "Get",
            requestType: AppPRGetRequest,
            requestStream: false,
            responseType: FullPublishRequestInfo,
            responseStream: false,
            options: {},
        },
        findMany: {
            name: "FindMany",
            requestType: AppPRFindManyRequest,
            requestStream: false,
            responseType: MultiplePublishRequestInfos,
            responseStream: false,
            options: {},
        },
        setReviewDecision: {
            name: "SetReviewDecision",
            requestType: AppPRSetReviewDecisionRequest,
            requestStream: false,
            responseType: UUID,
            responseStream: false,
            options: {},
        },
        removeReview: {
            name: "RemoveReview",
            requestType: UUID,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
        addNote: {
            name: "AddNote",
            requestType: AppPRAddNoteRequest,
            requestStream: false,
            responseType: UUID,
            responseStream: false,
            options: {},
        },
        updateNote: {
            name: "UpdateNote",
            requestType: AppPRUpdateNoteRequest,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
        removeNote: {
            name: "RemoveNote",
            requestType: UUID,
            requestStream: false,
            responseType: Empty,
            responseStream: false,
            options: {},
        },
        listModmailConversations: {
            name: "ListModmailConversations",
            requestType: AppPRListModmailConversationsRequest,
            requestStream: false,
            responseType: AppPRListModmailConversationsResponse,
            responseStream: false,
            options: {},
        },
        /**
         * Modmail-specific review flow. This updates the review decision and sends
         * the modmail payload in one RPC. Use SetReviewDecision for non-modmail
         * workflows.
         */
        setReviewDecisionWithModmail: {
            name: "SetReviewDecisionWithModmail",
            requestType: AppPRSetReviewDecisionWithModmailRequest,
            requestStream: false,
            responseType: AppPRSetReviewDecisionWithModmailResponse,
            responseStream: false,
            options: {},
        },
    },
};
export const DeveloperAccountServiceName = "devvit.dev_portal.DeveloperAccount";
export class DeveloperAccountClientImpl {
    constructor(rpc, opts) {
        this.service = opts?.service || DeveloperAccountServiceName;
        this.rpc = rpc;
        this.RegisterUser = this.RegisterUser.bind(this);
        this.GetUserAccountInfoIfExists = this.GetUserAccountInfoIfExists.bind(this);
    }
    RegisterUser(request, metadata) {
        const data = DeveloperAccountRegisterUserRequest.encode(request).finish();
        const promise = this.rpc.request(this.service, "RegisterUser", data, metadata);
        return promise.then((data) => DeveloperAccountInfo.decode(_m0.Reader.create(data)));
    }
    GetUserAccountInfoIfExists(request, metadata) {
        const data = Empty.encode(request).finish();
        const promise = this.rpc.request(this.service, "GetUserAccountInfoIfExists", data, metadata);
        return promise.then((data) => GetUserAccountInfoResponse.decode(_m0.Reader.create(data)));
    }
}
export const DeveloperAccountDefinition = {
    name: "DeveloperAccount",
    fullName: "devvit.dev_portal.DeveloperAccount",
    methods: {
        registerUser: {
            name: "RegisterUser",
            requestType: DeveloperAccountRegisterUserRequest,
            requestStream: false,
            responseType: DeveloperAccountInfo,
            responseStream: false,
            options: {},
        },
        getUserAccountInfoIfExists: {
            name: "GetUserAccountInfoIfExists",
            requestType: Empty,
            requestStream: false,
            responseType: GetUserAccountInfoResponse,
            responseStream: false,
            options: {},
        },
    },
};
