diff --git a/file-formats/gsmg/README.md b/file-formats/gsmg/README.md new file mode 100644 index 000000000..a1189df84 --- /dev/null +++ b/file-formats/gsmg/README.md @@ -0,0 +1,5 @@ +# GSMG File Format + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.gsmg.json` | 1 | [`zif_aff_gsmg_v1.intf.abap`](./type/zif_aff_gsmg_v1.intf.abap) | [`gsmg-v1.json`](./gsmg-v1.json) | | [`z_aff_example_gsmg.gsmg.json`](./examples/z_aff_example_gsmg.gsmg.json) diff --git a/file-formats/gsmg/examples/z_aff_example_gsmg.gsmg.json b/file-formats/gsmg/examples/z_aff_example_gsmg.gsmg.json new file mode 100644 index 000000000..f4f9f2c9f --- /dev/null +++ b/file-formats/gsmg/examples/z_aff_example_gsmg.gsmg.json @@ -0,0 +1,10 @@ +{ + "formatVersion": "1", + "header": { + "description": "For testing.", + "originalLanguage": "en" + }, + "generalInformation": { + "category": "usage" + } +} diff --git a/file-formats/gsmg/gsmg-v1.json b/file-formats/gsmg/gsmg-v1.json new file mode 100644 index 000000000..39357bf52 --- /dev/null +++ b/file-formats/gsmg/gsmg-v1.json @@ -0,0 +1,108 @@ +{ + "$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/gsmg/gsmg-v1.json", + "title": "Metric Group", + "description": "Metric Group (GSMG)", + "type": "object", + "properties": { + "formatVersion": { + "title": "ABAP File Format Version", + "description": "The ABAP file format version", + "type": "string", + "const": "1" + }, + "header": { + "title": "Header", + "description": "Header", + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "Description of the ABAP object", + "type": "string", + "maxLength": 60 + }, + "originalLanguage": { + "title": "Original Language", + "description": "Original language of the ABAP object", + "type": "string", + "minLength": 2 + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": [ + "standard", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "generalInformation": { + "title": "General Information", + "description": "General information", + "type": "object", + "properties": { + "category": { + "title": "Category", + "description": "Category", + "type": "string", + "enum": [ + "availability", + "performance", + "exception", + "configuration", + "usage", + "selfMonitoring", + "metering" + ], + "enumTitles": [ + "Availability", + "Performance", + "Exception", + "Configuration", + "Usage", + "Self Monitoring", + "Metering" + ], + "enumDescriptions": [ + "Availability", + "Performance", + "Exception", + "Configuration", + "Usage", + "Self monitoring", + "Metering" + ], + "default": "usage" + } + }, + "additionalProperties": false, + "required": [ + "category" + ] + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "generalInformation" + ] +} diff --git a/file-formats/gsmg/type/zif_aff_gsmg_v1.intf.abap b/file-formats/gsmg/type/zif_aff_gsmg_v1.intf.abap new file mode 100644 index 000000000..2405550b0 --- /dev/null +++ b/file-formats/gsmg/type/zif_aff_gsmg_v1.intf.abap @@ -0,0 +1,83 @@ +INTERFACE zif_aff_gsmg_v1 + PUBLIC. + + TYPES: + + "!

Category

+ "! Category + "! $values {@link zif_aff_gsmg_v1.data:co_category} + "! $default {@link zif_aff_gsmg_v1.data:co_category.usage} + ty_category TYPE c LENGTH 10, + + + "!

General Information

+ "! General information + BEGIN OF ty_general_information, + "!

Category

+ "! Category + "! $required + category TYPE ty_category, + + END OF ty_general_information. + + + CONSTANTS: + + "!

Category

+ "! Category + BEGIN OF co_category, + + "!

Availability

+ "! Availability + availability TYPE ty_category VALUE 'AVAIL', + + "!

Performance

+ "! Performance + performance TYPE ty_category VALUE 'PERFORM', + + "!

Exception

+ "! Exception + exception TYPE ty_category VALUE 'EXCEPTION', + + "!

Configuration

+ "! Configuration + configuration TYPE ty_category VALUE 'CONFIGURE', + + "!

Usage

+ "! Usage + usage TYPE ty_category VALUE 'USAGE', + + "!

Self Monitoring

+ "! Self monitoring + self_monitoring TYPE ty_category VALUE 'SELFMON', + + "!

Metering

+ "! Metering + metering TYPE ty_category VALUE 'METERING', + + END OF co_category. + + + + TYPES: + + "!

Metric Group

+ "! Metric Group (GSMG) + BEGIN OF ty_main, + + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + + "!

Header

+ "! Header + "! $required + header TYPE zif_aff_types_v1=>ty_header_60_cloud, + + "!

General Information

+ "! General information + "! $required + general_information TYPE ty_general_information, + + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/gsmg/type/zif_aff_gsmg_v1.intf.json b/file-formats/gsmg/type/zif_aff_gsmg_v1.intf.json new file mode 100644 index 000000000..a9790e334 --- /dev/null +++ b/file-formats/gsmg/type/zif_aff_gsmg_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "GSMG AFF Type (Metric Group)", + "originalLanguage": "en" + } +}