{
    "$id": "http://redfish.dmtf.org/schemas/v1/MetricReportDefinition.v1_2_1.json",
    "$ref": "#/definitions/MetricReportDefinition",
    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
    "copyright": "Copyright 2014-2019 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": "The available OEM-specific actions for this Resource.",
                    "longDescription": "This property shall contain the available OEM-specific actions for this Resource."
                }
            },
            "type": "object"
        },
        "CalculationAlgorithmEnum": {
            "description": "The function to apply to the list of metric properties.",
            "enum": [
                "Average",
                "Maximum",
                "Minimum",
                "Summation"
            ],
            "enumDescriptions": {
                "Average": "The metric is calculated as the average metric reading over a duration.",
                "Maximum": "The metric is calculated as the maximum metric reading over a duration.",
                "Minimum": "The metric is calculated as the minimum metric reading over a duration.",
                "Summation": "The metric is calculated as the sum of the values over a duration."
            },
            "enumLongDescriptions": {
                "Average": "The metric shall be calculated as the average metric reading over a duration.  The duration shall be the CollectionDuration property value.",
                "Maximum": "The metric shall be calculated as the maximum metric reading over a duration.  The duration shall be the CollectionDuration property value.",
                "Minimum": "The metric shall be calculated as the minimum of a metric reading over a duration.  The duration shall be the CollectionDuration property value.",
                "Summation": "The metric shall be calculated as the sum of the specified metric reading over a duration.  The duration shall be the CollectionDuration property value."
            },
            "longDescription": "This type shall specify the function to apply to the list of metric properties.",
            "type": "string"
        },
        "CollectionTimeScope": {
            "description": "The time scope of the related metric values.",
            "enum": [
                "Point",
                "Interval",
                "StartupInterval"
            ],
            "enumDescriptions": {
                "Interval": "The corresponding metric values apply to a time interval.  On the corresponding metric value instances, the Timestamp property value shall specify the end of the time interval and Duration shall specify its duration.",
                "Point": "The corresponding metric values apply to a point in time.  On the corresponding metric value instances, the Timestamp property value shall specify the point in time.",
                "StartupInterval": "The corresponding metric values apply to a time interval that began at the startup of the measured Resource, such as the Resources that Links.MetricDefinitionForResources associates.  On the corresponding metric value instances, the Timestamp value shall specify the end of the time interval.  The Duration value shall specify the duration between the startup of Resource and Timestamp."
            },
            "longDescription": "This type shall specify the time scope of the corresponding metric values.",
            "type": "string"
        },
        "Links": {
            "additionalProperties": false,
            "description": "The links to other Resources that are related to this Resource.",
            "longDescription": "The Redfish Specification-described type shall contain links to Resources related to but not subordinate to 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": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
                    "description": "The OEM extension property.",
                    "longDescription": "This property shall contain the OEM extensions.  All values for properties contained in this object shall conform to the Redfish Specification-described requirements."
                },
                "Triggers": {
                    "description": "The triggers that cause this metric report definition to generate a new metric report upon a trigger occurrence when the TriggerActions property contains `RedfishMetricReport`.",
                    "items": {
                        "$ref": "http://redfish.dmtf.org/schemas/v1/Triggers.json#/definitions/Triggers"
                    },
                    "longDescription": "This property shall contain a set of triggers that cause this metric report to generate a new metric report upon a trigger occurrence when the TriggerActions property contains `RedfishMetricReport`.",
                    "readonly": true,
                    "type": "array",
                    "versionAdded": "v1_2_0"
                },
                "Triggers@odata.count": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
                }
            },
            "type": "object"
        },
        "Metric": {
            "additionalProperties": false,
            "description": "Specifies a metric to include in the metric report.  The metrics are derived by applying a calculation on each of the listed metric properties.",
            "longDescription": "The properties shall specify a metric to include in the metric report.  The metrics shall be derived by applying the algorithm specified in CollectionnFunction property to each of the metric properties listed in the MetricProperties property.",
            "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": {
                "CollectionDuration": {
                    "description": "The duration over which the function is computed.",
                    "longDescription": "This property shall specify the duration over which the function is computed.  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"
                    ]
                },
                "CollectionFunction": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/CalculationAlgorithmEnum"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Specified the function to perform on each of the metric properties listed in the MetricProperties property.",
                    "longDescription": "The property shall specify the function to perform on each of the metric properties listed in the MetricProperties property.",
                    "readonly": false
                },
                "CollectionTimeScope": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/CollectionTimeScope"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "The scope of time scope over which the function is applied.",
                    "longDescription": "This property shall specify the scope of time over which the function is applied.",
                    "readonly": false
                },
                "MetricId": {
                    "description": "The label for the metric definition that is derived by applying the collectionFunction to the metric property.  It matches the Id property of the corresponding metric definition.",
                    "longDescription": "This property shall specify the label for the metric definition that is derived by applying the collectionFunction to the metric property.  This property shall match the Id property of the corresponding metric definition.",
                    "readonly": true,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "MetricProperties": {
                    "description": "The set of URIs for the properties on which this metric is collected.",
                    "format": "uri-reference",
                    "items": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "longDescription": "Each value may contain one or more Wildcard names enclosed in curly braces.  Wildcard value entries shall be substituted for each Wildcard name found.  If two or more wild names are found, the same Wildcard index is used for each in one substitution pass.  After substituting the WildCard values entries, each value shall contain a URI for a property in a Resource that matches a property declaration in the corresponding MetricDefinition.",
                    "readonly": false,
                    "type": "array"
                }
            },
            "type": "object"
        },
        "MetricReportDefinition": {
            "additionalProperties": false,
            "description": "The MetricReportDefinition schema describes set of metrics that are collected into a metric report.",
            "longDescription": "This Resource specifies a set of metrics that shall be collected into a metric report.",
            "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.json#/definitions/context"
                },
                "@odata.etag": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
                },
                "@odata.id": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
                },
                "@odata.type": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
                },
                "Actions": {
                    "$ref": "#/definitions/Actions",
                    "description": "The available actions for this Resource.",
                    "longDescription": "This property shall contain the available actions for this Resource."
                },
                "AppendLimit": {
                    "description": "The maximum number of entries that can be appended to a metric report.  When the metric report reaches its limit, its behavior is dictated by the ReportUpdates property.",
                    "longDescription": "This property shall contain a number that indicates the maximum number of entries that can be appended to a metric report.  When the metric report reaches its limit, its behavior shall be dictated by the ReportUpdates property.  This property shall be required if ReportUpdates is either AppendWrapsWhenFull or AppendStopsWhenFull.",
                    "minimum": 0,
                    "readonly": true,
                    "type": "integer"
                },
                "Description": {
                    "anyOf": [
                        {
                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "readonly": true
                },
                "Id": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
                    "readonly": true
                },
                "Links": {
                    "$ref": "#/definitions/Links",
                    "description": "The links to other Resources that are related to this Resource.",
                    "longDescription": "The Redfish Specification-described Links Property shall contain links to Resources related to but not subordinate to this Resource.",
                    "versionAdded": "v1_2_0"
                },
                "MetricProperties": {
                    "description": "The list of URIs with wildcards and property identifiers to include in the metric report.  If a URI has wildcards, the wildcards are substituted as specified in the Wildcards property.",
                    "format": "uri-reference",
                    "items": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "longDescription": "This property shall contain a list of URIs with wildcards and property identifiers to include in the metric report.  A set of curly braces shall delimit each wildcard in the URI.  The corresponding entry in the Wildcard property shall replace each wildcard.  After a URI with wildcards replaces each wildcard, it shall describe a Resource property to include in the metric report.  The property identifiers portion of the URI shall follow RFC6901-specified JSON fragment notation rules.",
                    "readonly": false,
                    "type": "array"
                },
                "MetricReport": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/MetricReport.json#/definitions/MetricReport",
                    "description": "The location where the resultant metric report is placed.",
                    "longDescription": "This property shall contain a link to the Resource where the resultant metric report is placed.",
                    "readonly": true
                },
                "MetricReportDefinitionEnabled": {
                    "description": "An indication of whether the generation of new metric reports is enabled.",
                    "longDescription": "This property shall indicate whether the generation of new metric reports is enabled.",
                    "readonly": false,
                    "type": [
                        "boolean",
                        "null"
                    ],
                    "versionAdded": "v1_2_0"
                },
                "MetricReportDefinitionType": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/MetricReportDefinitionType"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Specifies when the metric report is generated.",
                    "longDescription": "This property shall specify when the metric report is generated.  If the value is `Periodic`, the Schedule property shall be present.",
                    "readonly": false
                },
                "MetricReportHeartbeatInterval": {
                    "description": "The interval at which to send the complete metric report because the Redfish client wants refreshed metric data even when the data has not changed.  This property value is always greater than the recurrence interval of a metric report, and it only applies when the SuppressRepeatedMetricValue property is `true`.",
                    "longDescription": "The property value shall contain a Redfish duration that describes the time interval between generations of the unsuppressed metric report.  It shall always be a value greater than the RecurrenceInterval of a MetricReport and should only apply when the SuppressRepeatedMetricValue property is `true`.",
                    "pattern": "-?P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?",
                    "readonly": false,
                    "type": [
                        "string",
                        "null"
                    ],
                    "versionAdded": "v1_2_0"
                },
                "Metrics": {
                    "description": "The list of metrics to include in the metric report.  The metrics may include metric properties or calculations applied to a metric property.",
                    "items": {
                        "$ref": "#/definitions/Metric"
                    },
                    "longDescription": "The property shall contain a list of metrics to include in the metric report.  The metrics may include metric properties or calculations that are applied to a metric property.",
                    "type": "array"
                },
                "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": "The OEM extension property.",
                    "longDescription": "This property shall contain the OEM extensions.  All values for properties that this object contains shall conform to the Redfish Specification-described requirements."
                },
                "ReportActions": {
                    "description": "The set of actions to perform when a metric report is generated.",
                    "items": {
                        "$ref": "#/definitions/ReportActionsEnum"
                    },
                    "longDescription": "This property shall contain the set of actions to perform when the metric report is generated.",
                    "readonly": true,
                    "type": "array"
                },
                "ReportUpdates": {
                    "$ref": "#/definitions/ReportUpdatesEnum",
                    "description": "When logging metric reports, specifies how subsequent metric reports are handled in relationship to an existing metric report created from the metric report definition.  Namely, whether to overwrite, append, or create a report Resource.",
                    "longDescription": "This property shall contain how subsequent metric reports are handled in relationship to an existing metric report created from the metric report definition.",
                    "readonly": true
                },
                "Schedule": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Schedule.json#/definitions/Schedule",
                    "description": "The schedule for generating the metric report.",
                    "longDescription": "If the schedule present, the metric report is generated at an interval specified by Schedule.RecurrenceInterval property.  If Schedule.MaxOccurrences is specified, the metric report is no longer generated after the specified number of occurrences."
                },
                "Status": {
                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Status",
                    "description": "The status and health of the Resource and its subordinate or dependent Resources.",
                    "longDescription": "This property shall contain any status or health properties of the Resource."
                },
                "SuppressRepeatedMetricValue": {
                    "description": "An indication of whether any metrics are suppressed from the generated metric report.  If `true`, any metric that equals the same metric in the previously generated metric report is suppressed from the current report.  Also, duplicate metrics are suppressed.  If `false`, no metrics are suppressed from the current report.  The current report may contain no metrics if all metrics equal the values of the same metrics in the previously generated metric report.",
                    "longDescription": "This property shall indicate whether any metrics are suppressed from the generated metric report.  If `true`, any metric that equals the same metric in the previously generated metric report is suppressed from the current report.  Also, duplicate metrics are suppressed.  If `false`, no metrics are suppressed from the current report.  The current report may contain no metrics if all metrics equal the values of the same metrics in the previously generated metric report.",
                    "readonly": false,
                    "type": [
                        "boolean",
                        "null"
                    ],
                    "versionAdded": "v1_2_0"
                },
                "Wildcards": {
                    "description": "The set of wildcards and their substitution values for the entries in the MetricProperties property.",
                    "items": {
                        "$ref": "#/definitions/Wildcard"
                    },
                    "longDescription": "The property shall contain a set of wildcards and their replacement strings, which are applied to the MetricProperties property.  Each wildcard expressed in the MetricProperties property shall have a corresponding entry in this property.",
                    "type": "array"
                }
            },
            "required": [
                "@odata.id",
                "@odata.type",
                "Id",
                "Name"
            ],
            "type": "object"
        },
        "MetricReportDefinitionType": {
            "description": "Indicates when the metric report is generated.",
            "enum": [
                "Periodic",
                "OnChange",
                "OnRequest"
            ],
            "enumDescriptions": {
                "OnChange": "The metric report is generated when any of the metric values change.",
                "OnRequest": "The metric report is generated when a HTTP GET is performed on the specified metric report.",
                "Periodic": "The metric report is generated at a periodic time interval, specified in the Schedule property."
            },
            "longDescription": "This type shall specify when the metric report is generated.",
            "type": "string"
        },
        "OemActions": {
            "additionalProperties": true,
            "description": "The available OEM-specific actions for this Resource.",
            "longDescription": "This type shall contain the available OEM-specific 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"
        },
        "ReportActionsEnum": {
            "description": "Actions to perform when a metric report is generated.",
            "enum": [
                "LogToMetricReportsCollection",
                "RedfishEvent"
            ],
            "enumDescriptions": {
                "LogToMetricReportsCollection": "When a metric report is scheduled to be generated, record the occurrence to the metric report collection.",
                "RedfishEvent": "When a metric report is scheduled to be generated, send a Redfish Event message of the MetricReport type."
            },
            "enumLongDescriptions": {
                "LogToMetricReportsCollection": "When a metric report is scheduled to be generated, the service shall record the occurrence to the metric report collection found under the Telemetry Service.  The Service shall update the metric report collection based on the setting of the ReportUpdates property.",
                "RedfishEvent": "When a metric report is scheduled to be generated, the service shall send an event of the MetricReport type to subscribers that the EventSubscription collection in the Event Service describes."
            },
            "longDescription": "This type shall specify the actions to perform when a metric report is generated.",
            "type": "string"
        },
        "ReportUpdatesEnum": {
            "description": "Handling of subsequent metric reports when a metric report exists.",
            "enum": [
                "Overwrite",
                "AppendWrapsWhenFull",
                "AppendStopsWhenFull",
                "NewReport"
            ],
            "enumDescriptions": {
                "AppendStopsWhenFull": "When a metric report is updated, append to the specified metric report Resource.  This also indicates that the metric report stops adding entries when the metric report has reached its maximum capacity.",
                "AppendWrapsWhenFull": "When a metric report is updated, new information is appended to the report.  The metric report overwrites its entries with new entries when the metric report has reached its maximum capacity.",
                "NewReport": "When a metric report is updated, create a new metric report Resource, whose Resource name is the metric report Resource name concatenated with the timestamp.",
                "Overwrite": "When a metric report is updated, overwrite the metric report."
            },
            "longDescription": "This type shall indicate how the Service handles subsequent metric reports when a metric report exists.",
            "type": "string"
        },
        "Wildcard": {
            "additionalProperties": false,
            "description": "The wildcard and its substitution values.",
            "longDescription": "This type 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": {
                "Keys": {
                    "deprecated": "This property has been deprecated in favor of using the property '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",
                    "versionDeprecated": "v1_1_0"
                },
                "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",
                    "versionAdded": "v1_1_0"
                }
            },
            "type": "object"
        }
    },
    "owningEntity": "DMTF",
    "release": "2019.1",
    "title": "#MetricReportDefinition.v1_2_1.MetricReportDefinition"
}