"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateReserveRewardsMaxAprBps = exports.DeprecatedUpdateReserveRewardsMaxAprPct = exports.UpdatePermissionedOps = exports.UpdatePermissioningAuthority = exports.UpdateWithdrawTicketCancellationEnabled = exports.UpdateMinPartialRolloverValue = exports.UpdateObligationBorrowMigrationToFixedExecutionEnabled = exports.UpdateTermBasedFullLiquidationDurationSecs = exports.UpdateObligationBorrowRolloverConfigurationEnabled = exports.UpdateOpenTermRolloverWindowDurationSeconds = exports.UpdateFixedTermRolloverWindowDurationSeconds = exports.UpdateMinWithdrawQueuedLiquidityValue = exports.UpdateWithdrawTicketRedemptionEnabled = exports.UpdateWithdrawTicketIssuanceEnabled = exports.UpdateMinBorrowOrderFillValue = exports.UpdateBorrowOrderExecutionEnabled = exports.UpdateBorrowOrderCreationEnabled = exports.UpdateObligationBorrowDebtTermLiquidationEnabled = exports.UpdateMatureReserveDebtLiquidationEnabled = exports.UpdatePriceTriggeredLiquidationDisabled = exports.UpdateProposerAuthority = exports.UpdateObligationOrderCreationEnabled = exports.UpdateImmutableFlag = exports.UpdateObligationOrderExecutionEnabled = exports.UpdateInitialDepositAmount = exports.UpdateIndividualAutodeleverageMarginCallPeriodSecs = exports.UpdateName = exports.UpdatePaddingFields = exports.UpdateMinValueBfSkipPriorityLiqCheck = exports.UpdateMinValueLtvSkipPriorityLiqCheck = exports.UpdateMinNetValueObligationPostAction = exports.UpdateBorrowingDisabled = exports.UpdateAutodeleverageEnabled = exports.UpdatePriceRefreshTriggerToMaxAgePct = exports.DeprecatedUpdateMultiplierPoints = exports.UpdateReferralFeeBps = exports.UpdateElevationGroup = exports.UpdateInsolvencyRiskLtv = exports.UpdateMinFullLiquidationThreshold = exports.UpdateEmergencyCouncil = exports.UpdateGlobalAllowedBorrow = exports.DeprecatedUpdateGlobalUnhealthyBorrow = exports.UpdateLiquidationMaxValue = exports.UpdateLiquidationCloseFactor = exports.UpdateEmergencyMode = exports.UpdateOwner = void 0;
exports.fromDecoded = fromDecoded;
exports.fromJSON = fromJSON;
exports.layout = layout;
const borsh = __importStar(require("@coral-xyz/borsh"));
class UpdateOwner {
    static discriminator = 0;
    static kind = "UpdateOwner";
    discriminator = 0;
    kind = "UpdateOwner";
    toJSON() {
        return {
            kind: "UpdateOwner",
        };
    }
    toEncodable() {
        return {
            UpdateOwner: {},
        };
    }
}
exports.UpdateOwner = UpdateOwner;
class UpdateEmergencyMode {
    static discriminator = 1;
    static kind = "UpdateEmergencyMode";
    discriminator = 1;
    kind = "UpdateEmergencyMode";
    toJSON() {
        return {
            kind: "UpdateEmergencyMode",
        };
    }
    toEncodable() {
        return {
            UpdateEmergencyMode: {},
        };
    }
}
exports.UpdateEmergencyMode = UpdateEmergencyMode;
class UpdateLiquidationCloseFactor {
    static discriminator = 2;
    static kind = "UpdateLiquidationCloseFactor";
    discriminator = 2;
    kind = "UpdateLiquidationCloseFactor";
    toJSON() {
        return {
            kind: "UpdateLiquidationCloseFactor",
        };
    }
    toEncodable() {
        return {
            UpdateLiquidationCloseFactor: {},
        };
    }
}
exports.UpdateLiquidationCloseFactor = UpdateLiquidationCloseFactor;
class UpdateLiquidationMaxValue {
    static discriminator = 3;
    static kind = "UpdateLiquidationMaxValue";
    discriminator = 3;
    kind = "UpdateLiquidationMaxValue";
    toJSON() {
        return {
            kind: "UpdateLiquidationMaxValue",
        };
    }
    toEncodable() {
        return {
            UpdateLiquidationMaxValue: {},
        };
    }
}
exports.UpdateLiquidationMaxValue = UpdateLiquidationMaxValue;
class DeprecatedUpdateGlobalUnhealthyBorrow {
    static discriminator = 4;
    static kind = "DeprecatedUpdateGlobalUnhealthyBorrow";
    discriminator = 4;
    kind = "DeprecatedUpdateGlobalUnhealthyBorrow";
    toJSON() {
        return {
            kind: "DeprecatedUpdateGlobalUnhealthyBorrow",
        };
    }
    toEncodable() {
        return {
            DeprecatedUpdateGlobalUnhealthyBorrow: {},
        };
    }
}
exports.DeprecatedUpdateGlobalUnhealthyBorrow = DeprecatedUpdateGlobalUnhealthyBorrow;
class UpdateGlobalAllowedBorrow {
    static discriminator = 5;
    static kind = "UpdateGlobalAllowedBorrow";
    discriminator = 5;
    kind = "UpdateGlobalAllowedBorrow";
    toJSON() {
        return {
            kind: "UpdateGlobalAllowedBorrow",
        };
    }
    toEncodable() {
        return {
            UpdateGlobalAllowedBorrow: {},
        };
    }
}
exports.UpdateGlobalAllowedBorrow = UpdateGlobalAllowedBorrow;
class UpdateEmergencyCouncil {
    static discriminator = 6;
    static kind = "UpdateEmergencyCouncil";
    discriminator = 6;
    kind = "UpdateEmergencyCouncil";
    toJSON() {
        return {
            kind: "UpdateEmergencyCouncil",
        };
    }
    toEncodable() {
        return {
            UpdateEmergencyCouncil: {},
        };
    }
}
exports.UpdateEmergencyCouncil = UpdateEmergencyCouncil;
class UpdateMinFullLiquidationThreshold {
    static discriminator = 7;
    static kind = "UpdateMinFullLiquidationThreshold";
    discriminator = 7;
    kind = "UpdateMinFullLiquidationThreshold";
    toJSON() {
        return {
            kind: "UpdateMinFullLiquidationThreshold",
        };
    }
    toEncodable() {
        return {
            UpdateMinFullLiquidationThreshold: {},
        };
    }
}
exports.UpdateMinFullLiquidationThreshold = UpdateMinFullLiquidationThreshold;
class UpdateInsolvencyRiskLtv {
    static discriminator = 8;
    static kind = "UpdateInsolvencyRiskLtv";
    discriminator = 8;
    kind = "UpdateInsolvencyRiskLtv";
    toJSON() {
        return {
            kind: "UpdateInsolvencyRiskLtv",
        };
    }
    toEncodable() {
        return {
            UpdateInsolvencyRiskLtv: {},
        };
    }
}
exports.UpdateInsolvencyRiskLtv = UpdateInsolvencyRiskLtv;
class UpdateElevationGroup {
    static discriminator = 9;
    static kind = "UpdateElevationGroup";
    discriminator = 9;
    kind = "UpdateElevationGroup";
    toJSON() {
        return {
            kind: "UpdateElevationGroup",
        };
    }
    toEncodable() {
        return {
            UpdateElevationGroup: {},
        };
    }
}
exports.UpdateElevationGroup = UpdateElevationGroup;
class UpdateReferralFeeBps {
    static discriminator = 10;
    static kind = "UpdateReferralFeeBps";
    discriminator = 10;
    kind = "UpdateReferralFeeBps";
    toJSON() {
        return {
            kind: "UpdateReferralFeeBps",
        };
    }
    toEncodable() {
        return {
            UpdateReferralFeeBps: {},
        };
    }
}
exports.UpdateReferralFeeBps = UpdateReferralFeeBps;
class DeprecatedUpdateMultiplierPoints {
    static discriminator = 11;
    static kind = "DeprecatedUpdateMultiplierPoints";
    discriminator = 11;
    kind = "DeprecatedUpdateMultiplierPoints";
    toJSON() {
        return {
            kind: "DeprecatedUpdateMultiplierPoints",
        };
    }
    toEncodable() {
        return {
            DeprecatedUpdateMultiplierPoints: {},
        };
    }
}
exports.DeprecatedUpdateMultiplierPoints = DeprecatedUpdateMultiplierPoints;
class UpdatePriceRefreshTriggerToMaxAgePct {
    static discriminator = 12;
    static kind = "UpdatePriceRefreshTriggerToMaxAgePct";
    discriminator = 12;
    kind = "UpdatePriceRefreshTriggerToMaxAgePct";
    toJSON() {
        return {
            kind: "UpdatePriceRefreshTriggerToMaxAgePct",
        };
    }
    toEncodable() {
        return {
            UpdatePriceRefreshTriggerToMaxAgePct: {},
        };
    }
}
exports.UpdatePriceRefreshTriggerToMaxAgePct = UpdatePriceRefreshTriggerToMaxAgePct;
class UpdateAutodeleverageEnabled {
    static discriminator = 13;
    static kind = "UpdateAutodeleverageEnabled";
    discriminator = 13;
    kind = "UpdateAutodeleverageEnabled";
    toJSON() {
        return {
            kind: "UpdateAutodeleverageEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateAutodeleverageEnabled: {},
        };
    }
}
exports.UpdateAutodeleverageEnabled = UpdateAutodeleverageEnabled;
class UpdateBorrowingDisabled {
    static discriminator = 14;
    static kind = "UpdateBorrowingDisabled";
    discriminator = 14;
    kind = "UpdateBorrowingDisabled";
    toJSON() {
        return {
            kind: "UpdateBorrowingDisabled",
        };
    }
    toEncodable() {
        return {
            UpdateBorrowingDisabled: {},
        };
    }
}
exports.UpdateBorrowingDisabled = UpdateBorrowingDisabled;
class UpdateMinNetValueObligationPostAction {
    static discriminator = 15;
    static kind = "UpdateMinNetValueObligationPostAction";
    discriminator = 15;
    kind = "UpdateMinNetValueObligationPostAction";
    toJSON() {
        return {
            kind: "UpdateMinNetValueObligationPostAction",
        };
    }
    toEncodable() {
        return {
            UpdateMinNetValueObligationPostAction: {},
        };
    }
}
exports.UpdateMinNetValueObligationPostAction = UpdateMinNetValueObligationPostAction;
class UpdateMinValueLtvSkipPriorityLiqCheck {
    static discriminator = 16;
    static kind = "UpdateMinValueLtvSkipPriorityLiqCheck";
    discriminator = 16;
    kind = "UpdateMinValueLtvSkipPriorityLiqCheck";
    toJSON() {
        return {
            kind: "UpdateMinValueLtvSkipPriorityLiqCheck",
        };
    }
    toEncodable() {
        return {
            UpdateMinValueLtvSkipPriorityLiqCheck: {},
        };
    }
}
exports.UpdateMinValueLtvSkipPriorityLiqCheck = UpdateMinValueLtvSkipPriorityLiqCheck;
class UpdateMinValueBfSkipPriorityLiqCheck {
    static discriminator = 17;
    static kind = "UpdateMinValueBfSkipPriorityLiqCheck";
    discriminator = 17;
    kind = "UpdateMinValueBfSkipPriorityLiqCheck";
    toJSON() {
        return {
            kind: "UpdateMinValueBfSkipPriorityLiqCheck",
        };
    }
    toEncodable() {
        return {
            UpdateMinValueBfSkipPriorityLiqCheck: {},
        };
    }
}
exports.UpdateMinValueBfSkipPriorityLiqCheck = UpdateMinValueBfSkipPriorityLiqCheck;
class UpdatePaddingFields {
    static discriminator = 18;
    static kind = "UpdatePaddingFields";
    discriminator = 18;
    kind = "UpdatePaddingFields";
    toJSON() {
        return {
            kind: "UpdatePaddingFields",
        };
    }
    toEncodable() {
        return {
            UpdatePaddingFields: {},
        };
    }
}
exports.UpdatePaddingFields = UpdatePaddingFields;
class UpdateName {
    static discriminator = 19;
    static kind = "UpdateName";
    discriminator = 19;
    kind = "UpdateName";
    toJSON() {
        return {
            kind: "UpdateName",
        };
    }
    toEncodable() {
        return {
            UpdateName: {},
        };
    }
}
exports.UpdateName = UpdateName;
class UpdateIndividualAutodeleverageMarginCallPeriodSecs {
    static discriminator = 20;
    static kind = "UpdateIndividualAutodeleverageMarginCallPeriodSecs";
    discriminator = 20;
    kind = "UpdateIndividualAutodeleverageMarginCallPeriodSecs";
    toJSON() {
        return {
            kind: "UpdateIndividualAutodeleverageMarginCallPeriodSecs",
        };
    }
    toEncodable() {
        return {
            UpdateIndividualAutodeleverageMarginCallPeriodSecs: {},
        };
    }
}
exports.UpdateIndividualAutodeleverageMarginCallPeriodSecs = UpdateIndividualAutodeleverageMarginCallPeriodSecs;
class UpdateInitialDepositAmount {
    static discriminator = 21;
    static kind = "UpdateInitialDepositAmount";
    discriminator = 21;
    kind = "UpdateInitialDepositAmount";
    toJSON() {
        return {
            kind: "UpdateInitialDepositAmount",
        };
    }
    toEncodable() {
        return {
            UpdateInitialDepositAmount: {},
        };
    }
}
exports.UpdateInitialDepositAmount = UpdateInitialDepositAmount;
class UpdateObligationOrderExecutionEnabled {
    static discriminator = 22;
    static kind = "UpdateObligationOrderExecutionEnabled";
    discriminator = 22;
    kind = "UpdateObligationOrderExecutionEnabled";
    toJSON() {
        return {
            kind: "UpdateObligationOrderExecutionEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateObligationOrderExecutionEnabled: {},
        };
    }
}
exports.UpdateObligationOrderExecutionEnabled = UpdateObligationOrderExecutionEnabled;
class UpdateImmutableFlag {
    static discriminator = 23;
    static kind = "UpdateImmutableFlag";
    discriminator = 23;
    kind = "UpdateImmutableFlag";
    toJSON() {
        return {
            kind: "UpdateImmutableFlag",
        };
    }
    toEncodable() {
        return {
            UpdateImmutableFlag: {},
        };
    }
}
exports.UpdateImmutableFlag = UpdateImmutableFlag;
class UpdateObligationOrderCreationEnabled {
    static discriminator = 24;
    static kind = "UpdateObligationOrderCreationEnabled";
    discriminator = 24;
    kind = "UpdateObligationOrderCreationEnabled";
    toJSON() {
        return {
            kind: "UpdateObligationOrderCreationEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateObligationOrderCreationEnabled: {},
        };
    }
}
exports.UpdateObligationOrderCreationEnabled = UpdateObligationOrderCreationEnabled;
class UpdateProposerAuthority {
    static discriminator = 25;
    static kind = "UpdateProposerAuthority";
    discriminator = 25;
    kind = "UpdateProposerAuthority";
    toJSON() {
        return {
            kind: "UpdateProposerAuthority",
        };
    }
    toEncodable() {
        return {
            UpdateProposerAuthority: {},
        };
    }
}
exports.UpdateProposerAuthority = UpdateProposerAuthority;
class UpdatePriceTriggeredLiquidationDisabled {
    static discriminator = 26;
    static kind = "UpdatePriceTriggeredLiquidationDisabled";
    discriminator = 26;
    kind = "UpdatePriceTriggeredLiquidationDisabled";
    toJSON() {
        return {
            kind: "UpdatePriceTriggeredLiquidationDisabled",
        };
    }
    toEncodable() {
        return {
            UpdatePriceTriggeredLiquidationDisabled: {},
        };
    }
}
exports.UpdatePriceTriggeredLiquidationDisabled = UpdatePriceTriggeredLiquidationDisabled;
class UpdateMatureReserveDebtLiquidationEnabled {
    static discriminator = 27;
    static kind = "UpdateMatureReserveDebtLiquidationEnabled";
    discriminator = 27;
    kind = "UpdateMatureReserveDebtLiquidationEnabled";
    toJSON() {
        return {
            kind: "UpdateMatureReserveDebtLiquidationEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateMatureReserveDebtLiquidationEnabled: {},
        };
    }
}
exports.UpdateMatureReserveDebtLiquidationEnabled = UpdateMatureReserveDebtLiquidationEnabled;
class UpdateObligationBorrowDebtTermLiquidationEnabled {
    static discriminator = 28;
    static kind = "UpdateObligationBorrowDebtTermLiquidationEnabled";
    discriminator = 28;
    kind = "UpdateObligationBorrowDebtTermLiquidationEnabled";
    toJSON() {
        return {
            kind: "UpdateObligationBorrowDebtTermLiquidationEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateObligationBorrowDebtTermLiquidationEnabled: {},
        };
    }
}
exports.UpdateObligationBorrowDebtTermLiquidationEnabled = UpdateObligationBorrowDebtTermLiquidationEnabled;
class UpdateBorrowOrderCreationEnabled {
    static discriminator = 29;
    static kind = "UpdateBorrowOrderCreationEnabled";
    discriminator = 29;
    kind = "UpdateBorrowOrderCreationEnabled";
    toJSON() {
        return {
            kind: "UpdateBorrowOrderCreationEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateBorrowOrderCreationEnabled: {},
        };
    }
}
exports.UpdateBorrowOrderCreationEnabled = UpdateBorrowOrderCreationEnabled;
class UpdateBorrowOrderExecutionEnabled {
    static discriminator = 30;
    static kind = "UpdateBorrowOrderExecutionEnabled";
    discriminator = 30;
    kind = "UpdateBorrowOrderExecutionEnabled";
    toJSON() {
        return {
            kind: "UpdateBorrowOrderExecutionEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateBorrowOrderExecutionEnabled: {},
        };
    }
}
exports.UpdateBorrowOrderExecutionEnabled = UpdateBorrowOrderExecutionEnabled;
class UpdateMinBorrowOrderFillValue {
    static discriminator = 31;
    static kind = "UpdateMinBorrowOrderFillValue";
    discriminator = 31;
    kind = "UpdateMinBorrowOrderFillValue";
    toJSON() {
        return {
            kind: "UpdateMinBorrowOrderFillValue",
        };
    }
    toEncodable() {
        return {
            UpdateMinBorrowOrderFillValue: {},
        };
    }
}
exports.UpdateMinBorrowOrderFillValue = UpdateMinBorrowOrderFillValue;
class UpdateWithdrawTicketIssuanceEnabled {
    static discriminator = 32;
    static kind = "UpdateWithdrawTicketIssuanceEnabled";
    discriminator = 32;
    kind = "UpdateWithdrawTicketIssuanceEnabled";
    toJSON() {
        return {
            kind: "UpdateWithdrawTicketIssuanceEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateWithdrawTicketIssuanceEnabled: {},
        };
    }
}
exports.UpdateWithdrawTicketIssuanceEnabled = UpdateWithdrawTicketIssuanceEnabled;
class UpdateWithdrawTicketRedemptionEnabled {
    static discriminator = 33;
    static kind = "UpdateWithdrawTicketRedemptionEnabled";
    discriminator = 33;
    kind = "UpdateWithdrawTicketRedemptionEnabled";
    toJSON() {
        return {
            kind: "UpdateWithdrawTicketRedemptionEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateWithdrawTicketRedemptionEnabled: {},
        };
    }
}
exports.UpdateWithdrawTicketRedemptionEnabled = UpdateWithdrawTicketRedemptionEnabled;
class UpdateMinWithdrawQueuedLiquidityValue {
    static discriminator = 34;
    static kind = "UpdateMinWithdrawQueuedLiquidityValue";
    discriminator = 34;
    kind = "UpdateMinWithdrawQueuedLiquidityValue";
    toJSON() {
        return {
            kind: "UpdateMinWithdrawQueuedLiquidityValue",
        };
    }
    toEncodable() {
        return {
            UpdateMinWithdrawQueuedLiquidityValue: {},
        };
    }
}
exports.UpdateMinWithdrawQueuedLiquidityValue = UpdateMinWithdrawQueuedLiquidityValue;
class UpdateFixedTermRolloverWindowDurationSeconds {
    static discriminator = 35;
    static kind = "UpdateFixedTermRolloverWindowDurationSeconds";
    discriminator = 35;
    kind = "UpdateFixedTermRolloverWindowDurationSeconds";
    toJSON() {
        return {
            kind: "UpdateFixedTermRolloverWindowDurationSeconds",
        };
    }
    toEncodable() {
        return {
            UpdateFixedTermRolloverWindowDurationSeconds: {},
        };
    }
}
exports.UpdateFixedTermRolloverWindowDurationSeconds = UpdateFixedTermRolloverWindowDurationSeconds;
class UpdateOpenTermRolloverWindowDurationSeconds {
    static discriminator = 36;
    static kind = "UpdateOpenTermRolloverWindowDurationSeconds";
    discriminator = 36;
    kind = "UpdateOpenTermRolloverWindowDurationSeconds";
    toJSON() {
        return {
            kind: "UpdateOpenTermRolloverWindowDurationSeconds",
        };
    }
    toEncodable() {
        return {
            UpdateOpenTermRolloverWindowDurationSeconds: {},
        };
    }
}
exports.UpdateOpenTermRolloverWindowDurationSeconds = UpdateOpenTermRolloverWindowDurationSeconds;
class UpdateObligationBorrowRolloverConfigurationEnabled {
    static discriminator = 37;
    static kind = "UpdateObligationBorrowRolloverConfigurationEnabled";
    discriminator = 37;
    kind = "UpdateObligationBorrowRolloverConfigurationEnabled";
    toJSON() {
        return {
            kind: "UpdateObligationBorrowRolloverConfigurationEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateObligationBorrowRolloverConfigurationEnabled: {},
        };
    }
}
exports.UpdateObligationBorrowRolloverConfigurationEnabled = UpdateObligationBorrowRolloverConfigurationEnabled;
class UpdateTermBasedFullLiquidationDurationSecs {
    static discriminator = 38;
    static kind = "UpdateTermBasedFullLiquidationDurationSecs";
    discriminator = 38;
    kind = "UpdateTermBasedFullLiquidationDurationSecs";
    toJSON() {
        return {
            kind: "UpdateTermBasedFullLiquidationDurationSecs",
        };
    }
    toEncodable() {
        return {
            UpdateTermBasedFullLiquidationDurationSecs: {},
        };
    }
}
exports.UpdateTermBasedFullLiquidationDurationSecs = UpdateTermBasedFullLiquidationDurationSecs;
class UpdateObligationBorrowMigrationToFixedExecutionEnabled {
    static discriminator = 39;
    static kind = "UpdateObligationBorrowMigrationToFixedExecutionEnabled";
    discriminator = 39;
    kind = "UpdateObligationBorrowMigrationToFixedExecutionEnabled";
    toJSON() {
        return {
            kind: "UpdateObligationBorrowMigrationToFixedExecutionEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateObligationBorrowMigrationToFixedExecutionEnabled: {},
        };
    }
}
exports.UpdateObligationBorrowMigrationToFixedExecutionEnabled = UpdateObligationBorrowMigrationToFixedExecutionEnabled;
class UpdateMinPartialRolloverValue {
    static discriminator = 40;
    static kind = "UpdateMinPartialRolloverValue";
    discriminator = 40;
    kind = "UpdateMinPartialRolloverValue";
    toJSON() {
        return {
            kind: "UpdateMinPartialRolloverValue",
        };
    }
    toEncodable() {
        return {
            UpdateMinPartialRolloverValue: {},
        };
    }
}
exports.UpdateMinPartialRolloverValue = UpdateMinPartialRolloverValue;
class UpdateWithdrawTicketCancellationEnabled {
    static discriminator = 41;
    static kind = "UpdateWithdrawTicketCancellationEnabled";
    discriminator = 41;
    kind = "UpdateWithdrawTicketCancellationEnabled";
    toJSON() {
        return {
            kind: "UpdateWithdrawTicketCancellationEnabled",
        };
    }
    toEncodable() {
        return {
            UpdateWithdrawTicketCancellationEnabled: {},
        };
    }
}
exports.UpdateWithdrawTicketCancellationEnabled = UpdateWithdrawTicketCancellationEnabled;
class UpdatePermissioningAuthority {
    static discriminator = 42;
    static kind = "UpdatePermissioningAuthority";
    discriminator = 42;
    kind = "UpdatePermissioningAuthority";
    toJSON() {
        return {
            kind: "UpdatePermissioningAuthority",
        };
    }
    toEncodable() {
        return {
            UpdatePermissioningAuthority: {},
        };
    }
}
exports.UpdatePermissioningAuthority = UpdatePermissioningAuthority;
class UpdatePermissionedOps {
    static discriminator = 43;
    static kind = "UpdatePermissionedOps";
    discriminator = 43;
    kind = "UpdatePermissionedOps";
    toJSON() {
        return {
            kind: "UpdatePermissionedOps",
        };
    }
    toEncodable() {
        return {
            UpdatePermissionedOps: {},
        };
    }
}
exports.UpdatePermissionedOps = UpdatePermissionedOps;
class DeprecatedUpdateReserveRewardsMaxAprPct {
    static discriminator = 44;
    static kind = "DeprecatedUpdateReserveRewardsMaxAprPct";
    discriminator = 44;
    kind = "DeprecatedUpdateReserveRewardsMaxAprPct";
    toJSON() {
        return {
            kind: "DeprecatedUpdateReserveRewardsMaxAprPct",
        };
    }
    toEncodable() {
        return {
            DeprecatedUpdateReserveRewardsMaxAprPct: {},
        };
    }
}
exports.DeprecatedUpdateReserveRewardsMaxAprPct = DeprecatedUpdateReserveRewardsMaxAprPct;
class UpdateReserveRewardsMaxAprBps {
    static discriminator = 45;
    static kind = "UpdateReserveRewardsMaxAprBps";
    discriminator = 45;
    kind = "UpdateReserveRewardsMaxAprBps";
    toJSON() {
        return {
            kind: "UpdateReserveRewardsMaxAprBps",
        };
    }
    toEncodable() {
        return {
            UpdateReserveRewardsMaxAprBps: {},
        };
    }
}
exports.UpdateReserveRewardsMaxAprBps = UpdateReserveRewardsMaxAprBps;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function fromDecoded(obj) {
    if (typeof obj !== "object") {
        throw new Error("Invalid enum object");
    }
    if ("UpdateOwner" in obj) {
        return new UpdateOwner();
    }
    if ("UpdateEmergencyMode" in obj) {
        return new UpdateEmergencyMode();
    }
    if ("UpdateLiquidationCloseFactor" in obj) {
        return new UpdateLiquidationCloseFactor();
    }
    if ("UpdateLiquidationMaxValue" in obj) {
        return new UpdateLiquidationMaxValue();
    }
    if ("DeprecatedUpdateGlobalUnhealthyBorrow" in obj) {
        return new DeprecatedUpdateGlobalUnhealthyBorrow();
    }
    if ("UpdateGlobalAllowedBorrow" in obj) {
        return new UpdateGlobalAllowedBorrow();
    }
    if ("UpdateEmergencyCouncil" in obj) {
        return new UpdateEmergencyCouncil();
    }
    if ("UpdateMinFullLiquidationThreshold" in obj) {
        return new UpdateMinFullLiquidationThreshold();
    }
    if ("UpdateInsolvencyRiskLtv" in obj) {
        return new UpdateInsolvencyRiskLtv();
    }
    if ("UpdateElevationGroup" in obj) {
        return new UpdateElevationGroup();
    }
    if ("UpdateReferralFeeBps" in obj) {
        return new UpdateReferralFeeBps();
    }
    if ("DeprecatedUpdateMultiplierPoints" in obj) {
        return new DeprecatedUpdateMultiplierPoints();
    }
    if ("UpdatePriceRefreshTriggerToMaxAgePct" in obj) {
        return new UpdatePriceRefreshTriggerToMaxAgePct();
    }
    if ("UpdateAutodeleverageEnabled" in obj) {
        return new UpdateAutodeleverageEnabled();
    }
    if ("UpdateBorrowingDisabled" in obj) {
        return new UpdateBorrowingDisabled();
    }
    if ("UpdateMinNetValueObligationPostAction" in obj) {
        return new UpdateMinNetValueObligationPostAction();
    }
    if ("UpdateMinValueLtvSkipPriorityLiqCheck" in obj) {
        return new UpdateMinValueLtvSkipPriorityLiqCheck();
    }
    if ("UpdateMinValueBfSkipPriorityLiqCheck" in obj) {
        return new UpdateMinValueBfSkipPriorityLiqCheck();
    }
    if ("UpdatePaddingFields" in obj) {
        return new UpdatePaddingFields();
    }
    if ("UpdateName" in obj) {
        return new UpdateName();
    }
    if ("UpdateIndividualAutodeleverageMarginCallPeriodSecs" in obj) {
        return new UpdateIndividualAutodeleverageMarginCallPeriodSecs();
    }
    if ("UpdateInitialDepositAmount" in obj) {
        return new UpdateInitialDepositAmount();
    }
    if ("UpdateObligationOrderExecutionEnabled" in obj) {
        return new UpdateObligationOrderExecutionEnabled();
    }
    if ("UpdateImmutableFlag" in obj) {
        return new UpdateImmutableFlag();
    }
    if ("UpdateObligationOrderCreationEnabled" in obj) {
        return new UpdateObligationOrderCreationEnabled();
    }
    if ("UpdateProposerAuthority" in obj) {
        return new UpdateProposerAuthority();
    }
    if ("UpdatePriceTriggeredLiquidationDisabled" in obj) {
        return new UpdatePriceTriggeredLiquidationDisabled();
    }
    if ("UpdateMatureReserveDebtLiquidationEnabled" in obj) {
        return new UpdateMatureReserveDebtLiquidationEnabled();
    }
    if ("UpdateObligationBorrowDebtTermLiquidationEnabled" in obj) {
        return new UpdateObligationBorrowDebtTermLiquidationEnabled();
    }
    if ("UpdateBorrowOrderCreationEnabled" in obj) {
        return new UpdateBorrowOrderCreationEnabled();
    }
    if ("UpdateBorrowOrderExecutionEnabled" in obj) {
        return new UpdateBorrowOrderExecutionEnabled();
    }
    if ("UpdateMinBorrowOrderFillValue" in obj) {
        return new UpdateMinBorrowOrderFillValue();
    }
    if ("UpdateWithdrawTicketIssuanceEnabled" in obj) {
        return new UpdateWithdrawTicketIssuanceEnabled();
    }
    if ("UpdateWithdrawTicketRedemptionEnabled" in obj) {
        return new UpdateWithdrawTicketRedemptionEnabled();
    }
    if ("UpdateMinWithdrawQueuedLiquidityValue" in obj) {
        return new UpdateMinWithdrawQueuedLiquidityValue();
    }
    if ("UpdateFixedTermRolloverWindowDurationSeconds" in obj) {
        return new UpdateFixedTermRolloverWindowDurationSeconds();
    }
    if ("UpdateOpenTermRolloverWindowDurationSeconds" in obj) {
        return new UpdateOpenTermRolloverWindowDurationSeconds();
    }
    if ("UpdateObligationBorrowRolloverConfigurationEnabled" in obj) {
        return new UpdateObligationBorrowRolloverConfigurationEnabled();
    }
    if ("UpdateTermBasedFullLiquidationDurationSecs" in obj) {
        return new UpdateTermBasedFullLiquidationDurationSecs();
    }
    if ("UpdateObligationBorrowMigrationToFixedExecutionEnabled" in obj) {
        return new UpdateObligationBorrowMigrationToFixedExecutionEnabled();
    }
    if ("UpdateMinPartialRolloverValue" in obj) {
        return new UpdateMinPartialRolloverValue();
    }
    if ("UpdateWithdrawTicketCancellationEnabled" in obj) {
        return new UpdateWithdrawTicketCancellationEnabled();
    }
    if ("UpdatePermissioningAuthority" in obj) {
        return new UpdatePermissioningAuthority();
    }
    if ("UpdatePermissionedOps" in obj) {
        return new UpdatePermissionedOps();
    }
    if ("DeprecatedUpdateReserveRewardsMaxAprPct" in obj) {
        return new DeprecatedUpdateReserveRewardsMaxAprPct();
    }
    if ("UpdateReserveRewardsMaxAprBps" in obj) {
        return new UpdateReserveRewardsMaxAprBps();
    }
    throw new Error("Invalid enum object");
}
function fromJSON(obj) {
    switch (obj.kind) {
        case "UpdateOwner": {
            return new UpdateOwner();
        }
        case "UpdateEmergencyMode": {
            return new UpdateEmergencyMode();
        }
        case "UpdateLiquidationCloseFactor": {
            return new UpdateLiquidationCloseFactor();
        }
        case "UpdateLiquidationMaxValue": {
            return new UpdateLiquidationMaxValue();
        }
        case "DeprecatedUpdateGlobalUnhealthyBorrow": {
            return new DeprecatedUpdateGlobalUnhealthyBorrow();
        }
        case "UpdateGlobalAllowedBorrow": {
            return new UpdateGlobalAllowedBorrow();
        }
        case "UpdateEmergencyCouncil": {
            return new UpdateEmergencyCouncil();
        }
        case "UpdateMinFullLiquidationThreshold": {
            return new UpdateMinFullLiquidationThreshold();
        }
        case "UpdateInsolvencyRiskLtv": {
            return new UpdateInsolvencyRiskLtv();
        }
        case "UpdateElevationGroup": {
            return new UpdateElevationGroup();
        }
        case "UpdateReferralFeeBps": {
            return new UpdateReferralFeeBps();
        }
        case "DeprecatedUpdateMultiplierPoints": {
            return new DeprecatedUpdateMultiplierPoints();
        }
        case "UpdatePriceRefreshTriggerToMaxAgePct": {
            return new UpdatePriceRefreshTriggerToMaxAgePct();
        }
        case "UpdateAutodeleverageEnabled": {
            return new UpdateAutodeleverageEnabled();
        }
        case "UpdateBorrowingDisabled": {
            return new UpdateBorrowingDisabled();
        }
        case "UpdateMinNetValueObligationPostAction": {
            return new UpdateMinNetValueObligationPostAction();
        }
        case "UpdateMinValueLtvSkipPriorityLiqCheck": {
            return new UpdateMinValueLtvSkipPriorityLiqCheck();
        }
        case "UpdateMinValueBfSkipPriorityLiqCheck": {
            return new UpdateMinValueBfSkipPriorityLiqCheck();
        }
        case "UpdatePaddingFields": {
            return new UpdatePaddingFields();
        }
        case "UpdateName": {
            return new UpdateName();
        }
        case "UpdateIndividualAutodeleverageMarginCallPeriodSecs": {
            return new UpdateIndividualAutodeleverageMarginCallPeriodSecs();
        }
        case "UpdateInitialDepositAmount": {
            return new UpdateInitialDepositAmount();
        }
        case "UpdateObligationOrderExecutionEnabled": {
            return new UpdateObligationOrderExecutionEnabled();
        }
        case "UpdateImmutableFlag": {
            return new UpdateImmutableFlag();
        }
        case "UpdateObligationOrderCreationEnabled": {
            return new UpdateObligationOrderCreationEnabled();
        }
        case "UpdateProposerAuthority": {
            return new UpdateProposerAuthority();
        }
        case "UpdatePriceTriggeredLiquidationDisabled": {
            return new UpdatePriceTriggeredLiquidationDisabled();
        }
        case "UpdateMatureReserveDebtLiquidationEnabled": {
            return new UpdateMatureReserveDebtLiquidationEnabled();
        }
        case "UpdateObligationBorrowDebtTermLiquidationEnabled": {
            return new UpdateObligationBorrowDebtTermLiquidationEnabled();
        }
        case "UpdateBorrowOrderCreationEnabled": {
            return new UpdateBorrowOrderCreationEnabled();
        }
        case "UpdateBorrowOrderExecutionEnabled": {
            return new UpdateBorrowOrderExecutionEnabled();
        }
        case "UpdateMinBorrowOrderFillValue": {
            return new UpdateMinBorrowOrderFillValue();
        }
        case "UpdateWithdrawTicketIssuanceEnabled": {
            return new UpdateWithdrawTicketIssuanceEnabled();
        }
        case "UpdateWithdrawTicketRedemptionEnabled": {
            return new UpdateWithdrawTicketRedemptionEnabled();
        }
        case "UpdateMinWithdrawQueuedLiquidityValue": {
            return new UpdateMinWithdrawQueuedLiquidityValue();
        }
        case "UpdateFixedTermRolloverWindowDurationSeconds": {
            return new UpdateFixedTermRolloverWindowDurationSeconds();
        }
        case "UpdateOpenTermRolloverWindowDurationSeconds": {
            return new UpdateOpenTermRolloverWindowDurationSeconds();
        }
        case "UpdateObligationBorrowRolloverConfigurationEnabled": {
            return new UpdateObligationBorrowRolloverConfigurationEnabled();
        }
        case "UpdateTermBasedFullLiquidationDurationSecs": {
            return new UpdateTermBasedFullLiquidationDurationSecs();
        }
        case "UpdateObligationBorrowMigrationToFixedExecutionEnabled": {
            return new UpdateObligationBorrowMigrationToFixedExecutionEnabled();
        }
        case "UpdateMinPartialRolloverValue": {
            return new UpdateMinPartialRolloverValue();
        }
        case "UpdateWithdrawTicketCancellationEnabled": {
            return new UpdateWithdrawTicketCancellationEnabled();
        }
        case "UpdatePermissioningAuthority": {
            return new UpdatePermissioningAuthority();
        }
        case "UpdatePermissionedOps": {
            return new UpdatePermissionedOps();
        }
        case "DeprecatedUpdateReserveRewardsMaxAprPct": {
            return new DeprecatedUpdateReserveRewardsMaxAprPct();
        }
        case "UpdateReserveRewardsMaxAprBps": {
            return new UpdateReserveRewardsMaxAprBps();
        }
    }
}
function layout(property) {
    const ret = borsh.rustEnum([
        borsh.struct([], "UpdateOwner"),
        borsh.struct([], "UpdateEmergencyMode"),
        borsh.struct([], "UpdateLiquidationCloseFactor"),
        borsh.struct([], "UpdateLiquidationMaxValue"),
        borsh.struct([], "DeprecatedUpdateGlobalUnhealthyBorrow"),
        borsh.struct([], "UpdateGlobalAllowedBorrow"),
        borsh.struct([], "UpdateEmergencyCouncil"),
        borsh.struct([], "UpdateMinFullLiquidationThreshold"),
        borsh.struct([], "UpdateInsolvencyRiskLtv"),
        borsh.struct([], "UpdateElevationGroup"),
        borsh.struct([], "UpdateReferralFeeBps"),
        borsh.struct([], "DeprecatedUpdateMultiplierPoints"),
        borsh.struct([], "UpdatePriceRefreshTriggerToMaxAgePct"),
        borsh.struct([], "UpdateAutodeleverageEnabled"),
        borsh.struct([], "UpdateBorrowingDisabled"),
        borsh.struct([], "UpdateMinNetValueObligationPostAction"),
        borsh.struct([], "UpdateMinValueLtvSkipPriorityLiqCheck"),
        borsh.struct([], "UpdateMinValueBfSkipPriorityLiqCheck"),
        borsh.struct([], "UpdatePaddingFields"),
        borsh.struct([], "UpdateName"),
        borsh.struct([], "UpdateIndividualAutodeleverageMarginCallPeriodSecs"),
        borsh.struct([], "UpdateInitialDepositAmount"),
        borsh.struct([], "UpdateObligationOrderExecutionEnabled"),
        borsh.struct([], "UpdateImmutableFlag"),
        borsh.struct([], "UpdateObligationOrderCreationEnabled"),
        borsh.struct([], "UpdateProposerAuthority"),
        borsh.struct([], "UpdatePriceTriggeredLiquidationDisabled"),
        borsh.struct([], "UpdateMatureReserveDebtLiquidationEnabled"),
        borsh.struct([], "UpdateObligationBorrowDebtTermLiquidationEnabled"),
        borsh.struct([], "UpdateBorrowOrderCreationEnabled"),
        borsh.struct([], "UpdateBorrowOrderExecutionEnabled"),
        borsh.struct([], "UpdateMinBorrowOrderFillValue"),
        borsh.struct([], "UpdateWithdrawTicketIssuanceEnabled"),
        borsh.struct([], "UpdateWithdrawTicketRedemptionEnabled"),
        borsh.struct([], "UpdateMinWithdrawQueuedLiquidityValue"),
        borsh.struct([], "UpdateFixedTermRolloverWindowDurationSeconds"),
        borsh.struct([], "UpdateOpenTermRolloverWindowDurationSeconds"),
        borsh.struct([], "UpdateObligationBorrowRolloverConfigurationEnabled"),
        borsh.struct([], "UpdateTermBasedFullLiquidationDurationSecs"),
        borsh.struct([], "UpdateObligationBorrowMigrationToFixedExecutionEnabled"),
        borsh.struct([], "UpdateMinPartialRolloverValue"),
        borsh.struct([], "UpdateWithdrawTicketCancellationEnabled"),
        borsh.struct([], "UpdatePermissioningAuthority"),
        borsh.struct([], "UpdatePermissionedOps"),
        borsh.struct([], "DeprecatedUpdateReserveRewardsMaxAprPct"),
        borsh.struct([], "UpdateReserveRewardsMaxAprBps"),
    ]);
    if (property !== undefined) {
        return ret.replicate(property);
    }
    return ret;
}
//# sourceMappingURL=UpdateLendingMarketMode.js.map