/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Attribute, FixedAttribute, OptionalAttribute, OptionalWritableAttribute, OptionalCommand } from "../cluster/Cluster.js";
import { TypeFromSchema } from "../tlv/TlvSchema.js";
import { BitFlag } from "../schema/BitmapSchema.js";
import { Identity } from "#general";
export declare namespace ResourceMonitoring {
    /**
     * These are optional features supported by ResourceMonitoringCluster.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 2.8.4
     */
    enum Feature {
        /**
         * Condition (CON)
         *
         * Supports monitoring the condition of the resource in percentage
         */
        Condition = "Condition",
        /**
         * Warning (WRN)
         *
         * Supports warning indication
         */
        Warning = "Warning",
        /**
         * ReplacementProductList (REP)
         *
         * Supports specifying the list of replacement products
         */
        ReplacementProductList = "ReplacementProductList"
    }
    /**
     * Indicates the direction in which the condition of the resource changes over time.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 2.8.5.1
     */
    enum DegradationDirection {
        /**
         * The degradation of the resource is indicated by an upwards moving/increasing value
         */
        Up = 0,
        /**
         * The degradation of the resource is indicated by a downwards moving/decreasing value
         */
        Down = 1
    }
    /**
     * Indicate the type of identifier used to describe the product. Devices SHOULD use globally-recognized IDs over OEM
     * specific ones.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 2.8.5.3
     */
    enum ProductIdentifierType {
        /**
         * 12-digit Universal Product Code
         */
        Upc = 0,
        /**
         * 8-digit Global Trade Item Number
         */
        Gtin8 = 1,
        /**
         * 13-digit European Article Number
         */
        Ean = 2,
        /**
         * 14-digit Global Trade Item Number
         */
        Gtin14 = 3,
        /**
         * Original Equipment Manufacturer part number
         */
        Oem = 4
    }
    /**
     * Indicates the product identifier that can be used as a replacement for the resource.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 2.8.5.4
     */
    const TlvReplacementProduct: import("../tlv/TlvObject.js").ObjectSchema<{
        productIdentifierType: import("../tlv/TlvObject.js").FieldType<ProductIdentifierType>;
        productIdentifierValue: import("../tlv/TlvObject.js").FieldType<string>;
    }>;
    /**
     * Indicates the product identifier that can be used as a replacement for the resource.
     *
     * @see {@link MatterSpecification.v142.Cluster} § 2.8.5.4
     */
    interface ReplacementProduct extends TypeFromSchema<typeof TlvReplacementProduct> {
    }
    /**
     * @see {@link MatterSpecification.v142.Cluster} § 2.8.5.2
     */
    enum ChangeIndication {
        /**
         * Resource is in good condition, no intervention required
         */
        Ok = 0,
        /**
         * Resource will be exhausted soon, intervention will shortly be required
         */
        Warning = 1,
        /**
         * Resource is exhausted, immediate intervention is required
         */
        Critical = 2
    }
    /**
     * A ResourceMonitoringCluster supports these elements if it supports feature Condition.
     */
    const ConditionComponent: {
        readonly attributes: {
            /**
             * Indicates the current condition of the resource in percent.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.1
             */
            readonly condition: Attribute<number, any>;
            /**
             * Indicates the direction of change for the condition of the resource over time, which helps to determine
             * whether a higher or lower condition value is considered optimal.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.2
             */
            readonly degradationDirection: FixedAttribute<DegradationDirection, any>;
        };
    };
    /**
     * A ResourceMonitoringCluster supports these elements if it supports feature ReplacementProductList.
     */
    const ReplacementProductListComponent: {
        readonly attributes: {
            /**
             * Indicates the list of supported products that may be used as replacements for the current resource. Each
             * item in this list represents a unique ReplacementProductStruct.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.6
             */
            readonly replacementProductList: FixedAttribute<import("../tlv/TlvObject.js").TypeFromFields<{
                productIdentifierType: import("../tlv/TlvObject.js").FieldType<ProductIdentifierType>;
                productIdentifierValue: import("../tlv/TlvObject.js").FieldType<string>;
            }>[], any>;
        };
    };
    /**
     * ResourceMonitoring is a derived cluster, not to be used directly. These elements are present in all clusters
     * derived from ResourceMonitoring.
     */
    const Base: {
        readonly features: {
            /**
             * Supports monitoring the condition of the resource in percentage
             */
            readonly condition: BitFlag;
            /**
             * Supports warning indication
             */
            readonly warning: BitFlag;
            /**
             * Supports specifying the list of replacement products
             */
            readonly replacementProductList: BitFlag;
        };
        readonly name: "ResourceMonitoring";
        readonly revision: 1;
        readonly attributes: {
            /**
             * This attribute shall be populated with a value from ChangeIndicationEnum that is indicative of the
             * current requirement to change the resource.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.3
             */
            readonly changeIndication: Attribute<ChangeIndication, any>;
            /**
             * Indicates whether a resource is currently installed. A value of true shall indicate that a resource is
             * installed. A value of false shall indicate that a resource is not installed.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.4
             */
            readonly inPlaceIndicator: OptionalAttribute<boolean, any>;
            /**
             * This attribute may indicates the time at which the resource has been changed, if supported by the server.
             * The attribute shall be null if it was never set or is unknown.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.5
             */
            readonly lastChangedTime: OptionalWritableAttribute<number | null, any>;
        };
        readonly commands: {
            /**
             * Upon receipt, the device shall reset the Condition and ChangeIndicator attributes, indicating full
             * resource availability and readiness for use, as initially configured. Invocation of this command may
             * cause the LastChangedTime to be updated automatically based on the clock of the server, if the server
             * supports setting the attribute.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.7.1
             */
            readonly resetCondition: OptionalCommand<void, void, any>;
        };
        /**
         * This metadata controls which ResourceMonitoringCluster elements matter.js activates for specific feature
         * combinations.
         */
        readonly extensions: readonly [{
            readonly flags: {
                readonly condition: true;
            };
            readonly component: {
                readonly attributes: {
                    /**
                     * Indicates the current condition of the resource in percent.
                     *
                     * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.1
                     */
                    readonly condition: Attribute<number, any>;
                    /**
                     * Indicates the direction of change for the condition of the resource over time, which helps to determine
                     * whether a higher or lower condition value is considered optimal.
                     *
                     * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.2
                     */
                    readonly degradationDirection: FixedAttribute<DegradationDirection, any>;
                };
            };
        }, {
            readonly flags: {
                readonly replacementProductList: true;
            };
            readonly component: {
                readonly attributes: {
                    /**
                     * Indicates the list of supported products that may be used as replacements for the current resource. Each
                     * item in this list represents a unique ReplacementProductStruct.
                     *
                     * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.6
                     */
                    readonly replacementProductList: FixedAttribute<import("../tlv/TlvObject.js").TypeFromFields<{
                        productIdentifierType: import("../tlv/TlvObject.js").FieldType<ProductIdentifierType>;
                        productIdentifierValue: import("../tlv/TlvObject.js").FieldType<string>;
                    }>[], any>;
                };
            };
        }];
    };
    /**
     * @see {@link Complete}
     */
    const CompleteInstance: {
        readonly name: "ResourceMonitoring";
        readonly revision: 1;
        readonly features: {
            /**
             * Supports monitoring the condition of the resource in percentage
             */
            readonly condition: BitFlag;
            /**
             * Supports warning indication
             */
            readonly warning: BitFlag;
            /**
             * Supports specifying the list of replacement products
             */
            readonly replacementProductList: BitFlag;
        };
        readonly attributes: {
            readonly condition: Attribute<number, any> & {
                readonly optional: true;
                readonly isConditional: true;
                readonly optionalIf: [] | import("../cluster/Cluster.js").ConditionalFeatureList<import("../schema/BitmapSchema.js").BitSchema>;
                readonly mandatoryIf: [] | [{
                    condition: boolean;
                }];
            };
            readonly degradationDirection: FixedAttribute<DegradationDirection, any> & {
                readonly optional: true;
                readonly isConditional: true;
                readonly optionalIf: [] | import("../cluster/Cluster.js").ConditionalFeatureList<import("../schema/BitmapSchema.js").BitSchema>;
                readonly mandatoryIf: [] | [{
                    condition: boolean;
                }];
            };
            readonly replacementProductList: FixedAttribute<import("../tlv/TlvObject.js").TypeFromFields<{
                productIdentifierType: import("../tlv/TlvObject.js").FieldType<ProductIdentifierType>;
                productIdentifierValue: import("../tlv/TlvObject.js").FieldType<string>;
            }>[], any> & {
                readonly optional: true;
                readonly isConditional: true;
                readonly optionalIf: [] | import("../cluster/Cluster.js").ConditionalFeatureList<import("../schema/BitmapSchema.js").BitSchema>;
                readonly mandatoryIf: [] | [{
                    replacementProductList: boolean;
                }];
            };
            /**
             * This attribute shall be populated with a value from ChangeIndicationEnum that is indicative of the
             * current requirement to change the resource.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.3
             */
            readonly changeIndication: Attribute<ChangeIndication, any>;
            /**
             * Indicates whether a resource is currently installed. A value of true shall indicate that a resource is
             * installed. A value of false shall indicate that a resource is not installed.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.4
             */
            readonly inPlaceIndicator: OptionalAttribute<boolean, any>;
            /**
             * This attribute may indicates the time at which the resource has been changed, if supported by the server.
             * The attribute shall be null if it was never set or is unknown.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.6.5
             */
            readonly lastChangedTime: OptionalWritableAttribute<number | null, any>;
        };
        readonly commands: {
            /**
             * Upon receipt, the device shall reset the Condition and ChangeIndicator attributes, indicating full
             * resource availability and readiness for use, as initially configured. Invocation of this command may
             * cause the LastChangedTime to be updated automatically based on the clock of the server, if the server
             * supports setting the attribute.
             *
             * @see {@link MatterSpecification.v142.Cluster} § 2.8.7.1
             */
            readonly resetCondition: OptionalCommand<void, void, any>;
        };
    };
    /**
     * This cluster supports all ResourceMonitoring features. It may support illegal feature combinations.
     *
     * If you use this cluster you must manually specify which features are active and ensure the set of active features
     * is legal per the Matter specification.
     */
    interface Complete extends Identity<typeof CompleteInstance> {
    }
    const Complete: Complete;
}
//# sourceMappingURL=resource-monitoring.d.ts.map