diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ebb68e8..47e97bc 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -26,6 +26,9 @@ src/PxWeb.Api2.Server.Models/KeyValuePair.cs src/PxWeb.Api2.Server.Models/Language.cs src/PxWeb.Api2.Server.Models/Link.cs src/PxWeb.Api2.Server.Models/MeasuringType.cs +src/PxWeb.Api2.Server.Models/MetaidDimentionEntry.cs +src/PxWeb.Api2.Server.Models/MetaidLink.cs +src/PxWeb.Api2.Server.Models/MetaidLinksValue.cs src/PxWeb.Api2.Server.Models/Note.cs src/PxWeb.Api2.Server.Models/OutputFormatParamType.cs src/PxWeb.Api2.Server.Models/OutputFormatType.cs diff --git a/PxAPI-2.yml b/PxAPI-2.yml index aaeb399..eb99ea4 100644 --- a/PxAPI-2.yml +++ b/PxAPI-2.yml @@ -1282,6 +1282,8 @@ components: updateFrequency: description: How often a table is updated type: string + metaid-links: + $ref: '#/components/schemas/metaid-links' firstPeriod: description: Earliest time period in table type: string @@ -1300,6 +1302,65 @@ components: description: A list of contacts associated with the table. items: $ref: "#/components/schemas/Contact" + + metaid-links: + type: object + description: Dictionary where key is metadata-type (e.g statistics-homepage, about-statistics, definitions ) and value is an MetaLinkValue object. + additionalProperties: + type: object + properties: + dataset-links: + $ref: '#/components/schemas/array-of-metaid-link' + dimention-entries: + type: object + description: Dictionary where key is a dimention-code and value is a MetaidDimentionEntry object . + additionalProperties: + $ref: '#/components/schemas/metaid-dimention-entry' + + metaid-dimention-entry: + type: object + description: Holds links for a dimention and or category. + properties: + dimension-links: + $ref: '#/components/schemas/array-of-metaid-link' + category-links: + $ref: '#/components/schemas/category-links' + + category-links: + type: object + description: Dictionary where key is a category-code and value is a array of metaid-link. + additionalProperties: + $ref: '#/components/schemas/array-of-metaid-link' + + array-of-metaid-link: + description: Array of metaid-link. + type: array + items: + $ref: '#/components/schemas/metaid-link' + + metaid-link: + type: object + description: Represents a single MetaID link. + properties: + metaid: + type: string + description: Source Meta ID for this link + href: + type: string + format: uri + description: URL link + label: + type: string + description: Label for the link + type: + type: string + description: Type of the link, like text/htm + required: + - metaid + - href + - label + - type + extension: description: extension at some level type: object diff --git a/README.md b/README.md index ff12c48..1d2881b 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,7 @@ Windows: ```sh build.bat ``` + + +### To look at the templates: +docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v7.9.0 author template -g aspnetcore -o /local/templates-aspnetcore \ No newline at end of file diff --git a/a_metaid_alt0.json b/a_metaid_alt0.json new file mode 100644 index 0000000..dd194e1 --- /dev/null +++ b/a_metaid_alt0.json @@ -0,0 +1,296 @@ +{ + "version": "2.0", + "class": "dataset", + "label": "12909: Doctor certified sickness absence for employees (per cent), PxcMetaTitleBy occupation, country background, contents PxcMetaTitleAnd quarter", + "source": "Statistics Norway", + "updated": "2026-02-26T07:00:00Z", + "note": [ + "Large changes in the sickness absence rates from one year to another should be interpreted with caution. Occupations with few observations will experience large changes even if the change in sickness absence days are small in absolute numbers.", + "The table does not include stateless employees or employees with unknown country background." + ], + "role": { + "time": [ + "Tid" + ], + "metric": [ + "ContentsCode" + ] + }, + "id": [ + "Yrke", + "LandBakgr", + "ContentsCode", + "Tid" + ], + "size": [ + 2, + 2, + 2, + 1 + ], + "dimension": { + "Yrke": { + "label": "occupation", + "category": { + "index": { + "1": 0, + "2": 1 + }, + "label": { + "1": "Managers", + "2": "Professionals" + } + }, + "extension": { + "elimination": false, + "show": "code_value" + }, + "link": { + "describedby": [ + { + "extension": { + "Yrke": "urn:ssb:classification:klass:7 urn:ssb:conceptvariable:vardok:1118" + } + } + ] + } + }, + "LandBakgr": { + "label": "country background", + "category": { + "index": { + "999": 0, + "00": 1 + }, + "label": { + "999": "Total", + "00": "Nordic countries except Norway" + } + }, + "extension": { + "elimination": true, + "eliminationValueCode": "999", + "show": "value" + }, + "link": { + "describedby": [ + { + "extension": { + "00": "urn:ssb:conceptvariable:vardok:007", + "LandBakgr": "urn:ssb:classification:klass:545" + } + } + ] + } + }, + "ContentsCode": { + "label": "contents", + "category": { + "index": { + "Sykefraversprosent": 0, + "SykefraversprosEndr": 1 + }, + "label": { + "Sykefraversprosent": "Sickness absence rate (doctor certified)", + "SykefraversprosEndr": "Sickness absence rate (doctor certified), per cent change last year" + }, + "unit": { + "Sykefraversprosent": { + "base": "per cent", + "decimals": 1 + }, + "SykefraversprosEndr": { + "base": "per cent", + "decimals": 1 + } + } + }, + "extension": { + "elimination": false, + "refperiod": { + "Sykefraversprosent": "Quarter", + "SykefraversprosEndr": "Quarter" + }, + "show": "value", + "measuringType": { + "Sykefraversprosent": "Average", + "SykefraversprosEndr": "Average" + }, + "priceType": { + "Sykefraversprosent": "NotApplicable", + "SykefraversprosEndr": "NotApplicable" + }, + "adjustment": { + "Sykefraversprosent": "None", + "SykefraversprosEndr": "None" + } + }, + "link": { + "describedby": [ + { + "extension": { + "Sykefraversprosent": "urn:ssb:conceptvariable:vardok:2236", + "SykefraversprosEndr": "urn:ssb:conceptvariable:vardok:2236" + } + } + ] + } + }, + "Tid": { + "label": "quarter", + "category": { + "index": { + "2024K4": 0 + }, + "label": { + "2024K4": "2024K4" + } + }, + "extension": { + "elimination": false, + "show": "code" + } + } + }, + "extension": { + "px": { + "infofile": "None", + "tableid": "12909", + "decimals": 1, + "official-statistics": false, + "aggregallowed": false, + "copyright": false, + "language": "en", + "contents": "12909: Doctor certified sickness absence for employees (per cent),", + "descriptiondefault": false, + "heading": [ + "ContentsCode", + "Tid" + ], + "stub": [ + "Yrke", + "LandBakgr" + ], + "matrix": "Sykefraversprosent", + "subject-code": "al", + "subject-area": "Labour market and earnings", + "metaid-links": [ + { + "relation": "(gui-field =) statistics-homepage (sort of a IANA subclass)", + "dimension": null, + "catagory": null, + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot", + "label": "Statistics homepage", + "type": "text/html" + }, + { + "relation": "(gui-field =) about-statistics", + "dimension": null, + "catagory": null, + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot#om-statistikken", + "label": "About the statistics", + "type": "text/html" + }, + { + "relation": "(gui-field =) definitions", + "dimension": "Yrke", + "catagory": null, + "metaid": "urn:ssb:classification:klass:7", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/7", + "label": "Classification for variableLabel.", + "type": "text/html" + }, + { + "relation": "(gui-field =) definitions", + "dimension": "Yrke", + "catagory": null, + "metaid": "urn:ssb:conceptvariable:vardok:1118", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/1118/en", + "label": "Definition of variableLabel.", + "type": "text/html" + }, + { + "relation": "(gui-field =) definitions", + "dimension": "LandBakgr", + "catagory": null, + "metaid": "urn:ssb:classification:klass:545", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/545", + "label": "Classification for variableLabel.", + "type": "text/html" + }, + { + "relation": "(gui-field =) definitions", + "dimension": "LandBakgr", + "catagory": "00", + "metaid": "urn:ssb:conceptvariable:vardok:007", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/007/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + }, + + { + "relation": "(gui-field =) definitions", + "dimension": "ContentsCode", + "catagory": "Sykefraversprosent", + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + }, + { + "relation": "(gui-field =) definitions", + "dimension": "ContentsCode", + "catagory": "SykefraversprosEndr", + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + }, + { + "relation": "acticles on big strike(IANA subclass)", + "dimension": "Yrke", + "catagory": "lærere", + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ], + "discontinued": null, + "contact": [ + { + "name": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77", + "organization": "", + "phone": "", + "mail": "", + "raw": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77, #uhh@ssb.no " + }, + { + "name": " Arbeidsmarked, Statistics Norway +47 62 88 50 00", + "organization": "", + "phone": "", + "mail": "", + "raw": "# Arbeidsmarked, Statistics Norway +47 62 88 50 00, #arbeidsmarked@ssb.no " + }, + { + "name": "Stine Bakke, Statistics Norway +47 91 52 62 51", + "organization": "", + "phone": "", + "mail": "", + "raw": "#Stine Bakke, Statistics Norway +47 91 52 62 51, #eba@ssb.no " + } + ] + }, + "value": [ + 4.9, + -2.6, + 4.2, + 3.7, + 4.8, + -2.5, + 5, + -2.5 + ] + } diff --git a/a_metaid_alt1.json b/a_metaid_alt1.json new file mode 100644 index 0000000..d2954cb --- /dev/null +++ b/a_metaid_alt1.json @@ -0,0 +1,295 @@ +{ + "version": "2.0", + "class": "dataset", + "label": "12909: Doctor certified sickness absence for employees (per cent), PxcMetaTitleBy occupation, country background, contents PxcMetaTitleAnd quarter", + "source": "Statistics Norway", + "updated": "2026-02-26T07:00:00Z", + "note": [ + "Large changes in the sickness absence rates from one year to another should be interpreted with caution. Occupations with few observations will experience large changes even if the change in sickness absence days are small in absolute numbers.", + "The table does not include stateless employees or employees with unknown country background." + ], + "role": { + "time": [ + "Tid" + ], + "metric": [ + "ContentsCode" + ] + }, + "id": [ + "Yrke", + "LandBakgr", + "ContentsCode", + "Tid" + ], + "size": [ + 2, + 2, + 2, + 1 + ], + "dimension": { + "Yrke": { + "label": "occupation", + "category": { + "index": { + "1": 0, + "2": 1 + }, + "label": { + "1": "Managers", + "2": "Professionals" + } + }, + "extension": { + "elimination": false, + "show": "code_value" + }, + "link": { + "describedby": [ + { + "extension": { + "Yrke": "urn:ssb:classification:klass:7 urn:ssb:conceptvariable:vardok:1118" + } + } + ] + } + }, + "LandBakgr": { + "label": "country background", + "category": { + "index": { + "999": 0, + "00": 1 + }, + "label": { + "999": "Total", + "00": "Nordic countries except Norway" + } + }, + "extension": { + "elimination": true, + "eliminationValueCode": "999", + "show": "value" + }, + "link": { + "describedby": [ + { + "extension": { + "00": "urn:ssb:conceptvariable:vardok:007", + "LandBakgr": "urn:ssb:classification:klass:545" + } + } + ] + } + }, + "ContentsCode": { + "label": "contents", + "category": { + "index": { + "Sykefraversprosent": 0, + "SykefraversprosEndr": 1 + }, + "label": { + "Sykefraversprosent": "Sickness absence rate (doctor certified)", + "SykefraversprosEndr": "Sickness absence rate (doctor certified), per cent change last year" + }, + "unit": { + "Sykefraversprosent": { + "base": "per cent", + "decimals": 1 + }, + "SykefraversprosEndr": { + "base": "per cent", + "decimals": 1 + } + } + }, + "extension": { + "elimination": false, + "refperiod": { + "Sykefraversprosent": "Quarter", + "SykefraversprosEndr": "Quarter" + }, + "show": "value", + "measuringType": { + "Sykefraversprosent": "Average", + "SykefraversprosEndr": "Average" + }, + "priceType": { + "Sykefraversprosent": "NotApplicable", + "SykefraversprosEndr": "NotApplicable" + }, + "adjustment": { + "Sykefraversprosent": "None", + "SykefraversprosEndr": "None" + } + }, + "link": { + "describedby": [ + { + "extension": { + "Sykefraversprosent": "urn:ssb:conceptvariable:vardok:2236", + "SykefraversprosEndr": "urn:ssb:conceptvariable:vardok:2236" + } + } + ] + } + }, + "Tid": { + "label": "quarter", + "category": { + "index": { + "2024K4": 0 + }, + "label": { + "2024K4": "2024K4" + } + }, + "extension": { + "elimination": false, + "show": "code" + } + } + }, + "extension": { + "px": { + "infofile": "None", + "tableid": "12909", + "decimals": 1, + "official-statistics": false, + "aggregallowed": false, + "copyright": false, + "language": "en", + "contents": "12909: Doctor certified sickness absence for employees (per cent),", + "descriptiondefault": false, + "heading": [ + "ContentsCode", + "Tid" + ], + "stub": [ + "Yrke", + "LandBakgr" + ], + "matrix": "Sykefraversprosent", + "subject-code": "al", + "subject-area": "Labour market and earnings", + "metaid-links": { + "(gui-field =) statistics-homepage": { + "dataset-links": [ + { + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot", + "label": "Statistics homepage", + "type": "text/html" + } + ] + }, + "(gui-field =) about-statistics": { + "dataset-links": [ + { + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot#om-statistikken", + "label": "About the statistics", + "type": "text/html" + } + ] + }, + "(gui-field =) definitions": { + "dimention-entries": { + "Yrke": { + "dimension-links": [ + { + "metaid": "urn:ssb:classification:klass:7", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/7", + "label": "Classification for variableLabel.", + "type": "text/html" + }, + { + "metaid": "urn:ssb:conceptvariable:vardok:1118", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/1118/en", + "label": "Definition of variableLabel.", + "type": "text/html" + } + ] + }, + "LandBakgr": { + "dimension-links": [ + { + "metaid": "urn:ssb:classification:klass:545", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/545", + "label": "Classification for variableLabel.", + "type": "text/html" + } + ], + "category-links": { + "00": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:007", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/007/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + } + }, + "ContentsCode": { + "category-links": { + "Sykefraversprosent": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ], + "SykefraversprosEndr": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + } + } + } + } + } + }, + "discontinued": null, + "contact": [ + { + "name": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77", + "organization": "", + "phone": "", + "mail": "", + "raw": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77, #uhh@ssb.no " + }, + { + "name": " Arbeidsmarked, Statistics Norway +47 62 88 50 00", + "organization": "", + "phone": "", + "mail": "", + "raw": "# Arbeidsmarked, Statistics Norway +47 62 88 50 00, #arbeidsmarked@ssb.no " + }, + { + "name": "Stine Bakke, Statistics Norway +47 91 52 62 51", + "organization": "", + "phone": "", + "mail": "", + "raw": "#Stine Bakke, Statistics Norway +47 91 52 62 51, #eba@ssb.no " + } + ] + }, + "value": [ + 4.9, + -2.6, + 4.2, + 3.7, + 4.8, + -2.5, + 5, + -2.5 + ] +} \ No newline at end of file diff --git a/a_metaid_alt2.json b/a_metaid_alt2.json new file mode 100644 index 0000000..e732aef --- /dev/null +++ b/a_metaid_alt2.json @@ -0,0 +1,293 @@ +{ + "version": "2.0", + "class": "dataset", + "label": "12909: Doctor certified sickness absence for employees (per cent), PxcMetaTitleBy occupation, country background, contents PxcMetaTitleAnd quarter", + "source": "Statistics Norway", + "updated": "2026-02-26T07:00:00Z", + "note": [ + "Large changes in the sickness absence rates from one year to another should be interpreted with caution. Occupations with few observations will experience large changes even if the change in sickness absence days are small in absolute numbers.", + "The table does not include stateless employees or employees with unknown country background." + ], + "role": { + "time": [ + "Tid" + ], + "metric": [ + "ContentsCode" + ] + }, + "id": [ + "Yrke", + "LandBakgr", + "ContentsCode", + "Tid" + ], + "size": [ + 2, + 2, + 2, + 1 + ], + "dimension": { + "Yrke": { + "label": "occupation", + "category": { + "index": { + "1": 0, + "2": 1 + }, + "label": { + "1": "Managers", + "2": "Professionals" + } + }, + "extension": { + "elimination": false, + "show": "code_value", + "metaid-links": { + "(gui-field =) definitions": { + "dimension-links": [ + { + "metaid": "urn:ssb:classification:klass:7", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/7", + "label": "Classification for variableLabel.", + "type": "text/html" + }, + { + "metaid": "urn:ssb:conceptvariable:vardok:1118", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/1118/en", + "label": "Definition of variableLabel.", + "type": "text/html" + } + ] + } + } + }, + "link": { + "describedby": [ + { + "extension": { + "Yrke": "urn:ssb:classification:klass:7 urn:ssb:conceptvariable:vardok:1118" + } + } + ] + } + }, + "LandBakgr": { + "label": "country background", + "category": { + "index": { + "999": 0, + "00": 1 + }, + "label": { + "999": "Total", + "00": "Nordic countries except Norway" + } + }, + "extension": { + "elimination": true, + "eliminationValueCode": "999", + "show": "value", + "metaid-links": { + "(gui-field =) definitions": { + "dimension-links": [ + { + "metaid": "urn:ssb:classification:klass:545", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/545", + "label": "Classification for variableLabel.", + "type": "text/html" + } + ], + "category-links": { + "00": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:007", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/007/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + } + } + } + }, + "link": { + "describedby": [ + { + "extension": { + "00": "urn:ssb:conceptvariable:vardok:007", + "LandBakgr": "urn:ssb:classification:klass:545" + } + } + ] + } + }, + "ContentsCode": { + "label": "contents", + "category": { + "index": { + "Sykefraversprosent": 0, + "SykefraversprosEndr": 1 + }, + "label": { + "Sykefraversprosent": "Sickness absence rate (doctor certified)", + "SykefraversprosEndr": "Sickness absence rate (doctor certified), per cent change last year" + }, + "unit": { + "Sykefraversprosent": { + "base": "per cent", + "decimals": 1 + }, + "SykefraversprosEndr": { + "base": "per cent", + "decimals": 1 + } + } + }, + "extension": { + "elimination": false, + "refperiod": { + "Sykefraversprosent": "Quarter", + "SykefraversprosEndr": "Quarter" + }, + "show": "value", + "measuringType": { + "Sykefraversprosent": "Average", + "SykefraversprosEndr": "Average" + }, + "priceType": { + "Sykefraversprosent": "NotApplicable", + "SykefraversprosEndr": "NotApplicable" + }, + "adjustment": { + "Sykefraversprosent": "None", + "SykefraversprosEndr": "None" + }, + "metaid-links": { + "(gui-field =) definitions": { + "category-links": { + "Sykefraversprosent": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ], + "SykefraversprosEndr": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + } + } + } + }, + "link": { + "describedby": [ + { + "extension": { + "Sykefraversprosent": "urn:ssb:conceptvariable:vardok:2236", + "SykefraversprosEndr": "urn:ssb:conceptvariable:vardok:2236" + } + } + ] + } + }, + "Tid": { + "label": "quarter", + "category": { + "index": { + "2024K4": 0 + }, + "label": { + "2024K4": "2024K4" + } + }, + "extension": { + "elimination": false, + "show": "code" + } + } + }, + "extension": { + "px": { + "infofile": "None", + "tableid": "12909", + "decimals": 1, + "official-statistics": false, + "aggregallowed": false, + "copyright": false, + "language": "en", + "contents": "12909: Doctor certified sickness absence for employees (per cent),", + "descriptiondefault": false, + "heading": [ + "ContentsCode", + "Tid" + ], + "stub": [ + "Yrke", + "LandBakgr" + ], + "matrix": "Sykefraversprosent", + "subject-code": "al", + "subject-area": "Labour market and earnings", + "metaid-links": { + "(gui-field =) statistics-homepage": [ + { + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot", + "label": "Statistics homepage", + "type": "text/html" + } + ], + "(gui-field =) about-statistics": [ + { + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot#om-statistikken", + "label": "About the statistics", + "type": "text/html" + } + ] + } + }, + "discontinued": null, + "contact": [ + { + "name": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77", + "organization": "", + "phone": "", + "mail": "", + "raw": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77, #uhh@ssb.no " + }, + { + "name": " Arbeidsmarked, Statistics Norway +47 62 88 50 00", + "organization": "", + "phone": "", + "mail": "", + "raw": "# Arbeidsmarked, Statistics Norway +47 62 88 50 00, #arbeidsmarked@ssb.no " + }, + { + "name": "Stine Bakke, Statistics Norway +47 91 52 62 51", + "organization": "", + "phone": "", + "mail": "", + "raw": "#Stine Bakke, Statistics Norway +47 91 52 62 51, #eba@ssb.no " + } + ] + }, + "value": [ + 4.9, + -2.6, + 4.2, + 3.7, + 4.8, + -2.5, + 5, + -2.5 + ] +} diff --git a/a_metaid_alt3.json b/a_metaid_alt3.json new file mode 100644 index 0000000..2eb4722 --- /dev/null +++ b/a_metaid_alt3.json @@ -0,0 +1,290 @@ +{ + "version": "2.0", + "class": "dataset", + "label": "12909: Doctor certified sickness absence for employees (per cent), PxcMetaTitleBy occupation, country background, contents PxcMetaTitleAnd quarter", + "source": "Statistics Norway", + "updated": "2026-02-26T07:00:00Z", + "note": [ + "Large changes in the sickness absence rates from one year to another should be interpreted with caution. Occupations with few observations will experience large changes even if the change in sickness absence days are small in absolute numbers.", + "The table does not include stateless employees or employees with unknown country background." + ], + "role": { + "time": [ + "Tid" + ], + "metric": [ + "ContentsCode" + ] + }, + "id": [ + "Yrke", + "LandBakgr", + "ContentsCode", + "Tid" + ], + "size": [ + 2, + 2, + 2, + 1 + ], + "dimension": { + "Yrke": { + "label": "occupation", + "category": { + "index": { + "1": 0, + "2": 1 + }, + "label": { + "1": "Managers", + "2": "Professionals" + } + }, + "extension": { + "elimination": false, + "show": "code_value", + "metaid-links": { + "(gui-field =) definitions": { + "dimension-links (= magic value)": [ + { + "metaid": "urn:ssb:classification:klass:7", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/7", + "label": "Classification for variableLabel.", + "type": "text/html" + }, + { + "metaid": "urn:ssb:conceptvariable:vardok:1118", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/1118/en", + "label": "Definition of variableLabel.", + "type": "text/html" + } + ] + } + } + }, + "link": { + "describedby": [ + { + "extension": { + "Yrke": "urn:ssb:classification:klass:7 urn:ssb:conceptvariable:vardok:1118" + } + } + ] + } + }, + "LandBakgr": { + "label": "country background", + "category": { + "index": { + "999": 0, + "00": 1 + }, + "label": { + "999": "Total", + "00": "Nordic countries except Norway" + } + }, + "extension": { + "elimination": true, + "eliminationValueCode": "999", + "show": "value", + "metaid-links": { + "(gui-field =) definitions": { + "dimension-links (= magic value)": [ + { + "metaid": "urn:ssb:classification:klass:545", + "href": "https://www.ssb.no/en/klass/klassifikasjoner/545", + "label": "Classification for variableLabel.", + "type": "text/html" + } + ], + "00": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:007", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/007/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + + } + } + }, + "link": { + "describedby": [ + { + "extension": { + "00": "urn:ssb:conceptvariable:vardok:007", + "LandBakgr": "urn:ssb:classification:klass:545" + } + } + ] + } + }, + "ContentsCode": { + "label": "contents", + "category": { + "index": { + "Sykefraversprosent": 0, + "SykefraversprosEndr": 1 + }, + "label": { + "Sykefraversprosent": "Sickness absence rate (doctor certified)", + "SykefraversprosEndr": "Sickness absence rate (doctor certified), per cent change last year" + }, + "unit": { + "Sykefraversprosent": { + "base": "per cent", + "decimals": 1 + }, + "SykefraversprosEndr": { + "base": "per cent", + "decimals": 1 + } + } + }, + "extension": { + "elimination": false, + "refperiod": { + "Sykefraversprosent": "Quarter", + "SykefraversprosEndr": "Quarter" + }, + "show": "value", + "measuringType": { + "Sykefraversprosent": "Average", + "SykefraversprosEndr": "Average" + }, + "priceType": { + "Sykefraversprosent": "NotApplicable", + "SykefraversprosEndr": "NotApplicable" + }, + "adjustment": { + "Sykefraversprosent": "None", + "SykefraversprosEndr": "None" + }, + "metaid-links": { + "(gui-field =) definitions": { + "Sykefraversprosent": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ], + "SykefraversprosEndr": [ + { + "metaid": "urn:ssb:conceptvariable:vardok:2236", + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + } + } + }, + "link": { + "describedby": [ + { + "extension": { + "Sykefraversprosent": "urn:ssb:conceptvariable:vardok:2236", + "SykefraversprosEndr": "urn:ssb:conceptvariable:vardok:2236" + } + } + ] + } + }, + "Tid": { + "label": "quarter", + "category": { + "index": { + "2024K4": 0 + }, + "label": { + "2024K4": "2024K4" + } + }, + "extension": { + "elimination": false, + "show": "code" + } + } + }, + "extension": { + "px": { + "infofile": "None", + "tableid": "12909", + "decimals": 1, + "official-statistics": false, + "aggregallowed": false, + "copyright": false, + "language": "en", + "contents": "12909: Doctor certified sickness absence for employees (per cent),", + "descriptiondefault": false, + "heading": [ + "ContentsCode", + "Tid" + ], + "stub": [ + "Yrke", + "LandBakgr" + ], + "matrix": "Sykefraversprosent", + "subject-code": "al", + "subject-area": "Labour market and earnings", + "metaid-links": { + "(gui-field =) statistics-homepage": [ + { + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot", + "label": "Statistics homepage", + "type": "text/html" + } + ], + "(gui-field =) about-statistics": [ + { + "metaid": "STATISTICS:sykefratot", + "href": "https://www.ssb.no/en/sykefratot#om-statistikken", + "label": "About the statistics", + "type": "text/html" + } + ] + } + }, + "discontinued": null, + "contact": [ + { + "name": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77", + "organization": "", + "phone": "", + "mail": "", + "raw": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77, #uhh@ssb.no " + }, + { + "name": " Arbeidsmarked, Statistics Norway +47 62 88 50 00", + "organization": "", + "phone": "", + "mail": "", + "raw": "# Arbeidsmarked, Statistics Norway +47 62 88 50 00, #arbeidsmarked@ssb.no " + }, + { + "name": "Stine Bakke, Statistics Norway +47 91 52 62 51", + "organization": "", + "phone": "", + "mail": "", + "raw": "#Stine Bakke, Statistics Norway +47 91 52 62 51, #eba@ssb.no " + } + ] + }, + "value": [ + 4.9, + -2.6, + 4.2, + 3.7, + 4.8, + -2.5, + 5, + -2.5 + ] +} diff --git a/a_metaid_alt4.json b/a_metaid_alt4.json new file mode 100644 index 0000000..78bc827 --- /dev/null +++ b/a_metaid_alt4.json @@ -0,0 +1,301 @@ +{ + "version": "2.0", + "class": "dataset", + "label": "12909: Doctor certified sickness absence for employees (per cent), PxcMetaTitleBy occupation, country background, contents PxcMetaTitleAnd quarter", + "source": "Statistics Norway", + "updated": "2026-02-26T07:00:00Z", + "note": [ + "Large changes in the sickness absence rates from one year to another should be interpreted with caution. Occupations with few observations will experience large changes even if the change in sickness absence days are small in absolute numbers.", + "The table does not include stateless employees or employees with unknown country background." + ], + "role": { + "time": [ + "Tid" + ], + "metric": [ + "ContentsCode" + ] + }, + "id": [ + "Yrke", + "LandBakgr", + "ContentsCode", + "Tid" + ], + "size": [ + 2, + 2, + 2, + 1 + ], + "dimension": { + "Yrke": { + "label": "occupation", + "category": { + "index": { + "1": 0, + "2": 1 + }, + "label": { + "1": "Managers", + "2": "Professionals" + } + }, + "extension": { + "elimination": false, + "show": "code_value" + }, + "link": { + "describedby": [ + { + "extension": { + "Yrke": "urn:ssb:classification:klass:7 urn:ssb:conceptvariable:vardok:1118" + } + } + ], + "related": [ + { + "extension": { + "relation": "(gui-field =) definitions", + "catagory": null, + "metaid": "urn:ssb:classification:klass:7" + }, + "href": "https://www.ssb.no/en/klass/klassifikasjoner/7", + "label": "Classification for variableLabel.", + "type": "text/html" + }, + { + "extension": { + "relation": "(gui-field =) definitions", + "catagory": null, + "metaid": "urn:ssb:conceptvariable:vardok:1118" + }, + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/1118/en", + "label": "Definition of variableLabel.", + "type": "text/html" + } + ] + } + }, + "LandBakgr": { + "label": "country background", + "category": { + "index": { + "999": 0, + "00": 1 + }, + "label": { + "999": "Total", + "00": "Nordic countries except Norway" + } + }, + "extension": { + "elimination": true, + "eliminationValueCode": "999", + "show": "value" + }, + "link": { + "describedby": [ + { + "extension": { + "00": "urn:ssb:conceptvariable:vardok:007", + "LandBakgr": "urn:ssb:classification:klass:545" + } + } + ], + "related": [ + { + "extension": { + "relation": "(gui-field =) definitions", + "catagory": null, + "metaid": "urn:ssb:classification:klass:545" + }, + "href": "https://www.ssb.no/en/klass/klassifikasjoner/545", + "label": "Classification for variableLabel.", + "type": "text/html" + }, + { + "extension": { + "relation": "(gui-field =) definitions", + "catagory": "00", + "metaid": "urn:ssb:conceptvariable:vardok:007" + }, + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/007/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + } + + }, + "ContentsCode": { + "label": "contents", + "category": { + "index": { + "Sykefraversprosent": 0, + "SykefraversprosEndr": 1 + }, + "label": { + "Sykefraversprosent": "Sickness absence rate (doctor certified)", + "SykefraversprosEndr": "Sickness absence rate (doctor certified), per cent change last year" + }, + "unit": { + "Sykefraversprosent": { + "base": "per cent", + "decimals": 1 + }, + "SykefraversprosEndr": { + "base": "per cent", + "decimals": 1 + } + } + }, + "extension": { + "elimination": false, + "refperiod": { + "Sykefraversprosent": "Quarter", + "SykefraversprosEndr": "Quarter" + }, + "show": "value", + "measuringType": { + "Sykefraversprosent": "Average", + "SykefraversprosEndr": "Average" + }, + "priceType": { + "Sykefraversprosent": "NotApplicable", + "SykefraversprosEndr": "NotApplicable" + }, + "adjustment": { + "Sykefraversprosent": "None", + "SykefraversprosEndr": "None" + } + }, + "link": { + "describedby": [ + { + "extension": { + "Sykefraversprosent": "urn:ssb:conceptvariable:vardok:2236", + "SykefraversprosEndr": "urn:ssb:conceptvariable:vardok:2236" + } + } + ], + "related": [ + { + "extension": { + "relation": "(gui-field =) definitions", + "catagory": "Sykefraversprosent", + "metaid": "urn:ssb:conceptvariable:vardok:2236" + }, + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + }, + { + "extension": { + "relation": "(gui-field =) definitions", + "catagory": "SykefraversprosEndr", + "metaid": "urn:ssb:conceptvariable:vardok:2236" + }, + "href": "https://www.ssb.no/a/metadata/conceptvariable/vardok/2236/en", + "label": "Definition of valueLabel for vaiable variableLabel.", + "type": "text/html" + } + ] + } + }, + "Tid": { + "label": "quarter", + "category": { + "index": { + "2024K4": 0 + }, + "label": { + "2024K4": "2024K4" + } + }, + "extension": { + "elimination": false, + "show": "code" + } + } + }, + "link": { + "related": [ + { + "extension": { + "relation": "(gui-field =) statistics-homepage (sort of a IANA subclass)", + "metaid": "STATISTICS:sykefratot" + }, + "href": "https://www.ssb.no/en/sykefratot", + "label": "Statistics homepage", + "type": "text/html" + }, + { + "extension": { + "relation": "(gui-field =) about-statistics", + "metaid": "STATISTICS:sykefratot" + }, + "href": "https://www.ssb.no/en/sykefratot#om-statistikken", + "label": "About the statistics", + "type": "text/html" + } + ] + }, + "extension": { + "px": { + "infofile": "None", + "tableid": "12909", + "decimals": 1, + "official-statistics": false, + "aggregallowed": false, + "copyright": false, + "language": "en", + "contents": "12909: Doctor certified sickness absence for employees (per cent),", + "descriptiondefault": false, + "heading": [ + "ContentsCode", + "Tid" + ], + "stub": [ + "Yrke", + "LandBakgr" + ], + "matrix": "Sykefraversprosent", + "subject-code": "al", + "subject-area": "Labour market and earnings", + "discontinued": null, + "contact": [ + { + "name": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77", + "organization": "", + "phone": "", + "mail": "", + "raw": "Unn H. Høydahl, Statistics Norway +47 40 90 23 77, #uhh@ssb.no " + }, + { + "name": " Arbeidsmarked, Statistics Norway +47 62 88 50 00", + "organization": "", + "phone": "", + "mail": "", + "raw": "# Arbeidsmarked, Statistics Norway +47 62 88 50 00, #arbeidsmarked@ssb.no " + }, + { + "name": "Stine Bakke, Statistics Norway +47 91 52 62 51", + "organization": "", + "phone": "", + "mail": "", + "raw": "#Stine Bakke, Statistics Norway +47 91 52 62 51, #eba@ssb.no " + } + ] + }, + "value": [ + 4.9, + -2.6, + 4.2, + 3.7, + 4.8, + -2.5, + 5, + -2.5 + ] + } diff --git a/src/PxWeb.Api2.Server.Models/ExtensionRootPx.cs b/src/PxWeb.Api2.Server.Models/ExtensionRootPx.cs index 16585d0..7a93cb5 100644 --- a/src/PxWeb.Api2.Server.Models/ExtensionRootPx.cs +++ b/src/PxWeb.Api2.Server.Models/ExtensionRootPx.cs @@ -160,6 +160,13 @@ public class ExtensionRootPx : IEquatable [DataMember(Name="updateFrequency", EmitDefaultValue=false)] public string? UpdateFrequency { get; set; } + /// + /// Dictionary where key is metadata-type (e.g statistics-homepage, about-statistics, definitions ) and value is an MetaLinkValue object. + /// + /// Dictionary where key is metadata-type (e.g statistics-homepage, about-statistics, definitions ) and value is an MetaLinkValue object. + [DataMember(Name="metaid-links", EmitDefaultValue=false)] + public Dictionary MetaidLinks { get; set; } + /// /// Returns the string presentation of the object /// @@ -187,6 +194,7 @@ public override string ToString() sb.Append(" Survey: ").Append(Survey).Append("\n"); sb.Append(" Link: ").Append(Link).Append("\n"); sb.Append(" UpdateFrequency: ").Append(UpdateFrequency).Append("\n"); + sb.Append(" MetaidLinks: ").Append(MetaidLinks).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -319,6 +327,12 @@ public bool Equals(ExtensionRootPx other) UpdateFrequency == other.UpdateFrequency || UpdateFrequency != null && UpdateFrequency.Equals(other.UpdateFrequency) + ) && + ( + MetaidLinks == other.MetaidLinks || + MetaidLinks != null && + other.MetaidLinks != null && + MetaidLinks.SequenceEqual(other.MetaidLinks) ); } @@ -370,6 +384,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + Link.GetHashCode(); if (UpdateFrequency != null) hashCode = hashCode * 59 + UpdateFrequency.GetHashCode(); + if (MetaidLinks != null) + hashCode = hashCode * 59 + MetaidLinks.GetHashCode(); return hashCode; } } diff --git a/src/PxWeb.Api2.Server.Models/MetaidDimentionEntry.cs b/src/PxWeb.Api2.Server.Models/MetaidDimentionEntry.cs new file mode 100644 index 0000000..c13a9c0 --- /dev/null +++ b/src/PxWeb.Api2.Server.Models/MetaidDimentionEntry.cs @@ -0,0 +1,137 @@ +/* + * PxApi + * + * This api lets you: Find a table and extract table metadata and data. + * + * The version of the OpenAPI document: 2.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using PxWeb.Api2.Server.Converters; + +namespace PxWeb.Api2.Server.Models +{ + /// + /// Holds links for a dimention and or category. + /// + [DataContract] + public class MetaidDimentionEntry : IEquatable + { + /// + /// Array of metaid-link. + /// + /// Array of metaid-link. + [DataMember(Name="dimension-links", EmitDefaultValue=false)] + public List DimensionLinks { get; set; } + + /// + /// Dictionary where key is a category-code and value is a array of metaid-link. + /// + /// Dictionary where key is a category-code and value is a array of metaid-link. + [DataMember(Name="category-links", EmitDefaultValue=false)] + public Dictionary> CategoryLinks { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MetaidDimentionEntry {\n"); + sb.Append(" DimensionLinks: ").Append(DimensionLinks).Append("\n"); + sb.Append(" CategoryLinks: ").Append(CategoryLinks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((MetaidDimentionEntry)obj); + } + + /// + /// Returns true if MetaidDimentionEntry instances are equal + /// + /// Instance of MetaidDimentionEntry to be compared + /// Boolean + public bool Equals(MetaidDimentionEntry other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + DimensionLinks == other.DimensionLinks || + DimensionLinks != null && + other.DimensionLinks != null && + DimensionLinks.SequenceEqual(other.DimensionLinks) + ) && + ( + CategoryLinks == other.CategoryLinks || + CategoryLinks != null && + other.CategoryLinks != null && + CategoryLinks.SequenceEqual(other.CategoryLinks) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (DimensionLinks != null) + hashCode = hashCode * 59 + DimensionLinks.GetHashCode(); + if (CategoryLinks != null) + hashCode = hashCode * 59 + CategoryLinks.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(MetaidDimentionEntry left, MetaidDimentionEntry right) + { + return Equals(left, right); + } + + public static bool operator !=(MetaidDimentionEntry left, MetaidDimentionEntry right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/src/PxWeb.Api2.Server.Models/MetaidLink.cs b/src/PxWeb.Api2.Server.Models/MetaidLink.cs new file mode 100644 index 0000000..e702836 --- /dev/null +++ b/src/PxWeb.Api2.Server.Models/MetaidLink.cs @@ -0,0 +1,169 @@ +/* + * PxApi + * + * This api lets you: Find a table and extract table metadata and data. + * + * The version of the OpenAPI document: 2.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using PxWeb.Api2.Server.Converters; + +namespace PxWeb.Api2.Server.Models +{ + /// + /// Represents a single MetaID link. + /// + [DataContract] + public class MetaidLink : IEquatable + { + /// + /// Source Meta ID for this link + /// + /// Source Meta ID for this link + [Required] + [DataMember(Name="metaid", EmitDefaultValue=false)] + public string Metaid { get; set; } + + /// + /// URL link + /// + /// URL link + [Required] + [DataMember(Name="href", EmitDefaultValue=false)] + public string Href { get; set; } + + /// + /// Label for the link + /// + /// Label for the link + [Required] + [DataMember(Name="label", EmitDefaultValue=false)] + public string Label { get; set; } + + /// + /// Type of the link, like text/htm + /// + /// Type of the link, like text/htm + [Required] + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MetaidLink {\n"); + sb.Append(" Metaid: ").Append(Metaid).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append(" Label: ").Append(Label).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((MetaidLink)obj); + } + + /// + /// Returns true if MetaidLink instances are equal + /// + /// Instance of MetaidLink to be compared + /// Boolean + public bool Equals(MetaidLink other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Metaid == other.Metaid || + Metaid != null && + Metaid.Equals(other.Metaid) + ) && + ( + Href == other.Href || + Href != null && + Href.Equals(other.Href) + ) && + ( + Label == other.Label || + Label != null && + Label.Equals(other.Label) + ) && + ( + Type == other.Type || + Type != null && + Type.Equals(other.Type) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (Metaid != null) + hashCode = hashCode * 59 + Metaid.GetHashCode(); + if (Href != null) + hashCode = hashCode * 59 + Href.GetHashCode(); + if (Label != null) + hashCode = hashCode * 59 + Label.GetHashCode(); + if (Type != null) + hashCode = hashCode * 59 + Type.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(MetaidLink left, MetaidLink right) + { + return Equals(left, right); + } + + public static bool operator !=(MetaidLink left, MetaidLink right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/src/PxWeb.Api2.Server.Models/MetaidLinksValue.cs b/src/PxWeb.Api2.Server.Models/MetaidLinksValue.cs new file mode 100644 index 0000000..186fae1 --- /dev/null +++ b/src/PxWeb.Api2.Server.Models/MetaidLinksValue.cs @@ -0,0 +1,137 @@ +/* + * PxApi + * + * This api lets you: Find a table and extract table metadata and data. + * + * The version of the OpenAPI document: 2.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using PxWeb.Api2.Server.Converters; + +namespace PxWeb.Api2.Server.Models +{ + /// + /// + /// + [DataContract] + public class MetaidLinksValue : IEquatable + { + /// + /// Array of metaid-link. + /// + /// Array of metaid-link. + [DataMember(Name="dataset-links", EmitDefaultValue=false)] + public List DatasetLinks { get; set; } + + /// + /// Dictionary where key is a dimention-code and value is a MetaidDimentionEntry object . + /// + /// Dictionary where key is a dimention-code and value is a MetaidDimentionEntry object . + [DataMember(Name="dimention-entries", EmitDefaultValue=false)] + public Dictionary DimentionEntries { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MetaidLinksValue {\n"); + sb.Append(" DatasetLinks: ").Append(DatasetLinks).Append("\n"); + sb.Append(" DimentionEntries: ").Append(DimentionEntries).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((MetaidLinksValue)obj); + } + + /// + /// Returns true if MetaidLinksValue instances are equal + /// + /// Instance of MetaidLinksValue to be compared + /// Boolean + public bool Equals(MetaidLinksValue other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + DatasetLinks == other.DatasetLinks || + DatasetLinks != null && + other.DatasetLinks != null && + DatasetLinks.SequenceEqual(other.DatasetLinks) + ) && + ( + DimentionEntries == other.DimentionEntries || + DimentionEntries != null && + other.DimentionEntries != null && + DimentionEntries.SequenceEqual(other.DimentionEntries) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + if (DatasetLinks != null) + hashCode = hashCode * 59 + DatasetLinks.GetHashCode(); + if (DimentionEntries != null) + hashCode = hashCode * 59 + DimentionEntries.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(MetaidLinksValue left, MetaidLinksValue right) + { + return Equals(left, right); + } + + public static bool operator !=(MetaidLinksValue left, MetaidLinksValue right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +}