// chrome/browser/ui/webui/updater/updater_ui.mojom-webui.ts is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import { mojo } from '//resources/mojo/mojo/public/js/bindings.js';
import { MojoBrowserProxyFactory } from '//resources/mojo/mojo_browser_proxy.js';
import { BigBufferSpec as mojoBase_mojom_BigBufferSpec } from '//resources/mojo/mojo/public/mojom/base/big_buffer.mojom-webui.js';
import { FilePathSpec as mojoBase_mojom_FilePathSpec } from '//resources/mojo/mojo/public/mojom/base/file_path.mojom-webui.js';
import { JSTimeSpec as mojoBase_mojom_JSTimeSpec } from '//resources/mojo/mojo/public/mojom/base/time.mojom-webui.js';
export const ShowDirectoryTargetSpec = { $: mojo.internal.Enum() };
export var ShowDirectoryTarget;
(function (ShowDirectoryTarget) {
    ShowDirectoryTarget[ShowDirectoryTarget["MIN_VALUE"] = 0] = "MIN_VALUE";
    ShowDirectoryTarget[ShowDirectoryTarget["MAX_VALUE"] = 2] = "MAX_VALUE";
    ShowDirectoryTarget[ShowDirectoryTarget["kSystemUpdater"] = 0] = "kSystemUpdater";
    ShowDirectoryTarget[ShowDirectoryTarget["kUserUpdater"] = 1] = "kUserUpdater";
    ShowDirectoryTarget[ShowDirectoryTarget["kEnterpriseCompanionApp"] = 2] = "kEnterpriseCompanionApp";
})(ShowDirectoryTarget || (ShowDirectoryTarget = {}));
export const HistoryFilterSpec = { $: mojo.internal.Enum() };
export var HistoryFilter;
(function (HistoryFilter) {
    HistoryFilter[HistoryFilter["MIN_VALUE"] = 0] = "MIN_VALUE";
    HistoryFilter[HistoryFilter["MAX_VALUE"] = 5] = "MAX_VALUE";
    HistoryFilter[HistoryFilter["kApp"] = 0] = "kApp";
    HistoryFilter[HistoryFilter["kEvent"] = 1] = "kEvent";
    HistoryFilter[HistoryFilter["kOutcome"] = 2] = "kOutcome";
    HistoryFilter[HistoryFilter["kDate"] = 3] = "kDate";
    HistoryFilter[HistoryFilter["kScope"] = 4] = "kScope";
    HistoryFilter[HistoryFilter["kAll"] = 5] = "kAll";
})(HistoryFilter || (HistoryFilter = {}));
export class PageHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'updater_ui.mojom.PageHandlerFactory', scope);
    }
}
export class PageHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(PageHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createPageHandler(page, handler) {
        this.proxy.sendMessage(108481000, PageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, [
            page,
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the PageHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class PageHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(108481000, PageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, impl.createPageHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class PageHandlerFactory {
    static get $interfaceName() {
        return "updater_ui.mojom.PageHandlerFactory";
    }
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote() {
        let remote = new PageHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the PageHandlerFactory
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export class PageHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createPageHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.createPageHandler =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(108481000, PageHandlerFactory_CreatePageHandler_ParamsSpec.$, null, this.createPageHandler.createReceiverHandler(false /* expectsResponse */), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export class PageHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'updater_ui.mojom.PageHandler', scope);
    }
}
export class PageHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(PageHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    getAllUpdaterEvents() {
        return this.proxy.sendMessage(1021481800, PageHandler_GetAllUpdaterEvents_ParamsSpec.$, PageHandler_GetAllUpdaterEvents_ResponseParamsSpec.$, [], false);
    }
    getUpdaterStates() {
        return this.proxy.sendMessage(2066630691, PageHandler_GetUpdaterStates_ParamsSpec.$, PageHandler_GetUpdaterStates_ResponseParamsSpec.$, [], true);
    }
    getEnterpriseCompanionState() {
        return this.proxy.sendMessage(358279562, PageHandler_GetEnterpriseCompanionState_ParamsSpec.$, PageHandler_GetEnterpriseCompanionState_ResponseParamsSpec.$, [], true);
    }
    getAppStates() {
        return this.proxy.sendMessage(833579114, PageHandler_GetAppStates_ParamsSpec.$, PageHandler_GetAppStates_ResponseParamsSpec.$, [], true);
    }
    showDirectory(scope) {
        this.proxy.sendMessage(1441031772, PageHandler_ShowDirectory_ParamsSpec.$, null, [
            scope
        ], false);
    }
    recordFilterChange(filter) {
        this.proxy.sendMessage(96813383, PageHandler_RecordFilterChange_ParamsSpec.$, null, [
            filter
        ], false);
    }
    unzipUpdaterHistoryFiles(zipData) {
        return this.proxy.sendMessage(1520207430, PageHandler_UnzipUpdaterHistoryFiles_ParamsSpec.$, PageHandler_UnzipUpdaterHistoryFiles_ResponseParamsSpec.$, [
            zipData
        ], true);
    }
}
;
/**
 * An object which receives request messages for the PageHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class PageHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1021481800, PageHandler_GetAllUpdaterEvents_ParamsSpec.$, PageHandler_GetAllUpdaterEvents_ResponseParamsSpec.$, impl.getAllUpdaterEvents.bind(impl), false);
        this.helper_internal_.registerHandler(2066630691, PageHandler_GetUpdaterStates_ParamsSpec.$, PageHandler_GetUpdaterStates_ResponseParamsSpec.$, impl.getUpdaterStates.bind(impl), true);
        this.helper_internal_.registerHandler(358279562, PageHandler_GetEnterpriseCompanionState_ParamsSpec.$, PageHandler_GetEnterpriseCompanionState_ResponseParamsSpec.$, impl.getEnterpriseCompanionState.bind(impl), true);
        this.helper_internal_.registerHandler(833579114, PageHandler_GetAppStates_ParamsSpec.$, PageHandler_GetAppStates_ResponseParamsSpec.$, impl.getAppStates.bind(impl), true);
        this.helper_internal_.registerHandler(1441031772, PageHandler_ShowDirectory_ParamsSpec.$, null, impl.showDirectory.bind(impl), false);
        this.helper_internal_.registerHandler(96813383, PageHandler_RecordFilterChange_ParamsSpec.$, null, impl.recordFilterChange.bind(impl), false);
        this.helper_internal_.registerHandler(1520207430, PageHandler_UnzipUpdaterHistoryFiles_ParamsSpec.$, PageHandler_UnzipUpdaterHistoryFiles_ResponseParamsSpec.$, impl.unzipUpdaterHistoryFiles.bind(impl), true);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class PageHandler {
    static get $interfaceName() {
        return "updater_ui.mojom.PageHandler";
    }
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote() {
        let remote = new PageHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the PageHandler
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export class PageHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    getAllUpdaterEvents;
    getUpdaterStates;
    getEnterpriseCompanionState;
    getAppStates;
    showDirectory;
    recordFilterChange;
    unzipUpdaterHistoryFiles;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.getAllUpdaterEvents =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1021481800, PageHandler_GetAllUpdaterEvents_ParamsSpec.$, PageHandler_GetAllUpdaterEvents_ResponseParamsSpec.$, this.getAllUpdaterEvents.createReceiverHandler(true /* expectsResponse */), false);
        this.getUpdaterStates =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(2066630691, PageHandler_GetUpdaterStates_ParamsSpec.$, PageHandler_GetUpdaterStates_ResponseParamsSpec.$, this.getUpdaterStates.createReceiverHandler(true /* expectsResponse */), true);
        this.getEnterpriseCompanionState =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(358279562, PageHandler_GetEnterpriseCompanionState_ParamsSpec.$, PageHandler_GetEnterpriseCompanionState_ResponseParamsSpec.$, this.getEnterpriseCompanionState.createReceiverHandler(true /* expectsResponse */), true);
        this.getAppStates =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(833579114, PageHandler_GetAppStates_ParamsSpec.$, PageHandler_GetAppStates_ResponseParamsSpec.$, this.getAppStates.createReceiverHandler(true /* expectsResponse */), true);
        this.showDirectory =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1441031772, PageHandler_ShowDirectory_ParamsSpec.$, null, this.showDirectory.createReceiverHandler(false /* expectsResponse */), false);
        this.recordFilterChange =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(96813383, PageHandler_RecordFilterChange_ParamsSpec.$, null, this.recordFilterChange.createReceiverHandler(false /* expectsResponse */), false);
        this.unzipUpdaterHistoryFiles =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1520207430, PageHandler_UnzipUpdaterHistoryFiles_ParamsSpec.$, PageHandler_UnzipUpdaterHistoryFiles_ResponseParamsSpec.$, this.unzipUpdaterHistoryFiles.createReceiverHandler(true /* expectsResponse */), true);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export class PagePendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'updater_ui.mojom.Page', scope);
    }
}
export class PageRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(PagePendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
}
;
/**
 * An object which receives request messages for the Page
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class PageReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(_impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class Page {
    static get $interfaceName() {
        return "updater_ui.mojom.Page";
    }
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote() {
        let remote = new PageRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the Page
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export class PageCallbackRouter {
    helper_internal_;
    $;
    router_;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(PageRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export const UpdaterStateSpec = { $: {} };
export const GetUpdaterStatesResponseSpec = { $: {} };
export const GetUpdaterStatesErrorSpec = { $: {} };
export const EnterpriseCompanionStateSpec = { $: {} };
export const GetEnterpriseCompanionStateResponseSpec = { $: {} };
export const GetEnterpriseCompanionStateErrorSpec = { $: {} };
export const AppStateSpec = { $: {} };
export const GetAppStatesResponseSpec = { $: {} };
export const GetAppStatesErrorSpec = { $: {} };
export const UnzipUpdaterHistoryFilesResponseSpec = { $: {} };
export const UnzipUpdaterHistoryFilesErrorSpec = { $: {} };
export const PageHandlerFactory_CreatePageHandler_ParamsSpec = { $: {} };
export const PageHandler_GetAllUpdaterEvents_ParamsSpec = { $: {} };
export const PageHandler_GetAllUpdaterEvents_ResponseParamsSpec = { $: {} };
export const PageHandler_GetUpdaterStates_ParamsSpec = { $: {} };
export const PageHandler_GetUpdaterStates_ResponseParamsSpec = { $: {} };
export const PageHandler_GetEnterpriseCompanionState_ParamsSpec = { $: {} };
export const PageHandler_GetEnterpriseCompanionState_ResponseParamsSpec = { $: {} };
export const PageHandler_GetAppStates_ParamsSpec = { $: {} };
export const PageHandler_GetAppStates_ResponseParamsSpec = { $: {} };
export const PageHandler_ShowDirectory_ParamsSpec = { $: {} };
export const PageHandler_RecordFilterChange_ParamsSpec = { $: {} };
export const PageHandler_UnzipUpdaterHistoryFiles_ParamsSpec = { $: {} };
export const PageHandler_UnzipUpdaterHistoryFiles_ResponseParamsSpec = { $: {} };
export const PageHandler_GetUpdaterStates_ResponseParam_ResultSpec = { $: {} };
export const PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultSpec = { $: {} };
export const PageHandler_GetAppStates_ResponseParam_ResultSpec = { $: {} };
export const PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultSpec = { $: {} };
mojo.internal.Struct(UpdaterStateSpec.$, 'UpdaterState', [
    mojo.internal.StructField('activeVersion', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('inactiveVersions', 8, 0, mojo.internal.Array(mojo.internal.String, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastChecked', 16, 0, mojoBase_mojom_JSTimeSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('lastStarted', 24, 0, mojoBase_mojom_JSTimeSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('installationDirectory', 32, 0, mojoBase_mojom_FilePathSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('policies', 40, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 56],]);
mojo.internal.Struct(GetUpdaterStatesResponseSpec.$, 'GetUpdaterStatesResponse', [
    mojo.internal.StructField('system', 0, 0, UpdaterStateSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('user', 8, 0, UpdaterStateSpec.$, null, true /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(GetUpdaterStatesErrorSpec.$, 'GetUpdaterStatesError', [
    mojo.internal.StructField('message', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(EnterpriseCompanionStateSpec.$, 'EnterpriseCompanionState', [
    mojo.internal.StructField('version', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('installationDirectory', 8, 0, mojoBase_mojom_FilePathSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(GetEnterpriseCompanionStateResponseSpec.$, 'GetEnterpriseCompanionStateResponse', [
    mojo.internal.StructField('state', 0, 0, EnterpriseCompanionStateSpec.$, null, true /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(GetEnterpriseCompanionStateErrorSpec.$, 'GetEnterpriseCompanionStateError', [
    mojo.internal.StructField('message', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(AppStateSpec.$, 'AppState', [
    mojo.internal.StructField('appId', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('version', 8, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('cohort', 16, 0, mojo.internal.String, null, true /* nullable */, 0, undefined, undefined),
], [[0, 32],]);
mojo.internal.Struct(GetAppStatesResponseSpec.$, 'GetAppStatesResponse', [
    mojo.internal.StructField('systemApps', 0, 0, mojo.internal.Array(AppStateSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('userApps', 8, 0, mojo.internal.Array(AppStateSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(GetAppStatesErrorSpec.$, 'GetAppStatesError', [
    mojo.internal.StructField('message', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(UnzipUpdaterHistoryFilesResponseSpec.$, 'UnzipUpdaterHistoryFilesResponse', [
    mojo.internal.StructField('historyFileContents', 0, 0, mojo.internal.Array(mojo.internal.String, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(UnzipUpdaterHistoryFilesErrorSpec.$, 'UnzipUpdaterHistoryFilesError', [
    mojo.internal.StructField('message', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandlerFactory_CreatePageHandler_ParamsSpec.$, 'PageHandlerFactory_CreatePageHandler_Params', [
    mojo.internal.StructField('page', 0, 0, mojo.internal.InterfaceProxy(PageRemote), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('handler', 8, 0, mojo.internal.InterfaceRequest(PageHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandler_GetAllUpdaterEvents_ParamsSpec.$, 'PageHandler_GetAllUpdaterEvents_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetAllUpdaterEvents_ResponseParamsSpec.$, 'PageHandler_GetAllUpdaterEvents_ResponseParams', [
    mojo.internal.StructField('events', 0, 0, mojo.internal.Array(mojo.internal.String, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_GetUpdaterStates_ParamsSpec.$, 'PageHandler_GetUpdaterStates_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetUpdaterStates_ResponseParamsSpec.$, 'PageHandler_GetUpdaterStates_ResponseParams', [
    mojo.internal.StructField('result', 0, 0, PageHandler_GetUpdaterStates_ResponseParam_ResultSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandler_GetEnterpriseCompanionState_ParamsSpec.$, 'PageHandler_GetEnterpriseCompanionState_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetEnterpriseCompanionState_ResponseParamsSpec.$, 'PageHandler_GetEnterpriseCompanionState_ResponseParams', [
    mojo.internal.StructField('result', 0, 0, PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandler_GetAppStates_ParamsSpec.$, 'PageHandler_GetAppStates_Params', [], [[0, 8],]);
mojo.internal.Struct(PageHandler_GetAppStates_ResponseParamsSpec.$, 'PageHandler_GetAppStates_ResponseParams', [
    mojo.internal.StructField('result', 0, 0, PageHandler_GetAppStates_ResponseParam_ResultSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandler_ShowDirectory_ParamsSpec.$, 'PageHandler_ShowDirectory_Params', [
    mojo.internal.StructField('scope', 0, 0, ShowDirectoryTargetSpec.$, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_RecordFilterChange_ParamsSpec.$, 'PageHandler_RecordFilterChange_Params', [
    mojo.internal.StructField('filter', 0, 0, HistoryFilterSpec.$, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(PageHandler_UnzipUpdaterHistoryFiles_ParamsSpec.$, 'PageHandler_UnzipUpdaterHistoryFiles_Params', [
    mojo.internal.StructField('zipData', 0, 0, mojoBase_mojom_BigBufferSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(PageHandler_UnzipUpdaterHistoryFiles_ResponseParamsSpec.$, 'PageHandler_UnzipUpdaterHistoryFiles_ResponseParams', [
    mojo.internal.StructField('result', 0, 0, PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Union(PageHandler_GetUpdaterStates_ResponseParam_ResultSpec.$, 'PageHandler_GetUpdaterStates_ResponseParam_Result', {
    'success': {
        'ordinal': 0,
        'type': GetUpdaterStatesResponseSpec.$,
    },
    'failure': {
        'ordinal': 1,
        'type': GetUpdaterStatesErrorSpec.$,
    },
});
export var PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags;
(function (PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags) {
    PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags[PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags["SUCCESS"] = 0] = "SUCCESS";
    PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags[PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags["FAILURE"] = 1] = "FAILURE";
})(PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags || (PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags = {}));
export function whichPageHandler_GetUpdaterStates_ResponseParam_Result(u) {
    if (u.success !== null && u.success !== undefined) {
        return PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags.SUCCESS;
    }
    if (u.failure !== null && u.failure !== undefined) {
        return PageHandler_GetUpdaterStates_ResponseParam_ResultFieldTags.FAILURE;
    }
    throw new Error("no union field has been set, this is an illegal state");
}
mojo.internal.Union(PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultSpec.$, 'PageHandler_GetEnterpriseCompanionState_ResponseParam_Result', {
    'success': {
        'ordinal': 0,
        'type': GetEnterpriseCompanionStateResponseSpec.$,
    },
    'failure': {
        'ordinal': 1,
        'type': GetEnterpriseCompanionStateErrorSpec.$,
    },
});
export var PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags;
(function (PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags) {
    PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags[PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags["SUCCESS"] = 0] = "SUCCESS";
    PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags[PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags["FAILURE"] = 1] = "FAILURE";
})(PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags || (PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags = {}));
export function whichPageHandler_GetEnterpriseCompanionState_ResponseParam_Result(u) {
    if (u.success !== null && u.success !== undefined) {
        return PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags.SUCCESS;
    }
    if (u.failure !== null && u.failure !== undefined) {
        return PageHandler_GetEnterpriseCompanionState_ResponseParam_ResultFieldTags.FAILURE;
    }
    throw new Error("no union field has been set, this is an illegal state");
}
mojo.internal.Union(PageHandler_GetAppStates_ResponseParam_ResultSpec.$, 'PageHandler_GetAppStates_ResponseParam_Result', {
    'success': {
        'ordinal': 0,
        'type': GetAppStatesResponseSpec.$,
    },
    'failure': {
        'ordinal': 1,
        'type': GetAppStatesErrorSpec.$,
    },
});
export var PageHandler_GetAppStates_ResponseParam_ResultFieldTags;
(function (PageHandler_GetAppStates_ResponseParam_ResultFieldTags) {
    PageHandler_GetAppStates_ResponseParam_ResultFieldTags[PageHandler_GetAppStates_ResponseParam_ResultFieldTags["SUCCESS"] = 0] = "SUCCESS";
    PageHandler_GetAppStates_ResponseParam_ResultFieldTags[PageHandler_GetAppStates_ResponseParam_ResultFieldTags["FAILURE"] = 1] = "FAILURE";
})(PageHandler_GetAppStates_ResponseParam_ResultFieldTags || (PageHandler_GetAppStates_ResponseParam_ResultFieldTags = {}));
export function whichPageHandler_GetAppStates_ResponseParam_Result(u) {
    if (u.success !== null && u.success !== undefined) {
        return PageHandler_GetAppStates_ResponseParam_ResultFieldTags.SUCCESS;
    }
    if (u.failure !== null && u.failure !== undefined) {
        return PageHandler_GetAppStates_ResponseParam_ResultFieldTags.FAILURE;
    }
    throw new Error("no union field has been set, this is an illegal state");
}
mojo.internal.Union(PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultSpec.$, 'PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_Result', {
    'success': {
        'ordinal': 0,
        'type': UnzipUpdaterHistoryFilesResponseSpec.$,
    },
    'failure': {
        'ordinal': 1,
        'type': UnzipUpdaterHistoryFilesErrorSpec.$,
    },
});
export var PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags;
(function (PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags) {
    PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags[PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags["SUCCESS"] = 0] = "SUCCESS";
    PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags[PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags["FAILURE"] = 1] = "FAILURE";
})(PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags || (PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags = {}));
export function whichPageHandler_UnzipUpdaterHistoryFiles_ResponseParam_Result(u) {
    if (u.success !== null && u.success !== undefined) {
        return PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags.SUCCESS;
    }
    if (u.failure !== null && u.failure !== undefined) {
        return PageHandler_UnzipUpdaterHistoryFiles_ResponseParam_ResultFieldTags.FAILURE;
    }
    throw new Error("no union field has been set, this is an illegal state");
}
export const browserProxyFactory = new MojoBrowserProxyFactory(PageHandlerRemote, PageCallbackRouter, (remote, receiver) => PageHandlerFactory.getRemote().createPageHandler(remote, receiver));
