Skip to content

Commit 4c3b1b9

Browse files
author
Shruti Wasnik
committed
add data plane typespec for sustainability services
1 parent 12492ed commit 4c3b1b9

File tree

49 files changed

+4801
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4801
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
import "./main.tsp";
3+
4+
using Azure.ClientGenerator.Core;
5+
6+
namespace Microsoft.SustainabilityServices;
7+
8+
@client({
9+
name: "SustainabilityServiceClient",
10+
service: Microsoft.SustainabilityServices,
11+
})
12+
interface SustainabilityServiceClient {
13+
@clientName("ListFactorLibraries", "csharp")
14+
@clientName("list_factor_libraries", "python")
15+
listFactorLibraries is SustainabilityService.listFactorLibraries;
16+
17+
@clientName("GetFactorLibrary", "csharp")
18+
@clientName("get_factor_library", "python")
19+
getFactorLibrary is SustainabilityService.getFactorLibrary;
20+
21+
@clientName("ListEstimationFactorsByFactorLibrary", "csharp")
22+
@clientName("list_estimation_factors_by_factor_library", "python")
23+
listEstimationFactorsByFactorLibrary is SustainabilityService.listEstimationFactorsByFactorLibrary;
24+
25+
@clientName("GetEstimationFactor", "csharp")
26+
@clientName("get_estimation_factor", "python")
27+
getEstimationFactor is SustainabilityService.getEstimationFactor;
28+
29+
@clientName("ListEmissionFactorsByFactorLibrary", "csharp")
30+
@clientName("list_emission_factors_by_factor_library", "python")
31+
listEmissionFactorsByFactorLibrary is SustainabilityService.listEmissionFactorsByFactorLibrary;
32+
33+
@clientName("GetEmissionFactor", "csharp")
34+
@clientName("get_emission_factor", "python")
35+
getEmissionFactor is SustainabilityService.getEmissionFactor;
36+
37+
@clientName("ListFactorMappings", "csharp")
38+
@clientName("list_factor_mappings", "python")
39+
listFactorMappings is SustainabilityService.listFactorMappings;
40+
41+
@clientName("GetFactorMapping", "csharp")
42+
@clientName("get_factor_mapping", "python")
43+
getFactorMapping is SustainabilityService.getFactorMapping;
44+
45+
@clientName("ListCalculationModels", "csharp")
46+
@clientName("list_calculation_models", "python")
47+
listCalculationModels is SustainabilityService.listCalculationModels;
48+
49+
@clientName("GetCalculationModel", "csharp")
50+
@clientName("get_calculation_model", "python")
51+
getCalculationModel is SustainabilityService.getCalculationModel;
52+
53+
@clientName("ListReferenceEntities", "csharp")
54+
@clientName("list_reference_entities", "python")
55+
listReferenceEntities is SustainabilityService.listReferenceEntities;
56+
57+
@clientName("ListReferenceEntityData", "csharp")
58+
@clientName("list_reference_entity_data", "python")
59+
listReferenceEntityRecords is SustainabilityService.listReferenceEntityRecords;
60+
61+
@clientName("GetReferenceEntityData", "csharp")
62+
@clientName("get_reference_entity_data", "python")
63+
getReferenceEntityRecords is SustainabilityService.getReferenceEntityRecord;
64+
65+
@clientName("Calculate", "csharp")
66+
calculate is SustainabilityService.calculateEmissions;
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"title": "SustainabilityService_CalculateEmissions_MaximumSet",
3+
"operationId": "SustainabilityService_CalculateEmissions",
4+
"parameters": {
5+
"api-version": "2025-01-01-preview",
6+
"body": {
7+
"timeStamp": "2025-03-05T07:25:40.609Z",
8+
"calculationModelId": "b7baa418-08be-430b-ae46-769cfdf91949",
9+
"arVersion": "Custom",
10+
"activities": [
11+
{
12+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
13+
"activityData": {}
14+
}
15+
]
16+
}
17+
},
18+
"responses": {
19+
"200": {
20+
"body": {
21+
"summary": {
22+
"status": "Succeeded",
23+
"successfulActivities": 6,
24+
"failedActivities": 12,
25+
"excludedActivities": 1,
26+
"processedActivities": 9
27+
},
28+
"errorDetails": [
29+
{
30+
"activityId": "b7baa418-08be-430b-ae46-769cfdf91949",
31+
"activityName": "agxovdvljfxgsxvtyf",
32+
"message": "wgyz",
33+
"code": "liryrrxbbgxkavfmjfcwjtrjluqg"
34+
}
35+
],
36+
"activityEmissionOutput": [
37+
{
38+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
39+
"emissions": [
40+
{
41+
"ch4": 9,
42+
"ch4Unit": "tbdfmm",
43+
"co2": 17,
44+
"co2Unit": "gnxxtgszgon",
45+
"co2e": 5,
46+
"co2eUnit": "owepcjpaoxlmkpstpofkcjwg",
47+
"co2emt": 27,
48+
"hfcs": 17,
49+
"hfcsUnit": "lrnesztablxhxymmusywxswgpxpx",
50+
"n2o": 11,
51+
"n2oUnit": "fczxflvwikmymdfttjfwhvenwz",
52+
"nf3": 1,
53+
"nf3Unit": "xctbgnnxeqiijmjmsocfvqxds",
54+
"pfcs": 5,
55+
"pfcsUnit": "vbdvqpbxrxovj",
56+
"otherGhgs": 1,
57+
"otherGhgsUnit": "nnghkaxryvazxcnkfgqikrggwfzb",
58+
"sf6": 11,
59+
"sf6Unit": "djgebfbyzjgfxslhhmvipd",
60+
"isMarketBased": true,
61+
"isBiogenic": true,
62+
"emissionCalculationModel": "rf",
63+
"calculationLibrary": "xcoypozdrjrgqyyrfotonpkobua",
64+
"emissionFactor": "shfuzrdkggeabfwxpj",
65+
"adjustedActualQuantity": "nmeqfk",
66+
"adjustedActualQuantityUnit": "wpcobpvcffibmmmvrqwolvdpgoijl"
67+
}
68+
]
69+
}
70+
]
71+
}
72+
}
73+
}
74+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"title": "SustainabilityService_CalculateEmissions_MinimumSet",
3+
"operationId": "SustainabilityService_CalculateEmissions",
4+
"parameters": {
5+
"api-version": "2025-01-01-preview",
6+
"body": {
7+
"calculationModelId": "b7baa418-08be-430b-ae46-769cfdf91949",
8+
"activities": [
9+
{
10+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
11+
"activityData": {}
12+
}
13+
]
14+
}
15+
},
16+
"responses": {
17+
"200": {
18+
"body": {
19+
"summary": {
20+
"status": "Succeeded",
21+
"successfulActivities": 6,
22+
"failedActivities": 12,
23+
"excludedActivities": 1,
24+
"processedActivities": 9
25+
},
26+
"errorDetails": [
27+
{
28+
"activityId": "b7baa418-08be-430b-ae46-769cfdf91949",
29+
"activityName": "agxovdvljfxgsxvtyf",
30+
"message": "wgyz",
31+
"code": "liryrrxbbgxkavfmjfcwjtrjluqg"
32+
}
33+
],
34+
"activityEmissionOutput": [
35+
{
36+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
37+
"emissions": [
38+
{}
39+
]
40+
}
41+
]
42+
}
43+
}
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"title": "SustainabilityService_GetCalculationModel_MaximumSet",
3+
"operationId": "SustainabilityService_GetCalculationModel",
4+
"parameters": {
5+
"api-version": "2025-01-01-preview",
6+
"calculationModelId": "b7baa418-08be-430b-ae46-769cfdf91949"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"entityName": "mrgyzzhuyw",
12+
"calculationModelId": "b7baa418-08be-430b-ae46-769cfdf91949",
13+
"calculationFlowJson": "g",
14+
"calculationMethod": "vssewtlgtulccramolznv",
15+
"dataDefinitionId": {
16+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
17+
"logicalName": "pbmfspnnuunedveu",
18+
"name": "qggwqivyfidlfquwibds",
19+
"keyAttributes": {},
20+
"rowVersion": "mjopupgolatxymbilffp"
21+
},
22+
"documentationReference": "xpblerxeeftidqjyvtcmilzgvhktz",
23+
"emissionCalculationId": "b7baa418-08be-430b-ae46-769cfdf91949",
24+
"emissionSource": {
25+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
26+
"logicalName": "pbmfspnnuunedveu",
27+
"name": "qggwqivyfidlfquwibds",
28+
"keyAttributes": {},
29+
"rowVersion": "mjopupgolatxymbilffp"
30+
},
31+
"modelJsonVersion": "nr",
32+
"name": "guftftnectufbgwipbhhecaqsiyqm",
33+
"sustainabilitymodule": {
34+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
35+
"logicalName": "pbmfspnnuunedveu",
36+
"name": "qggwqivyfidlfquwibds",
37+
"keyAttributes": {},
38+
"rowVersion": "mjopupgolatxymbilffp"
39+
},
40+
"type": "pwrdfsnaqq"
41+
}
42+
}
43+
}
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"title": "SustainabilityService_GetEmissionFactor_MaximumSet",
3+
"operationId": "SustainabilityService_GetEmissionFactor",
4+
"parameters": {
5+
"api-version": "2025-01-01-preview",
6+
"factorLibraryId": "b7baa418-08be-430b-ae46-769cfdf91949",
7+
"emissionFactorId": "b7baa418-08be-430b-ae46-769cfdf91949"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"entityName": "mhysdemejmnlrixkibxbdpulaclivw",
13+
"factorLibrary": {
14+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
15+
"logicalName": "pbmfspnnuunedveu",
16+
"name": "qggwqivyfidlfquwibds",
17+
"keyAttributes": {},
18+
"rowVersion": "mjopupgolatxymbilffp"
19+
},
20+
"ch4": 15,
21+
"ch4Unit": {
22+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
23+
"logicalName": "pbmfspnnuunedveu",
24+
"name": "qggwqivyfidlfquwibds",
25+
"keyAttributes": {},
26+
"rowVersion": "mjopupgolatxymbilffp"
27+
},
28+
"co2": 12,
29+
"co2Unit": {
30+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
31+
"logicalName": "pbmfspnnuunedveu",
32+
"name": "qggwqivyfidlfquwibds",
33+
"keyAttributes": {},
34+
"rowVersion": "mjopupgolatxymbilffp"
35+
},
36+
"co2e": 1,
37+
"co2eUnit": {
38+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
39+
"logicalName": "pbmfspnnuunedveu",
40+
"name": "qggwqivyfidlfquwibds",
41+
"keyAttributes": {},
42+
"rowVersion": "mjopupgolatxymbilffp"
43+
},
44+
"documentationReference": "tjvhdxkfzubx",
45+
"emissionFactorId": "b7baa418-08be-430b-ae46-769cfdf91949",
46+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
47+
"hfcs": 11,
48+
"hfcsUnit": {
49+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
50+
"logicalName": "pbmfspnnuunedveu",
51+
"name": "qggwqivyfidlfquwibds",
52+
"keyAttributes": {},
53+
"rowVersion": "mjopupgolatxymbilffp"
54+
},
55+
"isBiofuel": true,
56+
"name": "jprosbghrgieuoltgmecmdysjj",
57+
"nf3": 22,
58+
"nf3Unit": {
59+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
60+
"logicalName": "pbmfspnnuunedveu",
61+
"name": "qggwqivyfidlfquwibds",
62+
"keyAttributes": {},
63+
"rowVersion": "mjopupgolatxymbilffp"
64+
},
65+
"n2o": 12,
66+
"n2oUnit": {
67+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
68+
"logicalName": "pbmfspnnuunedveu",
69+
"name": "qggwqivyfidlfquwibds",
70+
"keyAttributes": {},
71+
"rowVersion": "mjopupgolatxymbilffp"
72+
},
73+
"otherGhgs": 25,
74+
"otherGhgsUnit": {
75+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
76+
"logicalName": "pbmfspnnuunedveu",
77+
"name": "qggwqivyfidlfquwibds",
78+
"keyAttributes": {},
79+
"rowVersion": "mjopupgolatxymbilffp"
80+
},
81+
"pfcs": 24,
82+
"pfcsUnit": {
83+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
84+
"logicalName": "pbmfspnnuunedveu",
85+
"name": "qggwqivyfidlfquwibds",
86+
"keyAttributes": {},
87+
"rowVersion": "mjopupgolatxymbilffp"
88+
},
89+
"sf6": 8,
90+
"sf6Unit": {
91+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
92+
"logicalName": "pbmfspnnuunedveu",
93+
"name": "qggwqivyfidlfquwibds",
94+
"keyAttributes": {},
95+
"rowVersion": "mjopupgolatxymbilffp"
96+
},
97+
"subtype": "oaslhlpcquf",
98+
"type": "wtihrlbbaftknflb",
99+
"unit": {
100+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
101+
"logicalName": "pbmfspnnuunedveu",
102+
"name": "qggwqivyfidlfquwibds",
103+
"keyAttributes": {},
104+
"rowVersion": "mjopupgolatxymbilffp"
105+
}
106+
}
107+
}
108+
}
109+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"title": "SustainabilityService_GetEstimationFactor_MaximumSet",
3+
"operationId": "SustainabilityService_GetEstimationFactor",
4+
"parameters": {
5+
"api-version": "2025-01-01-preview",
6+
"factorLibraryId": "b7baa418-08be-430b-ae46-769cfdf91949",
7+
"estimationFactorId": "b7baa418-08be-430b-ae46-769cfdf91949"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"entityName": "dxp",
13+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
14+
"documentationReference": "mpzznkdybhkf",
15+
"estimationFactorId": "b7baa418-08be-430b-ae46-769cfdf91949",
16+
"factorLibrary": {
17+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
18+
"logicalName": "pbmfspnnuunedveu",
19+
"name": "qggwqivyfidlfquwibds",
20+
"keyAttributes": {},
21+
"rowVersion": "mjopupgolatxymbilffp"
22+
},
23+
"factorValue": 19,
24+
"factorValueUnit": {
25+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
26+
"logicalName": "pbmfspnnuunedveu",
27+
"name": "qggwqivyfidlfquwibds",
28+
"keyAttributes": {},
29+
"rowVersion": "mjopupgolatxymbilffp"
30+
},
31+
"name": "yribs",
32+
"subtype": "opuhkswrndvdihbnxj",
33+
"type": "oaijjfbo",
34+
"unit": {
35+
"id": "b7baa418-08be-430b-ae46-769cfdf91949",
36+
"logicalName": "pbmfspnnuunedveu",
37+
"name": "qggwqivyfidlfquwibds",
38+
"keyAttributes": {},
39+
"rowVersion": "mjopupgolatxymbilffp"
40+
}
41+
}
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)