@azure/arm-cloudhealth 1.0.0-alpha.20250701.1 → 1.0.0-alpha.20250723.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/api/authenticationSettings/operations.js +34 -12
- package/dist/browser/api/authenticationSettings/operations.js.map +1 -1
- package/dist/browser/api/cloudHealthContext.js +12 -9
- package/dist/browser/api/cloudHealthContext.js.map +1 -1
- package/dist/browser/api/discoveryRules/operations.js +35 -13
- package/dist/browser/api/discoveryRules/operations.js.map +1 -1
- package/dist/browser/api/entities/operations.js +35 -13
- package/dist/browser/api/entities/operations.js.map +1 -1
- package/dist/browser/api/healthModels/operations.js +58 -24
- package/dist/browser/api/healthModels/operations.js.map +1 -1
- package/dist/browser/api/operations/operations.js +8 -3
- package/dist/browser/api/operations/operations.js.map +1 -1
- package/dist/browser/api/relationships/operations.js +35 -13
- package/dist/browser/api/relationships/operations.js.map +1 -1
- package/dist/browser/api/signalDefinitions/operations.js +35 -13
- package/dist/browser/api/signalDefinitions/operations.js.map +1 -1
- package/dist/browser/classic/authenticationSettings/index.js +3 -1
- package/dist/browser/classic/authenticationSettings/index.js.map +1 -1
- package/dist/browser/classic/discoveryRules/index.js +3 -1
- package/dist/browser/classic/discoveryRules/index.js.map +1 -1
- package/dist/browser/classic/entities/index.js +3 -1
- package/dist/browser/classic/entities/index.js.map +1 -1
- package/dist/browser/classic/healthModels/index.js +3 -1
- package/dist/browser/classic/healthModels/index.js.map +1 -1
- package/dist/browser/classic/operations/index.js +3 -1
- package/dist/browser/classic/operations/index.js.map +1 -1
- package/dist/browser/classic/relationships/index.js +3 -1
- package/dist/browser/classic/relationships/index.js.map +1 -1
- package/dist/browser/classic/signalDefinitions/index.js +3 -1
- package/dist/browser/classic/signalDefinitions/index.js.map +1 -1
- package/dist/browser/cloudHealthClient.js +22 -3
- package/dist/browser/cloudHealthClient.js.map +1 -1
- package/dist/browser/restorePollerHelpers.js +11 -13
- package/dist/browser/restorePollerHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pagingHelpers.js +31 -50
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pollingHelpers.js +14 -11
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/urlTemplate.js +2 -2
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/api/authenticationSettings/operations.js +34 -12
- package/dist/commonjs/api/authenticationSettings/operations.js.map +1 -1
- package/dist/commonjs/api/cloudHealthContext.js +12 -9
- package/dist/commonjs/api/cloudHealthContext.js.map +1 -1
- package/dist/commonjs/api/discoveryRules/operations.js +35 -13
- package/dist/commonjs/api/discoveryRules/operations.js.map +1 -1
- package/dist/commonjs/api/entities/operations.js +35 -13
- package/dist/commonjs/api/entities/operations.js.map +1 -1
- package/dist/commonjs/api/healthModels/operations.js +58 -24
- package/dist/commonjs/api/healthModels/operations.js.map +1 -1
- package/dist/commonjs/api/operations/operations.js +8 -3
- package/dist/commonjs/api/operations/operations.js.map +1 -1
- package/dist/commonjs/api/relationships/operations.js +35 -13
- package/dist/commonjs/api/relationships/operations.js.map +1 -1
- package/dist/commonjs/api/signalDefinitions/operations.js +35 -13
- package/dist/commonjs/api/signalDefinitions/operations.js.map +1 -1
- package/dist/commonjs/classic/authenticationSettings/index.js +3 -1
- package/dist/commonjs/classic/authenticationSettings/index.js.map +1 -1
- package/dist/commonjs/classic/discoveryRules/index.js +3 -1
- package/dist/commonjs/classic/discoveryRules/index.js.map +1 -1
- package/dist/commonjs/classic/entities/index.js +3 -1
- package/dist/commonjs/classic/entities/index.js.map +1 -1
- package/dist/commonjs/classic/healthModels/index.js +3 -1
- package/dist/commonjs/classic/healthModels/index.js.map +1 -1
- package/dist/commonjs/classic/operations/index.js +3 -1
- package/dist/commonjs/classic/operations/index.js.map +1 -1
- package/dist/commonjs/classic/relationships/index.js +3 -1
- package/dist/commonjs/classic/relationships/index.js.map +1 -1
- package/dist/commonjs/classic/signalDefinitions/index.js +3 -1
- package/dist/commonjs/classic/signalDefinitions/index.js.map +1 -1
- package/dist/commonjs/cloudHealthClient.js +22 -3
- package/dist/commonjs/cloudHealthClient.js.map +1 -1
- package/dist/commonjs/restorePollerHelpers.js +11 -13
- package/dist/commonjs/restorePollerHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.js +31 -50
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/pollingHelpers.js +14 -11
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/urlTemplate.js +2 -2
- package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
- package/dist/esm/api/authenticationSettings/operations.js +34 -12
- package/dist/esm/api/authenticationSettings/operations.js.map +1 -1
- package/dist/esm/api/cloudHealthContext.js +12 -9
- package/dist/esm/api/cloudHealthContext.js.map +1 -1
- package/dist/esm/api/discoveryRules/operations.js +35 -13
- package/dist/esm/api/discoveryRules/operations.js.map +1 -1
- package/dist/esm/api/entities/operations.js +35 -13
- package/dist/esm/api/entities/operations.js.map +1 -1
- package/dist/esm/api/healthModels/operations.js +58 -24
- package/dist/esm/api/healthModels/operations.js.map +1 -1
- package/dist/esm/api/operations/operations.js +8 -3
- package/dist/esm/api/operations/operations.js.map +1 -1
- package/dist/esm/api/relationships/operations.js +35 -13
- package/dist/esm/api/relationships/operations.js.map +1 -1
- package/dist/esm/api/signalDefinitions/operations.js +35 -13
- package/dist/esm/api/signalDefinitions/operations.js.map +1 -1
- package/dist/esm/classic/authenticationSettings/index.js +3 -1
- package/dist/esm/classic/authenticationSettings/index.js.map +1 -1
- package/dist/esm/classic/discoveryRules/index.js +3 -1
- package/dist/esm/classic/discoveryRules/index.js.map +1 -1
- package/dist/esm/classic/entities/index.js +3 -1
- package/dist/esm/classic/entities/index.js.map +1 -1
- package/dist/esm/classic/healthModels/index.js +3 -1
- package/dist/esm/classic/healthModels/index.js.map +1 -1
- package/dist/esm/classic/operations/index.js +3 -1
- package/dist/esm/classic/operations/index.js.map +1 -1
- package/dist/esm/classic/relationships/index.js +3 -1
- package/dist/esm/classic/relationships/index.js.map +1 -1
- package/dist/esm/classic/signalDefinitions/index.js +3 -1
- package/dist/esm/classic/signalDefinitions/index.js.map +1 -1
- package/dist/esm/cloudHealthClient.js +22 -3
- package/dist/esm/cloudHealthClient.js.map +1 -1
- package/dist/esm/restorePollerHelpers.js +11 -13
- package/dist/esm/restorePollerHelpers.js.map +1 -1
- package/dist/esm/static-helpers/pagingHelpers.js +31 -50
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/esm/static-helpers/pollingHelpers.js +14 -11
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/esm/static-helpers/urlTemplate.js +2 -2
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
- package/dist/react-native/api/authenticationSettings/operations.js +34 -12
- package/dist/react-native/api/authenticationSettings/operations.js.map +1 -1
- package/dist/react-native/api/cloudHealthContext.js +12 -9
- package/dist/react-native/api/cloudHealthContext.js.map +1 -1
- package/dist/react-native/api/discoveryRules/operations.js +35 -13
- package/dist/react-native/api/discoveryRules/operations.js.map +1 -1
- package/dist/react-native/api/entities/operations.js +35 -13
- package/dist/react-native/api/entities/operations.js.map +1 -1
- package/dist/react-native/api/healthModels/operations.js +58 -24
- package/dist/react-native/api/healthModels/operations.js.map +1 -1
- package/dist/react-native/api/operations/operations.js +8 -3
- package/dist/react-native/api/operations/operations.js.map +1 -1
- package/dist/react-native/api/relationships/operations.js +35 -13
- package/dist/react-native/api/relationships/operations.js.map +1 -1
- package/dist/react-native/api/signalDefinitions/operations.js +35 -13
- package/dist/react-native/api/signalDefinitions/operations.js.map +1 -1
- package/dist/react-native/classic/authenticationSettings/index.js +3 -1
- package/dist/react-native/classic/authenticationSettings/index.js.map +1 -1
- package/dist/react-native/classic/discoveryRules/index.js +3 -1
- package/dist/react-native/classic/discoveryRules/index.js.map +1 -1
- package/dist/react-native/classic/entities/index.js +3 -1
- package/dist/react-native/classic/entities/index.js.map +1 -1
- package/dist/react-native/classic/healthModels/index.js +3 -1
- package/dist/react-native/classic/healthModels/index.js.map +1 -1
- package/dist/react-native/classic/operations/index.js +3 -1
- package/dist/react-native/classic/operations/index.js.map +1 -1
- package/dist/react-native/classic/relationships/index.js +3 -1
- package/dist/react-native/classic/relationships/index.js.map +1 -1
- package/dist/react-native/classic/signalDefinitions/index.js +3 -1
- package/dist/react-native/classic/signalDefinitions/index.js.map +1 -1
- package/dist/react-native/cloudHealthClient.js +22 -3
- package/dist/react-native/cloudHealthClient.js.map +1 -1
- package/dist/react-native/restorePollerHelpers.js +11 -13
- package/dist/react-native/restorePollerHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.js +31 -50
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pollingHelpers.js +14 -11
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/urlTemplate.js +2 -2
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
- package/package.json +2 -2
- package/review/{arm-cloudhealth-api-authenticationSettings.api.md → arm-cloudhealth-api-authenticationSettings-node.api.md} +40 -40
- package/review/{arm-cloudhealth-api-discoveryRules.api.md → arm-cloudhealth-api-discoveryRules-node.api.md} +41 -41
- package/review/{arm-cloudhealth-api-entities.api.md → arm-cloudhealth-api-entities-node.api.md} +41 -41
- package/review/{arm-cloudhealth-api-healthModels.api.md → arm-cloudhealth-api-healthModels-node.api.md} +59 -59
- package/review/{arm-cloudhealth-api.api.md → arm-cloudhealth-api-node.api.md} +27 -27
- package/review/{arm-cloudhealth-api-operations.api.md → arm-cloudhealth-api-operations-node.api.md} +19 -19
- package/review/{arm-cloudhealth-api-relationships.api.md → arm-cloudhealth-api-relationships-node.api.md} +41 -41
- package/review/{arm-cloudhealth-api-signalDefinitions.api.md → arm-cloudhealth-api-signalDefinitions-node.api.md} +41 -41
- package/review/{arm-cloudhealth-models.api.md → arm-cloudhealth-models-node.api.md} +535 -535
- package/review/{arm-cloudhealth.api.md → arm-cloudhealth-node.api.md} +759 -759
|
@@ -21,17 +21,22 @@ const core_client_1 = require("@azure-rest/core-client");
|
|
|
21
21
|
function _listByHealthModelSend(context, resourceGroupName, healthModelName, options = {
|
|
22
22
|
requestOptions: {},
|
|
23
23
|
}) {
|
|
24
|
-
var _a, _b;
|
|
25
24
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules{?api%2Dversion,timestamp}", {
|
|
26
25
|
subscriptionId: context.subscriptionId,
|
|
27
26
|
resourceGroupName: resourceGroupName,
|
|
28
27
|
healthModelName: healthModelName,
|
|
29
28
|
"api%2Dversion": context.apiVersion,
|
|
30
|
-
timestamp: !
|
|
29
|
+
timestamp: !options?.timestamp ? options?.timestamp : options?.timestamp.toISOString(),
|
|
31
30
|
}, {
|
|
32
|
-
allowReserved:
|
|
31
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
32
|
+
});
|
|
33
|
+
return context.path(path).get({
|
|
34
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
35
|
+
headers: {
|
|
36
|
+
accept: "application/json",
|
|
37
|
+
...options.requestOptions?.headers,
|
|
38
|
+
},
|
|
33
39
|
});
|
|
34
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
35
40
|
}
|
|
36
41
|
async function _listByHealthModelDeserialize(result) {
|
|
37
42
|
const expectedStatuses = ["200"];
|
|
@@ -49,7 +54,6 @@ function listByHealthModel(context, resourceGroupName, healthModelName, options
|
|
|
49
54
|
return (0, pagingHelpers_js_1.buildPagedAsyncIterator)(context, () => _listByHealthModelSend(context, resourceGroupName, healthModelName, options), _listByHealthModelDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
50
55
|
}
|
|
51
56
|
function _$deleteSend(context, resourceGroupName, healthModelName, discoveryRuleName, options = { requestOptions: {} }) {
|
|
52
|
-
var _a, _b;
|
|
53
57
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}", {
|
|
54
58
|
subscriptionId: context.subscriptionId,
|
|
55
59
|
resourceGroupName: resourceGroupName,
|
|
@@ -57,9 +61,15 @@ function _$deleteSend(context, resourceGroupName, healthModelName, discoveryRule
|
|
|
57
61
|
discoveryRuleName: discoveryRuleName,
|
|
58
62
|
"api%2Dversion": context.apiVersion,
|
|
59
63
|
}, {
|
|
60
|
-
allowReserved:
|
|
64
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
65
|
+
});
|
|
66
|
+
return context.path(path).delete({
|
|
67
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
68
|
+
headers: {
|
|
69
|
+
accept: "application/json",
|
|
70
|
+
...options.requestOptions?.headers,
|
|
71
|
+
},
|
|
61
72
|
});
|
|
62
|
-
return context.path(path).delete(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
63
73
|
}
|
|
64
74
|
async function _$deleteDeserialize(result) {
|
|
65
75
|
const expectedStatuses = ["200", "204"];
|
|
@@ -81,7 +91,6 @@ async function $delete(context, resourceGroupName, healthModelName, discoveryRul
|
|
|
81
91
|
return _$deleteDeserialize(result);
|
|
82
92
|
}
|
|
83
93
|
function _createOrUpdateSend(context, resourceGroupName, healthModelName, discoveryRuleName, resource, options = { requestOptions: {} }) {
|
|
84
|
-
var _a, _b;
|
|
85
94
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}", {
|
|
86
95
|
subscriptionId: context.subscriptionId,
|
|
87
96
|
resourceGroupName: resourceGroupName,
|
|
@@ -89,9 +98,17 @@ function _createOrUpdateSend(context, resourceGroupName, healthModelName, discov
|
|
|
89
98
|
discoveryRuleName: discoveryRuleName,
|
|
90
99
|
"api%2Dversion": context.apiVersion,
|
|
91
100
|
}, {
|
|
92
|
-
allowReserved:
|
|
101
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
102
|
+
});
|
|
103
|
+
return context.path(path).put({
|
|
104
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
105
|
+
contentType: "application/json",
|
|
106
|
+
headers: {
|
|
107
|
+
accept: "application/json",
|
|
108
|
+
...options.requestOptions?.headers,
|
|
109
|
+
},
|
|
110
|
+
body: (0, models_js_1.discoveryRuleSerializer)(resource),
|
|
93
111
|
});
|
|
94
|
-
return context.path(path).put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.discoveryRuleSerializer)(resource) }));
|
|
95
112
|
}
|
|
96
113
|
async function _createOrUpdateDeserialize(result) {
|
|
97
114
|
const expectedStatuses = ["200", "201"];
|
|
@@ -108,7 +125,6 @@ async function createOrUpdate(context, resourceGroupName, healthModelName, disco
|
|
|
108
125
|
return _createOrUpdateDeserialize(result);
|
|
109
126
|
}
|
|
110
127
|
function _getSend(context, resourceGroupName, healthModelName, discoveryRuleName, options = { requestOptions: {} }) {
|
|
111
|
-
var _a, _b;
|
|
112
128
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}", {
|
|
113
129
|
subscriptionId: context.subscriptionId,
|
|
114
130
|
resourceGroupName: resourceGroupName,
|
|
@@ -116,9 +132,15 @@ function _getSend(context, resourceGroupName, healthModelName, discoveryRuleName
|
|
|
116
132
|
discoveryRuleName: discoveryRuleName,
|
|
117
133
|
"api%2Dversion": context.apiVersion,
|
|
118
134
|
}, {
|
|
119
|
-
allowReserved:
|
|
135
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
136
|
+
});
|
|
137
|
+
return context.path(path).get({
|
|
138
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
139
|
+
headers: {
|
|
140
|
+
accept: "application/json",
|
|
141
|
+
...options.requestOptions?.headers,
|
|
142
|
+
},
|
|
120
143
|
});
|
|
121
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
122
144
|
}
|
|
123
145
|
async function _getDeserialize(result) {
|
|
124
146
|
const expectedStatuses = ["200"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/discoveryRules/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6BlC,wDA4BC;AAED,sEAWC;AAGD,8CAeC;AAED,oCA2BC;AAED,kDASC;AAQD,0BAeC;AAED,kDA8BC;AAED,gEAWC;AAGD,wCAiBC;AAED,4BA2BC;AAED,0CASC;AAGD,kBAeC;AA/QD,sDAOgC;AAOhC,wEAAwE;AACxE,4EAG+C;AAC/C,yDAKiC;AAEjC,SAAgB,sBAAsB,CACpC,OAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,UAAyD;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,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,KAEpC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,MAA6B;IACjE,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,0BAA0B;AACnB,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,iBAAyB,EACzB,UAA2C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEjE,MAAM,MAAM,GAAG,MAAM,QAAQ,CAC3B,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,OAAO,CACR,CAAC;IACF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CloudHealthContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n DiscoveryRule,\n discoveryRuleSerializer,\n discoveryRuleDeserializer,\n _DiscoveryRuleListResult,\n _discoveryRuleListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n DiscoveryRulesListByHealthModelOptionalParams,\n DiscoveryRulesDeleteOptionalParams,\n DiscoveryRulesCreateOrUpdateOptionalParams,\n DiscoveryRulesGetOptionalParams,\n} from \"./options.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listByHealthModelSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: DiscoveryRulesListByHealthModelOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules{?api%2Dversion,timestamp}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n \"api%2Dversion\": context.apiVersion,\n timestamp: !options?.timestamp ? options?.timestamp : options?.timestamp.toISOString(),\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByHealthModelDeserialize(\n result: PathUncheckedResponse,\n): Promise<_DiscoveryRuleListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _discoveryRuleListResultDeserializer(result.body);\n}\n\n/** List DiscoveryRule resources by HealthModel */\nexport function listByHealthModel(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: DiscoveryRulesListByHealthModelOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<DiscoveryRule> {\n return buildPagedAsyncIterator(\n context,\n () => _listByHealthModelSend(context, resourceGroupName, healthModelName, options),\n _listByHealthModelDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n discoveryRuleName: discoveryRuleName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a DiscoveryRule */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport async function $delete(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(\n context,\n resourceGroupName,\n healthModelName,\n discoveryRuleName,\n options,\n );\n return _$deleteDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n resource: DiscoveryRule,\n options: DiscoveryRulesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n discoveryRuleName: discoveryRuleName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: discoveryRuleSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<DiscoveryRule> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return discoveryRuleDeserializer(result.body);\n}\n\n/** Create a DiscoveryRule */\nexport async function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n resource: DiscoveryRule,\n options: DiscoveryRulesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<DiscoveryRule> {\n const result = await _createOrUpdateSend(\n context,\n resourceGroupName,\n healthModelName,\n discoveryRuleName,\n resource,\n options,\n );\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n discoveryRuleName: discoveryRuleName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<DiscoveryRule> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return discoveryRuleDeserializer(result.body);\n}\n\n/** Get a DiscoveryRule */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesGetOptionalParams = { requestOptions: {} },\n): Promise<DiscoveryRule> {\n const result = await _getSend(\n context,\n resourceGroupName,\n healthModelName,\n discoveryRuleName,\n options,\n );\n return _getDeserialize(result);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/discoveryRules/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6BlC,wDA4BC;AAED,sEAWC;AAGD,8CAeC;AAED,oCA2BC;AAED,kDASC;AAQD,0BAeC;AAED,kDA8BC;AAED,gEAWC;AAGD,wCAiBC;AAED,4BA2BC;AAED,0CASC;AAGD,kBAeC;AA/QD,sDAOgC;AAOhC,wEAAwE;AACxE,4EAG+C;AAC/C,yDAKiC;AAEjC,SAAgB,sBAAsB,CACpC,OAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,UAAyD;IACvD,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,IAAI,GAAG,IAAA,kCAAiB,EAC5B,4KAA4K,EAC5K;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,iBAAiB,EAAE,iBAAiB;QACpC,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,OAAO,CAAC,UAAU;QACnC,SAAS,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,EAAE;KACvF,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EA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AAC;AAChD,CAAC;AAED,0BAA0B;AACnB,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,iBAAyB,EACzB,UAA2C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEjE,MAAM,MAAM,GAAG,MAAM,QAAQ,CAC3B,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,OAAO,CACR,CAAC;IACF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CloudHealthContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n DiscoveryRule,\n discoveryRuleSerializer,\n discoveryRuleDeserializer,\n _DiscoveryRuleListResult,\n _discoveryRuleListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n DiscoveryRulesListByHealthModelOptionalParams,\n DiscoveryRulesDeleteOptionalParams,\n DiscoveryRulesCreateOrUpdateOptionalParams,\n DiscoveryRulesGetOptionalParams,\n} from \"./options.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listByHealthModelSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: DiscoveryRulesListByHealthModelOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules{?api%2Dversion,timestamp}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n \"api%2Dversion\": context.apiVersion,\n timestamp: !options?.timestamp ? options?.timestamp : options?.timestamp.toISOString(),\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByHealthModelDeserialize(\n result: PathUncheckedResponse,\n): Promise<_DiscoveryRuleListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _discoveryRuleListResultDeserializer(result.body);\n}\n\n/** List DiscoveryRule resources by HealthModel */\nexport function listByHealthModel(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: DiscoveryRulesListByHealthModelOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<DiscoveryRule> {\n return buildPagedAsyncIterator(\n context,\n () => _listByHealthModelSend(context, resourceGroupName, healthModelName, options),\n _listByHealthModelDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n discoveryRuleName: discoveryRuleName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a DiscoveryRule */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport async function $delete(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(\n context,\n resourceGroupName,\n healthModelName,\n discoveryRuleName,\n options,\n );\n return _$deleteDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n resource: DiscoveryRule,\n options: DiscoveryRulesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n discoveryRuleName: discoveryRuleName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: discoveryRuleSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<DiscoveryRule> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return discoveryRuleDeserializer(result.body);\n}\n\n/** Create a DiscoveryRule */\nexport async function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n resource: DiscoveryRule,\n options: DiscoveryRulesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<DiscoveryRule> {\n const result = await _createOrUpdateSend(\n context,\n resourceGroupName,\n healthModelName,\n discoveryRuleName,\n resource,\n options,\n );\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n discoveryRuleName: discoveryRuleName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<DiscoveryRule> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return discoveryRuleDeserializer(result.body);\n}\n\n/** Get a DiscoveryRule */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n discoveryRuleName: string,\n options: DiscoveryRulesGetOptionalParams = { requestOptions: {} },\n): Promise<DiscoveryRule> {\n const result = await _getSend(\n context,\n resourceGroupName,\n healthModelName,\n discoveryRuleName,\n options,\n );\n return _getDeserialize(result);\n}\n"]}
|
|
@@ -19,17 +19,22 @@ const urlTemplate_js_1 = require("../../static-helpers/urlTemplate.js");
|
|
|
19
19
|
const pagingHelpers_js_1 = require("../../static-helpers/pagingHelpers.js");
|
|
20
20
|
const core_client_1 = require("@azure-rest/core-client");
|
|
21
21
|
function _listByHealthModelSend(context, resourceGroupName, healthModelName, options = { requestOptions: {} }) {
|
|
22
|
-
var _a, _b;
|
|
23
22
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities{?api%2Dversion,timestamp}", {
|
|
24
23
|
subscriptionId: context.subscriptionId,
|
|
25
24
|
resourceGroupName: resourceGroupName,
|
|
26
25
|
healthModelName: healthModelName,
|
|
27
26
|
"api%2Dversion": context.apiVersion,
|
|
28
|
-
timestamp: !
|
|
27
|
+
timestamp: !options?.timestamp ? options?.timestamp : options?.timestamp.toISOString(),
|
|
29
28
|
}, {
|
|
30
|
-
allowReserved:
|
|
29
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
30
|
+
});
|
|
31
|
+
return context.path(path).get({
|
|
32
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
33
|
+
headers: {
|
|
34
|
+
accept: "application/json",
|
|
35
|
+
...options.requestOptions?.headers,
|
|
36
|
+
},
|
|
31
37
|
});
|
|
32
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
33
38
|
}
|
|
34
39
|
async function _listByHealthModelDeserialize(result) {
|
|
35
40
|
const expectedStatuses = ["200"];
|
|
@@ -45,7 +50,6 @@ function listByHealthModel(context, resourceGroupName, healthModelName, options
|
|
|
45
50
|
return (0, pagingHelpers_js_1.buildPagedAsyncIterator)(context, () => _listByHealthModelSend(context, resourceGroupName, healthModelName, options), _listByHealthModelDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
46
51
|
}
|
|
47
52
|
function _$deleteSend(context, resourceGroupName, healthModelName, entityName, options = { requestOptions: {} }) {
|
|
48
|
-
var _a, _b;
|
|
49
53
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}", {
|
|
50
54
|
subscriptionId: context.subscriptionId,
|
|
51
55
|
resourceGroupName: resourceGroupName,
|
|
@@ -53,9 +57,15 @@ function _$deleteSend(context, resourceGroupName, healthModelName, entityName, o
|
|
|
53
57
|
entityName: entityName,
|
|
54
58
|
"api%2Dversion": context.apiVersion,
|
|
55
59
|
}, {
|
|
56
|
-
allowReserved:
|
|
60
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
61
|
+
});
|
|
62
|
+
return context.path(path).delete({
|
|
63
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
64
|
+
headers: {
|
|
65
|
+
accept: "application/json",
|
|
66
|
+
...options.requestOptions?.headers,
|
|
67
|
+
},
|
|
57
68
|
});
|
|
58
|
-
return context.path(path).delete(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
59
69
|
}
|
|
60
70
|
async function _$deleteDeserialize(result) {
|
|
61
71
|
const expectedStatuses = ["200", "204"];
|
|
@@ -77,7 +87,6 @@ async function $delete(context, resourceGroupName, healthModelName, entityName,
|
|
|
77
87
|
return _$deleteDeserialize(result);
|
|
78
88
|
}
|
|
79
89
|
function _createOrUpdateSend(context, resourceGroupName, healthModelName, entityName, resource, options = { requestOptions: {} }) {
|
|
80
|
-
var _a, _b;
|
|
81
90
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}", {
|
|
82
91
|
subscriptionId: context.subscriptionId,
|
|
83
92
|
resourceGroupName: resourceGroupName,
|
|
@@ -85,9 +94,17 @@ function _createOrUpdateSend(context, resourceGroupName, healthModelName, entity
|
|
|
85
94
|
entityName: entityName,
|
|
86
95
|
"api%2Dversion": context.apiVersion,
|
|
87
96
|
}, {
|
|
88
|
-
allowReserved:
|
|
97
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
98
|
+
});
|
|
99
|
+
return context.path(path).put({
|
|
100
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
101
|
+
contentType: "application/json",
|
|
102
|
+
headers: {
|
|
103
|
+
accept: "application/json",
|
|
104
|
+
...options.requestOptions?.headers,
|
|
105
|
+
},
|
|
106
|
+
body: (0, models_js_1.entitySerializer)(resource),
|
|
89
107
|
});
|
|
90
|
-
return context.path(path).put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.entitySerializer)(resource) }));
|
|
91
108
|
}
|
|
92
109
|
async function _createOrUpdateDeserialize(result) {
|
|
93
110
|
const expectedStatuses = ["200", "201"];
|
|
@@ -104,7 +121,6 @@ async function createOrUpdate(context, resourceGroupName, healthModelName, entit
|
|
|
104
121
|
return _createOrUpdateDeserialize(result);
|
|
105
122
|
}
|
|
106
123
|
function _getSend(context, resourceGroupName, healthModelName, entityName, options = { requestOptions: {} }) {
|
|
107
|
-
var _a, _b;
|
|
108
124
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}", {
|
|
109
125
|
subscriptionId: context.subscriptionId,
|
|
110
126
|
resourceGroupName: resourceGroupName,
|
|
@@ -112,9 +128,15 @@ function _getSend(context, resourceGroupName, healthModelName, entityName, optio
|
|
|
112
128
|
entityName: entityName,
|
|
113
129
|
"api%2Dversion": context.apiVersion,
|
|
114
130
|
}, {
|
|
115
|
-
allowReserved:
|
|
131
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
132
|
+
});
|
|
133
|
+
return context.path(path).get({
|
|
134
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
135
|
+
headers: {
|
|
136
|
+
accept: "application/json",
|
|
137
|
+
...options.requestOptions?.headers,
|
|
138
|
+
},
|
|
116
139
|
});
|
|
117
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
118
140
|
}
|
|
119
141
|
async function _getDeserialize(result) {
|
|
120
142
|
const expectedStatuses = ["200"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/entities/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6BlC,wDA0BC;AAED,sEAWC;AAGD,8CAaC;AAED,oCA2BC;AAED,kDASC;AAQD,0BAeC;AAED,kDA8BC;AAED,gEASC;AAGD,wCAiBC;AAED,4BA2BC;AAED,0CASC;AAGD,kBASC;AAnQD,sDAOgC;AAOhC,wEAAwE;AACxE,4EAG+C;AAC/C,yDAKiC;AAEjC,SAAgB,sBAAsB,CACpC,OAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,UAAmD,EAAE,cAAc,EAAE,EAAE,EAAE;;IAEzE,MAAM,IAAI,GAAG,IAAA,kCAAiB,EAC5B,sKAAsK,EACtK;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,iBAAiB,EAAE,iBAAiB;QACpC,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,OAAO,CAAC,UAAU;QACnC,SAAS,EAAE,CAAC,CAAA,OAAO,aAAP,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AAM,KAAK,GAAG,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,8BAAkB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,mBAAmB;AACZ,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,UAAkB,EAClB,UAAqC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE3D,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAChG,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CloudHealthContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n Entity,\n entitySerializer,\n entityDeserializer,\n _EntityListResult,\n _entityListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n EntitiesListByHealthModelOptionalParams,\n EntitiesDeleteOptionalParams,\n EntitiesCreateOrUpdateOptionalParams,\n EntitiesGetOptionalParams,\n} from \"./options.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listByHealthModelSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: EntitiesListByHealthModelOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities{?api%2Dversion,timestamp}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n \"api%2Dversion\": context.apiVersion,\n timestamp: !options?.timestamp ? options?.timestamp : options?.timestamp.toISOString(),\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByHealthModelDeserialize(\n result: PathUncheckedResponse,\n): Promise<_EntityListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _entityListResultDeserializer(result.body);\n}\n\n/** List Entity resources by HealthModel */\nexport function listByHealthModel(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: EntitiesListByHealthModelOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Entity> {\n return buildPagedAsyncIterator(\n context,\n () => _listByHealthModelSend(context, resourceGroupName, healthModelName, options),\n _listByHealthModelDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n entityName: entityName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a Entity */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport async function $delete(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(\n context,\n resourceGroupName,\n healthModelName,\n entityName,\n options,\n );\n return _$deleteDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n resource: Entity,\n options: EntitiesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n entityName: entityName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: entitySerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise<Entity> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return entityDeserializer(result.body);\n}\n\n/** Create a Entity */\nexport async function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n resource: Entity,\n options: EntitiesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<Entity> {\n const result = await _createOrUpdateSend(\n context,\n resourceGroupName,\n healthModelName,\n entityName,\n resource,\n options,\n );\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n entityName: entityName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<Entity> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return entityDeserializer(result.body);\n}\n\n/** Get a Entity */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesGetOptionalParams = { requestOptions: {} },\n): Promise<Entity> {\n const result = await _getSend(context, resourceGroupName, healthModelName, entityName, options);\n return _getDeserialize(result);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/entities/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6BlC,wDA0BC;AAED,sEAWC;AAGD,8CAaC;AAED,oCA2BC;AAED,kDASC;AAQD,0BAeC;AAED,kDA8BC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,GAAG,IAAA,iDAAmC,EAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,MAA6B;IACjE,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,8BAAkB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,mBAAmB;AACZ,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,UAAkB,EAClB,UAAqC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE3D,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAChG,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CloudHealthContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n Entity,\n entitySerializer,\n entityDeserializer,\n _EntityListResult,\n _entityListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n EntitiesListByHealthModelOptionalParams,\n EntitiesDeleteOptionalParams,\n EntitiesCreateOrUpdateOptionalParams,\n EntitiesGetOptionalParams,\n} from \"./options.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listByHealthModelSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: EntitiesListByHealthModelOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities{?api%2Dversion,timestamp}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n \"api%2Dversion\": context.apiVersion,\n timestamp: !options?.timestamp ? options?.timestamp : options?.timestamp.toISOString(),\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByHealthModelDeserialize(\n result: PathUncheckedResponse,\n): Promise<_EntityListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _entityListResultDeserializer(result.body);\n}\n\n/** List Entity resources by HealthModel */\nexport function listByHealthModel(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n options: EntitiesListByHealthModelOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Entity> {\n return buildPagedAsyncIterator(\n context,\n () => _listByHealthModelSend(context, resourceGroupName, healthModelName, options),\n _listByHealthModelDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n entityName: entityName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a Entity */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport async function $delete(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(\n context,\n resourceGroupName,\n healthModelName,\n entityName,\n options,\n );\n return _$deleteDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n resource: Entity,\n options: EntitiesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n entityName: entityName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: entitySerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(result: PathUncheckedResponse): Promise<Entity> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return entityDeserializer(result.body);\n}\n\n/** Create a Entity */\nexport async function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n resource: Entity,\n options: EntitiesCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<Entity> {\n const result = await _createOrUpdateSend(\n context,\n resourceGroupName,\n healthModelName,\n entityName,\n resource,\n options,\n );\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n healthModelName: healthModelName,\n entityName: entityName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<Entity> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return entityDeserializer(result.body);\n}\n\n/** Get a Entity */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n healthModelName: string,\n entityName: string,\n options: EntitiesGetOptionalParams = { requestOptions: {} },\n): Promise<Entity> {\n const result = await _getSend(context, resourceGroupName, healthModelName, entityName, options);\n return _getDeserialize(result);\n}\n"]}
|
|
@@ -28,14 +28,19 @@ const core_client_1 = require("@azure-rest/core-client");
|
|
|
28
28
|
function _listBySubscriptionSend(context, options = {
|
|
29
29
|
requestOptions: {},
|
|
30
30
|
}) {
|
|
31
|
-
var _a, _b;
|
|
32
31
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/providers/Microsoft.CloudHealth/healthmodels{?api%2Dversion}", {
|
|
33
32
|
subscriptionId: context.subscriptionId,
|
|
34
33
|
"api%2Dversion": context.apiVersion,
|
|
35
34
|
}, {
|
|
36
|
-
allowReserved:
|
|
35
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
36
|
+
});
|
|
37
|
+
return context.path(path).get({
|
|
38
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
39
|
+
headers: {
|
|
40
|
+
accept: "application/json",
|
|
41
|
+
...options.requestOptions?.headers,
|
|
42
|
+
},
|
|
37
43
|
});
|
|
38
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
39
44
|
}
|
|
40
45
|
async function _listBySubscriptionDeserialize(result) {
|
|
41
46
|
const expectedStatuses = ["200"];
|
|
@@ -55,15 +60,20 @@ function listBySubscription(context, options = {
|
|
|
55
60
|
function _listByResourceGroupSend(context, resourceGroupName, options = {
|
|
56
61
|
requestOptions: {},
|
|
57
62
|
}) {
|
|
58
|
-
var _a, _b;
|
|
59
63
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels{?api%2Dversion}", {
|
|
60
64
|
subscriptionId: context.subscriptionId,
|
|
61
65
|
resourceGroupName: resourceGroupName,
|
|
62
66
|
"api%2Dversion": context.apiVersion,
|
|
63
67
|
}, {
|
|
64
|
-
allowReserved:
|
|
68
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
69
|
+
});
|
|
70
|
+
return context.path(path).get({
|
|
71
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
72
|
+
headers: {
|
|
73
|
+
accept: "application/json",
|
|
74
|
+
...options.requestOptions?.headers,
|
|
75
|
+
},
|
|
65
76
|
});
|
|
66
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
67
77
|
}
|
|
68
78
|
async function _listByResourceGroupDeserialize(result) {
|
|
69
79
|
const expectedStatuses = ["200"];
|
|
@@ -81,16 +91,21 @@ function listByResourceGroup(context, resourceGroupName, options = {
|
|
|
81
91
|
return (0, pagingHelpers_js_1.buildPagedAsyncIterator)(context, () => _listByResourceGroupSend(context, resourceGroupName, options), _listByResourceGroupDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
82
92
|
}
|
|
83
93
|
function _$deleteSend(context, resourceGroupName, healthModelName, options = { requestOptions: {} }) {
|
|
84
|
-
var _a, _b;
|
|
85
94
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}{?api%2Dversion}", {
|
|
86
95
|
subscriptionId: context.subscriptionId,
|
|
87
96
|
resourceGroupName: resourceGroupName,
|
|
88
97
|
healthModelName: healthModelName,
|
|
89
98
|
"api%2Dversion": context.apiVersion,
|
|
90
99
|
}, {
|
|
91
|
-
allowReserved:
|
|
100
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
101
|
+
});
|
|
102
|
+
return context.path(path).delete({
|
|
103
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
104
|
+
headers: {
|
|
105
|
+
accept: "application/json",
|
|
106
|
+
...options.requestOptions?.headers,
|
|
107
|
+
},
|
|
92
108
|
});
|
|
93
|
-
return context.path(path).delete(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
94
109
|
}
|
|
95
110
|
async function _$deleteDeserialize(result) {
|
|
96
111
|
const expectedStatuses = ["202", "204", "200"];
|
|
@@ -109,23 +124,30 @@ async function _$deleteDeserialize(result) {
|
|
|
109
124
|
*/
|
|
110
125
|
function $delete(context, resourceGroupName, healthModelName, options = { requestOptions: {} }) {
|
|
111
126
|
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _$deleteDeserialize, ["202", "204", "200"], {
|
|
112
|
-
updateIntervalInMs: options
|
|
113
|
-
abortSignal: options
|
|
127
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
128
|
+
abortSignal: options?.abortSignal,
|
|
114
129
|
getInitialResponse: () => _$deleteSend(context, resourceGroupName, healthModelName, options),
|
|
115
130
|
resourceLocationConfig: "location",
|
|
116
131
|
});
|
|
117
132
|
}
|
|
118
133
|
function _updateSend(context, resourceGroupName, healthModelName, properties, options = { requestOptions: {} }) {
|
|
119
|
-
var _a, _b;
|
|
120
134
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}{?api%2Dversion}", {
|
|
121
135
|
subscriptionId: context.subscriptionId,
|
|
122
136
|
resourceGroupName: resourceGroupName,
|
|
123
137
|
healthModelName: healthModelName,
|
|
124
138
|
"api%2Dversion": context.apiVersion,
|
|
125
139
|
}, {
|
|
126
|
-
allowReserved:
|
|
140
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
141
|
+
});
|
|
142
|
+
return context.path(path).patch({
|
|
143
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
144
|
+
contentType: "application/json",
|
|
145
|
+
headers: {
|
|
146
|
+
accept: "application/json",
|
|
147
|
+
...options.requestOptions?.headers,
|
|
148
|
+
},
|
|
149
|
+
body: (0, models_js_1.healthModelUpdateSerializer)(properties),
|
|
127
150
|
});
|
|
128
|
-
return context.path(path).patch(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.healthModelUpdateSerializer)(properties) }));
|
|
129
151
|
}
|
|
130
152
|
async function _updateDeserialize(result) {
|
|
131
153
|
const expectedStatuses = ["200", "202"];
|
|
@@ -139,23 +161,30 @@ async function _updateDeserialize(result) {
|
|
|
139
161
|
/** Update a HealthModel */
|
|
140
162
|
function update(context, resourceGroupName, healthModelName, properties, options = { requestOptions: {} }) {
|
|
141
163
|
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _updateDeserialize, ["200", "202"], {
|
|
142
|
-
updateIntervalInMs: options
|
|
143
|
-
abortSignal: options
|
|
164
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
165
|
+
abortSignal: options?.abortSignal,
|
|
144
166
|
getInitialResponse: () => _updateSend(context, resourceGroupName, healthModelName, properties, options),
|
|
145
167
|
resourceLocationConfig: "location",
|
|
146
168
|
});
|
|
147
169
|
}
|
|
148
170
|
function _createSend(context, resourceGroupName, healthModelName, resource, options = { requestOptions: {} }) {
|
|
149
|
-
var _a, _b;
|
|
150
171
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}{?api%2Dversion}", {
|
|
151
172
|
subscriptionId: context.subscriptionId,
|
|
152
173
|
resourceGroupName: resourceGroupName,
|
|
153
174
|
healthModelName: healthModelName,
|
|
154
175
|
"api%2Dversion": context.apiVersion,
|
|
155
176
|
}, {
|
|
156
|
-
allowReserved:
|
|
177
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
178
|
+
});
|
|
179
|
+
return context.path(path).put({
|
|
180
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
181
|
+
contentType: "application/json",
|
|
182
|
+
headers: {
|
|
183
|
+
accept: "application/json",
|
|
184
|
+
...options.requestOptions?.headers,
|
|
185
|
+
},
|
|
186
|
+
body: (0, models_js_1.healthModelSerializer)(resource),
|
|
157
187
|
});
|
|
158
|
-
return context.path(path).put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.healthModelSerializer)(resource) }));
|
|
159
188
|
}
|
|
160
189
|
async function _createDeserialize(result) {
|
|
161
190
|
const expectedStatuses = ["200", "201"];
|
|
@@ -169,23 +198,28 @@ async function _createDeserialize(result) {
|
|
|
169
198
|
/** Create a HealthModel */
|
|
170
199
|
function create(context, resourceGroupName, healthModelName, resource, options = { requestOptions: {} }) {
|
|
171
200
|
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _createDeserialize, ["200", "201"], {
|
|
172
|
-
updateIntervalInMs: options
|
|
173
|
-
abortSignal: options
|
|
201
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
202
|
+
abortSignal: options?.abortSignal,
|
|
174
203
|
getInitialResponse: () => _createSend(context, resourceGroupName, healthModelName, resource, options),
|
|
175
204
|
resourceLocationConfig: "azure-async-operation",
|
|
176
205
|
});
|
|
177
206
|
}
|
|
178
207
|
function _getSend(context, resourceGroupName, healthModelName, options = { requestOptions: {} }) {
|
|
179
|
-
var _a, _b;
|
|
180
208
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}{?api%2Dversion}", {
|
|
181
209
|
subscriptionId: context.subscriptionId,
|
|
182
210
|
resourceGroupName: resourceGroupName,
|
|
183
211
|
healthModelName: healthModelName,
|
|
184
212
|
"api%2Dversion": context.apiVersion,
|
|
185
213
|
}, {
|
|
186
|
-
allowReserved:
|
|
214
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
215
|
+
});
|
|
216
|
+
return context.path(path).get({
|
|
217
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
218
|
+
headers: {
|
|
219
|
+
accept: "application/json",
|
|
220
|
+
...options.requestOptions?.headers,
|
|
221
|
+
},
|
|
187
222
|
});
|
|
188
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
189
223
|
}
|
|
190
224
|
async function _getDeserialize(result) {
|
|
191
225
|
const expectedStatuses = ["200"];
|