{
    "$id": "http://redfish.dmtf.org/schemas/v1/MetricDefinition.v1_0_1.json",
    "$ref": "#/definitions/MetricDefinition",
    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
    "copyright": "Copyright 2014-2018 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
    "definitions": {
        "Actions": {
            "additionalProperties": false,
            "description": "The available actions for this resource.",
            "longDescription": "This type shall contain the available actions for this resource.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {
                "Oem": {
                    "$ref": "#/definitions/OemActions",
                    "description": "This property contains the available OEM specific actions for this resource.",
                    "longDescription": "This property shall contain any additional OEM actions for this resource."
                }
            },
            "type": "object"
        },
        "Calculable": {
            "description": "The types of calculations which can be applied to the metric reading.  This property provides information to the client on the suitability of calculatiion using the metric reading.",
            "enum": [
                "NonCalculatable",
                "Summable",
                "NonSummable"
            ],
            "enumDescriptions": {
                "NonCalculatable": "No calculations should be performed on the metric reading.",
                "NonSummable": "The sum of the metric reading across multiple instances is not meaningful.",
                "Summable": "The sum of the metric reading across multiple instances is meaningful."
            },
            "longDescription": "The value shall indicate the types of calculations which can applied to the metric reading.",
            "type": "string"
        },
        "CalculationAlgorithmEnum": {
            "enum": [
                "Average",
                "Maximum",
                "Minimum"
            ],
            "enumDescriptions": {
                "Average": "The metric is calculated as the average of a metric reading over a sliding time interval.",
                "Maximum": "The metric is calculated as the maximum value of a metric reading over during a time interval.",
                "Minimum": "The metric is calculated as the minimum value of a metric reading over a sliding time interval."
            },
            "enumLongDescriptions": {
                "Average": "The metric shall be calculated as the average of a metric reading over a sliding time interval.  The time interval shall be the value of the CalculationTimeInterval property.",
                "Maximum": "The metric shall be calculated as the maximum of a metric reading over a sliding time interval.  The time interval shall be the value of the CalculationTimeInterval property.",
                "Minimum": "The metric shall be calculated as the minimum of a metric reading over a sliding time interval.  The time interval shall be the value of the CalculationTimeInterval property."
            },
            "type": "string"
        },
        "CalculationParamsType": {
            "additionalProperties": false,
            "description": "Specifies the usage of the parameter in the calculation.",
            "longDescription": "The value of the list element shall be the usage of the parameter in the calculation.  This property is present when the MetricType property has the value 'Synthesized'.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {
                "ResultMetric": {
                    "description": "The metric property used to store the results of the calculation.",
                    "longDescription": "This property shall contain a reference to a metric property wsed to place the result of the calcuation.",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "SourceMetric": {
                    "description": "The metric property used as the input into the calculation.",
                    "longDescription": "This property shall contain a reference to a metric property used in a calcuation.",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "type": "object"
        },
        "ImplementationType": {
            "enum": [
                "PhysicalSensor",
                "Calculated",
                "Synthesized",
                "DigitalMeter"
            ],
            "enumDescriptions": {
                "Calculated": "The metric is implemented by applying a calculation on another metric property.  The calculation is specified in the CalculationAlgorithm property.",
                "DigitalMeter": "The metric is implemented as digital meter.",
                "PhysicalSensor": "The metric is implemented as a physical sensor.",
                "Synthesized": "The metric is implemented by applying a calculation on one or more metric properties.  (The calculation is not specified.  For expressing generalized formula, see MathSON)."
            },
            "type": "string"
        },
        "MetricDataType": {
            "description": "The data type of the related metric values.  The property provides information to the client on the nature of the metric reading.",
            "enum": [
                "Boolean",
                "DateTime",
                "Decimal",
                "Integer",
                "String",
                "Enumeration"
            ],
            "enumDescriptions": {
                "Boolean": "The data type follows the JSON Boolean definition.",
                "DateTime": "The data type follows the JSON String definition with the Date-Time format applied.",
                "Decimal": "The data type follows the JSON Decimal definition.",
                "Enumeration": "The data type follows the JSON String definition with a set of enumerations defined.",
                "Integer": "The data type follows the JSON Integer definition.",
                "String": "The data type follows the JSON String definition."
            },
            "longDescription": "The value shall be the data type of the related metric values as defined by JSON data types.",
            "type": "string"
        },
        "MetricDefinition": {
            "additionalProperties": false,
            "description": "The metadata information about a metric.",
            "longDescription": "Shall define the metadata information about a metric.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {
                "@odata.context": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_3.json#/definitions/context"
                },
                "@odata.etag": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_3.json#/definitions/etag"
                },
                "@odata.id": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_3.json#/definitions/id"
                },
                "@odata.type": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_3.json#/definitions/type"
                },
                "Accuracy": {
                    "description": "Estimated percent error of measured vs. actual values.",
                    "longDescription": "The value of the property shall be the percent error +/- of the measured vs. actual values.  The property is not meaningful, when the MetricType property has the value 'Discrete'.",
                    "readonly": true,
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "Actions": {
                    "$ref": "#/definitions/Actions",
                    "description": "The available actions for this resource.",
                    "longDescription": "The Actions property shall contain the available actions for this resource."
                },
                "Calculable": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/Calculable"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Indicates whether the  metric can be used in a calculation.",
                    "longDescription": "The value shall specify whether the metric can be used in a calculation.",
                    "readonly": false
                },
                "CalculationAlgorithm": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/CalculationAlgorithmEnum"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The calculation which is performed on a source metric to obtain the metric being defined.",
                    "longDescription": "The value of this property shall specify the calculation performed to obtain the metric.",
                    "readonly": true
                },
                "CalculationParameters": {
                    "description": "Specifies the metric properties which are part of the synthesis calculation.  This property is present when the MetricType property has the value 'Synthesized'.",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/definitions/CalculationParamsType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "longDescription": "Shall list the metric properties which are part of the synthesis calculation.  When MetricType=Synthesis, this property may be present.",
                    "type": "array"
                },
                "CalculationTimeInterval": {
                    "description": "The time interval over which the metric calculation is performed.",
                    "longDescription": "The value shall specify the time interval over the metric calculation is performed.  The format of the value shall conform to the Duration format.",
                    "pattern": "-?P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?",
                    "readonly": false,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "Calibration": {
                    "description": "Specifies the calibration offset added to the metric reading.",
                    "longDescription": "The value shall be the calibration offset added to the metric reading.  The value shall have the units specified in the property Units.  The property is not meaningful, when the MetricType property has the value 'Discrete'.",
                    "readonly": true,
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "Description": {
                    "anyOf": [
                        {
                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "readonly": true
                },
                "DiscreteValues": {
                    "description": "This array property specifies possible values of a discrete metric.",
                    "items": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "longDescription": "The values of the property shall specify the possible values of the discrete metic.  This property shall have values when the MetricType property has the value 'Discrete'.",
                    "readonly": false,
                    "type": "array"
                },
                "Id": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
                    "readonly": true
                },
                "Implementation": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/ImplementationType"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The implementation of the metric.",
                    "longDescription": "The value shall specify the implementation of the metric.",
                    "readonly": true
                },
                "IsLinear": {
                    "description": "Indicates whether the metric values are linear (vs non-linear).",
                    "longDescription": "The value shall specify that the corresponding metric values shall be linear or non-linear.  Linear metrics may be compared using a greater than relation.  An example of linear metrics include performance metrics.  Examples of non-linear metrics include error codes.",
                    "readonly": false,
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "MaxReadingRange": {
                    "description": "Maximum value for metric reading.",
                    "longDescription": "The value shall indicate the highest possible value for a related MetricValue.  The value shall have the units specified in the property Units.  The property is not meaningful, when the MetricType property has the value 'Discrete'.",
                    "readonly": true,
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "MetricDataType": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/MetricDataType"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The data type of the metric.",
                    "longDescription": "The value shall specify the data-type of the metric.",
                    "readonly": false
                },
                "MetricProperties": {
                    "description": "A list of URIs with wildcards and property identifiers for which this metric definition is defined. If a URI has wildcards, the wildcards are substituted as specified in the Wildcards array property.",
                    "format": "uri",
                    "items": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "longDescription": "This array property shall contain a list of URIs with wildcards and property identifiers for which this metric definition is defined. Each wildcard in the URI shall be delimited by a set of curly braces. Each wildcard shall be substituted as specified by the corresponding entry in the Wildcard array property.  Once an URI with wildcards has had its wildcards fully substituted, it shall reference a resource property for which the metric definition applies. The property identifiers portion of the URI shall follow JSON fragment notation rules defined by RFC6901.",
                    "readonly": false,
                    "type": "array"
                },
                "MetricType": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/MetricType"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The type of metric.",
                    "longDescription": "The value shall specify the type of metric.",
                    "readonly": false
                },
                "MinReadingRange": {
                    "description": "Minimum value for metric reading.",
                    "longDescription": "The value shall be the lowest possible value for the metric reading.  The value shall have the units specified in the property Units.  The property is not meaningful, when the MetricType property has the value 'Discrete'.",
                    "readonly": true,
                    "type": [
                        "number",
                        "null"
                    ]
                },
                "Name": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
                    "readonly": true
                },
                "Oem": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
                    "description": "This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections.",
                    "longDescription": "The value of this string shall be of the format for the reserved word *Oem*."
                },
                "PhysicalContext": {
                    "anyOf": [
                        {
                            "$ref": "http://redfish.dmtf.org/schemas/v1/PhysicalContext.json#/definitions/PhysicalContext"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Specifies the physical context of the metric.",
                    "longDescription": "The value of this property shall specify the physical context of the metric.",
                    "readonly": true
                },
                "Precision": {
                    "description": "Number of significant digits in the metric reading.",
                    "longDescription": "The value of the property shall specify the number of significant digits in the metric reading.  The property is not meaningful, when the MetricType property has the value 'Discrete'.",
                    "readonly": true,
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "SensingInterval": {
                    "description": "The time interval between when a metric is updated.",
                    "longDescription": "The value shall specify the time interval between when a metric is updated.  The format of the value shall conform to the Duration format.",
                    "pattern": "-?P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?",
                    "readonly": false,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "TimestampAccuracy": {
                    "description": "Accuracy of the timestamp.",
                    "longDescription": "The value shall specify the expected + or - variability of the timestamp.  The format of the value shall conform to the Duration format.",
                    "pattern": "-?P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "Units": {
                    "description": "The units of measure for this metric.",
                    "longDescription": "The value shall specify the units of the metric. shall be consistent with the case sensitive Unified Code for Units of Measure as defined at http://unitsofmeasure.org/ucum.html.  Note: the units of measure is not covered in UCUM.",
                    "readonly": false,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "Wildcards": {
                    "description": "A list of wildcards and their substitution values to be applied to the entries in the MetricProperties array property.",
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/definitions/Wildcard"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "longDescription": "The property shall contain a list of wildcards and their replacement strings, which are applied to the MetricProperties array property. Each wildcard shall have a corresponding entry in this array property.",
                    "type": "array"
                }
            },
            "required": [
                "@odata.id",
                "@odata.type",
                "Id",
                "Name"
            ],
            "type": "object"
        },
        "MetricType": {
            "description": "Specifies the type of metric provided.  The property provides information to the client on how the metric can be handled.",
            "enum": [
                "Numeric",
                "Discrete",
                "Gauge",
                "Counter",
                "Countdown"
            ],
            "enumDescriptions": {
                "Countdown": "The metric is a countdown metric.  The metric reading is a non-negative integer which decreases monotonically.  When a counter reaches its minimum, the value resets to preset value and resumes counting down.",
                "Counter": "The metric is a counter metric.  The metric reading is a non-negative integer which increases monotonically.  When a counter reaches its maximum, the value resets to 0 and resumes counting.",
                "Discrete": "The metric is a discrete metric.  The metric value is discrete.  The possible values are listed in the DiscreteValues property.",
                "Gauge": "The metric is a gauge metric.  The metric value is a real number.  When the metric value reaches the gauges extrema, it stays at that value, until the reading falls within the extrema.",
                "Numeric": "The metric is a numeric metric.  The metric value is any real number."
            },
            "enumLongDescriptions": {
                "Discrete": "The metric values shall indicate discrete states."
            },
            "longDescription": "The value of this property shall specify the type of metric.",
            "type": "string"
        },
        "OemActions": {
            "additionalProperties": true,
            "description": "The available OEM specific actions for this resource.",
            "longDescription": "This type shall contain any additional OEM actions for this resource.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {},
            "type": "object"
        },
        "Wildcard": {
            "additionalProperties": false,
            "description": "Contains a wildcard and its substitution values.",
            "longDescription": "This property shall contain a wildcard and its substitution values.",
            "patternProperties": {
                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
                    "description": "This property shall specify a valid odata or Redfish property.",
                    "type": [
                        "array",
                        "boolean",
                        "integer",
                        "number",
                        "null",
                        "object",
                        "string"
                    ]
                }
            },
            "properties": {
                "Name": {
                    "description": "The string used as a wildcard.",
                    "longDescription": "This property shall contain the string used as a wildcard.",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "Values": {
                    "description": "An array of values to substitute for the wildcard.",
                    "items": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "longDescription": "This property shall contain the list of values to substitute for the wildcard.",
                    "readonly": true,
                    "type": "array"
                }
            },
            "type": "object"
        }
    },
    "owningEntity": "DMTF",
    "release": "2018.2",
    "title": "#MetricDefinition.v1_0_1.MetricDefinition"
}